Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 60351f50
authored
Feb 16, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v4.16.0 功能开发完成
1 parent
c0e1f693
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
170 deletions
src/api/product.js
src/api/purchaseShopping.js
src/views/purchase/components/goodsDetailCom.vue
src/views/purchase/components/shoppingCartCom.vue
src/views/purchase/purchasingMall.vue
src/api/product.js
View file @
60351f5
import
request
from
'./request'
import
request
from
"./request"
const
path
=
'dj.api.'
const
path2
=
'dj.smartcarlife.api.'
const
path
=
"dj.api."
const
path2
=
"dj.smartcarlife.api."
export
function
getList
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.page`
...
...
@@ -15,59 +15,59 @@ export function getType(data) {
// 添加产品
export
function
addGoods
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.add`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
// 编辑产品
export
function
editGoods
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.update`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
// 判断产品是否可删除
export
function
checkDeleteGoods
(
data
)
{
data
.
method
=
`
${
path2
}
goodsinfo.checkDeleteable`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
// 删除产品
export
function
deleteGoods
(
data
)
{
data
.
method
=
`
${
path2
}
goodsinfo.delete`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
// 导出产品
export
function
exportGoodsList
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.export`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
// 获取场景下类目
export
function
getProductTypeBySceneId
(
data
)
{
data
.
method
=
`
${
path
}
goodsCategoryConfiguration.queryGoodsCategoryBySceneId`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
// 获取品牌方/供应方
export
function
getBrandSupplyMerchant
(
data
)
{
data
.
method
=
`
${
path
}
goods.type.queryGoodsRelatedParty`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
// 新增供应方
export
function
addBrandSupplyMerchant
(
data
)
{
data
.
method
=
`
${
path
}
goods.type.addGoodsRelatedParty`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
// 编辑/删除供应方
export
function
editBrandSupplyMerchant
(
data
)
{
data
.
method
=
`
${
path
}
goods.type.editGoodsRelatedParty`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
// 获取素材详情
export
function
getProductInfo
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.get.byId`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
src/api/purchaseShopping.js
View file @
60351f5
...
...
@@ -51,3 +51,9 @@ export function listWithPagePurchaseInfo(data) {
data
.
method
=
`
${
path2
}
listWithPage.purchaseInfo`
return
request
(
data
)
}
// 添加采购订单
export
function
purchaseOrderAdd
(
data
)
{
data
.
method
=
`
${
path
}
purchaseOrder.add`
return
request
(
data
,
"post"
)
}
src/views/purchase/components/goodsDetailCom.vue
View file @
60351f5
...
...
@@ -18,7 +18,7 @@
<span
class=
"price"
>
价格:
<span
class=
"priceNum"
>
¥
{{
handleItemInfo
.
purchasePrice
}}
</span></span>
<span
class=
"turnover"
>
成交量:
<span
class=
"num"
>
{{
goodsInfo
.
purchaseOrderCount
}}
笔
</span></span>
class=
"num"
>
{{
goodsInfo
.
purchaseOrderCount
||
0
}}
笔
</span></span>
</div>
<div
class=
"skuCon"
>
<div
class=
"label"
>
规格:
</div>
...
...
@@ -85,8 +85,9 @@ export default {
default
:
()
=>
{
}
}
,
goodsId
:
{
type
:
String
,
default
:
'24'
type
:
[
String
,
Number
]
// required: true
// default: '24'
}
}
,
...
...
src/views/purchase/components/shoppingCartCom.vue
View file @
60351f5
This diff is collapsed.
Click to expand it.
src/views/purchase/purchasingMall.vue
View file @
60351f5
...
...
@@ -24,26 +24,19 @@
class=
"label"
>
{{
addressInfo
.
contactAddress
}}
</span></span>
</div>
</div>
<div
class=
"d2-container-content"
>
<div
class=
"d2-container-content
shopMallCon
"
>
<!-- :stretch="false" -->
<div
class=
"classifyContainer"
>
<!--
<div
class=
"centerfrom"
>
订阅名
</div>
-->
<div
class=
"spanall"
ref=
"formList"
>
<span
class=
"spanalone"
v-for=
"(item, i) in navList"
:key=
"i"
@
click=
"getchange(item, i)"
:class=
"scopedSlots == i ? 'item-one' : ''"
>
{{
item
.
goodsTypeName
}}
</span>
</div>
<div
@
click=
"showMoreSourceList"
v-show=
"ulheight > 34"
class=
"centerfrom"
>
<span
:class=
"
{ rolate: showli }"
class="moreFrom">
{{
fromText
}}
</span>
</div>
<el-tabs
v-model=
"searchForm.goodsType"
@
tab-click=
"handleSearch"
type=
"card"
>
<el-tab-pane
v-for=
"(item, i) in navList"
:key=
"i"
class=
"tabItem"
:label=
"item.goodsTypeName"
:name=
"item.goodsType"
></el-tab-pane>
</el-tabs>
</div>
<div
class=
"searchCon"
>
<d2-search
ref=
"showSearch"
...
...
@@ -64,7 +57,7 @@
:class=
"
{active:item.active}"
:key="index">
<!-- 图片
{{
item
.
thumbUrl
}}
-->
<img
src=
"item.thumbUrl"
<img
:
src=
"item.thumbUrl"
class=
"img"
alt=
""
>
<span
class=
"goodsName one-line-ellipsis"
>
{{
item
.
goodsName
}}
</span>
...
...
@@ -84,7 +77,6 @@
</div>
</div>
<div
class=
"pageCon"
>
<!-- sizes,total,,jumper -->
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
@@ -96,12 +88,12 @@
</div>
</div>
<!-- 购物车组件 -->
<shoppingCartCom
/>
<shoppingCartCom
:address-info=
"addressInfo"
/>
<addressCom
:visible
.
sync=
"addressComVisible"
@
handleConfirmAddress=
"addressGet"
:goods-id=
"selectItem.id"
:address-info=
"addressInfo"
/>
<goodsDetailCom
:visible
.
sync=
"goodsDetailComVisible"
/>
<goodsDetailCom
:visible
.
sync=
"goodsDetailComVisible"
:goods-id=
"selectItem.id"
/>
</d2-container>
</
template
>
...
...
@@ -121,6 +113,7 @@ export default {
},
data
()
{
return
{
// activeGoodsType: '',
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
addressComVisible
:
false
,
goodsDetailComVisible
:
false
,
...
...
@@ -142,21 +135,19 @@ export default {
pageNum
:
1
,
pageSize
:
12
},
scopedSlots
:
0
,
ulheight
:
0
,
fromText
:
'更多'
,
showli
:
false
,
navList
:
[
{
navItem
:
'所有就好尬建档赶快来好看'
}
// scopedSlots: 0,
// ulheight: 0,
// fromText: '更多',
// showli: false,
navList
:
[],
purchaseList
:
[
// {
// thumbUrl: "string",
// goodsName: "string",
// purchaseOrderCount: 0,
// id: 0
// }
],
purchaseList
:
[{
thumbUrl
:
"string"
,
goodsName
:
"string"
,
purchaseOrderCount
:
0
,
id
:
0
}],
addressInfo
:
{
contactName
:
''
,
contactPhone
:
''
,
...
...
@@ -176,13 +167,12 @@ export default {
this
.
addressGet
()
},
mounted
()
{
this
.
$nextTick
(()
=>
{
// debugger
this
.
ulheight
=
this
.
$refs
.
formList
.
scrollHeight
// console.log(test);
})
},
methods
:
{
// handleTabClick(item) {
// console.log(item)
// this.listWithPagePurchaseInfo()
// },
handleSearch
()
{
this
.
page
.
pageNum
=
1
this
.
listWithPagePurchaseInfo
()
...
...
@@ -203,10 +193,14 @@ export default {
},
listWithPagePurchaseInfo
()
{
// ...this.searchForm.goodsType?
const
params
=
{
...
this
.
page
,
...
this
.
searchForm
goodsType
:
+
this
.
searchForm
.
goodsType
||
''
,
goodsName
:
this
.
searchForm
.
goodsName
}
// console.log(params)
// return
listWithPagePurchaseInfo
(
params
).
then
((
result
)
=>
{
const
{
list
,
total
}
=
result
// 调试用
...
...
@@ -227,43 +221,22 @@ export default {
const
{
list
}
=
result
console
.
log
(
list
,
'list'
)
if
(
list
.
length
)
{
this
.
navList
=
list
.
map
(({
categoryType
,
categoryName
})
=>
{
const
navList
=
list
.
map
(({
categoryType
,
categoryName
})
=>
{
return
{
goodsType
:
categoryType
,
goodsType
:
categoryType
.
toString
()
,
goodsTypeName
:
categoryName
}
})
this
.
navList
=
[{
goodsType
:
''
,
goodsTypeName
:
'所有'
},
...
navList
]
console
.
log
(
this
.
productType
)
}
})
},
// 订阅名数量过多的处理
showMoreSourceList
()
{
if
(
this
.
showli
)
{
this
.
$refs
.
formList
.
style
.
height
=
'34px'
this
.
fromText
=
'更多'
}
else
{
this
.
$refs
.
formList
.
style
.
height
=
this
.
ulheight
+
'px'
this
.
fromText
=
'收起'
}
this
.
showli
=
!
this
.
showli
},
getchange
(
item
,
i
)
{
this
.
scopedSlots
=
i
this
.
selectItem
=
item
.
navItem
if
(
item
.
navItem
==
'所有'
)
{
this
.
totalAllList
()
}
else
{
this
.
list
=
item
.
template
}
},
addressGet
()
{
// userInfo
// let { merchant:{merchantId,} } = this.userInfo
addressGet
().
then
((
result
)
=>
{
console
.
log
(
result
)
this
.
addressInfo
=
result
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
...
...
@@ -294,7 +267,12 @@ export default {
.d2-header-switch
{
display
:
none
;
}
.shopMallCon
{
padding
:
0
0
20px
!important
;
}
.goodsCon
{
box-sizing
:
border-box
;
padding
:
0
20px
;
display
:
flex
;
//
justify-content
:
space-between
;
flex-wrap
:
wrap
;
...
...
@@ -411,93 +389,10 @@ export default {
min-width
:
670px
;
}
}
.classifyContainer
{
::v-deep
.classifyContainer
{
width
:
100%
;
display
:
flex
;
//
margin-bottom
:
28px
;
.centerfrom
{
width
:
45px
;
height
:
20px
;
font-size
:
14px
;
font-family
:
PingFangSC-Semibold
,
PingFang
SC
;
font-weight
:
600
;
color
:
#333333
;
line-height
:
20px
;
margin-top
:
6px
;
//
margin-right
:
45px
;
}
.spanall
{
flex
:
1
;
display
:
flex
;
flex-wrap
:
wrap
;
//
padding-left
:
42px
;
height
:
33px
;
overflow
:
hidden
;
//
margin-left
:
30px
;
.spanalone
{
//
height
:
32px
;
//
margin
:
2px
2px
;
display
:
inline
;
padding
:
6px
18px
;
border
:
1px
solid
rgba
(
200
,
200
,
200
,
0
);
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
cursor
:
pointer
;
}
.item-one
{
border
:
1px
solid
#007fcd
;
border-radius
:
4px
;
color
:
#007fcd
;
}
}
.arrow
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
i
{
border
:
solid
black
;
border-width
:
0
1px
1px
0
;
display
:
inline-block
;
padding
:
3px
;
}
.up
{
transform
:
rotate
(
-135deg
);
-webkit-transform
:
rotate
(
-135deg
);
}
.down
{
transform
:
rotate
(
45deg
);
-webkit-transform
:
rotate
(
45deg
);
}
.moreFrom
{
position
:
relative
;
cursor
:
pointer
;
&:after
{
content
:
""
;
position
:
absolute
;
width
:
0
;
height
:
0
;
top
:
7px
;
right
:
-17px
;
transition
:
all
1s
;
border
:
5px
solid
transparent
;
border-top-color
:
#666666
;
}
}
.rolate
{
&::after
{
top
:
0px
;
transform
:
rotate
(
180deg
);
-webkit-transform
:
rotate
(
180deg
);
-moz-transform
:
rotate
(
180deg
);
-o-transform
:
rotate
(
180deg
);
-ms-transform
:
rotate
(
180deg
);
}
.el-tabs__nav
{
border-top
:
none
!important
;
}
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment