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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
169 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
path
=
"dj.api."
const
path2
=
'dj.smartcarlife.api.'
const
path2
=
"dj.smartcarlife.api."
export
function
getList
(
data
)
{
export
function
getList
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.page`
data
.
method
=
`
${
path
}
goodsinfo.page`
...
@@ -15,59 +15,59 @@ export function getType(data) {
...
@@ -15,59 +15,59 @@ export function getType(data) {
// 添加产品
// 添加产品
export
function
addGoods
(
data
)
{
export
function
addGoods
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.add`
data
.
method
=
`
${
path
}
goodsinfo.add`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
}
// 编辑产品
// 编辑产品
export
function
editGoods
(
data
)
{
export
function
editGoods
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.update`
data
.
method
=
`
${
path
}
goodsinfo.update`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
}
// 判断产品是否可删除
// 判断产品是否可删除
export
function
checkDeleteGoods
(
data
)
{
export
function
checkDeleteGoods
(
data
)
{
data
.
method
=
`
${
path2
}
goodsinfo.checkDeleteable`
data
.
method
=
`
${
path2
}
goodsinfo.checkDeleteable`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
}
// 删除产品
// 删除产品
export
function
deleteGoods
(
data
)
{
export
function
deleteGoods
(
data
)
{
data
.
method
=
`
${
path2
}
goodsinfo.delete`
data
.
method
=
`
${
path2
}
goodsinfo.delete`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
}
// 导出产品
// 导出产品
export
function
exportGoodsList
(
data
)
{
export
function
exportGoodsList
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.export`
data
.
method
=
`
${
path
}
goodsinfo.export`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
}
// 获取场景下类目
// 获取场景下类目
export
function
getProductTypeBySceneId
(
data
)
{
export
function
getProductTypeBySceneId
(
data
)
{
data
.
method
=
`
${
path
}
goodsCategoryConfiguration.queryGoodsCategoryBySceneId`
data
.
method
=
`
${
path
}
goodsCategoryConfiguration.queryGoodsCategoryBySceneId`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
}
// 获取品牌方/供应方
// 获取品牌方/供应方
export
function
getBrandSupplyMerchant
(
data
)
{
export
function
getBrandSupplyMerchant
(
data
)
{
data
.
method
=
`
${
path
}
goods.type.queryGoodsRelatedParty`
data
.
method
=
`
${
path
}
goods.type.queryGoodsRelatedParty`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
}
// 新增供应方
// 新增供应方
export
function
addBrandSupplyMerchant
(
data
)
{
export
function
addBrandSupplyMerchant
(
data
)
{
data
.
method
=
`
${
path
}
goods.type.addGoodsRelatedParty`
data
.
method
=
`
${
path
}
goods.type.addGoodsRelatedParty`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
}
// 编辑/删除供应方
// 编辑/删除供应方
export
function
editBrandSupplyMerchant
(
data
)
{
export
function
editBrandSupplyMerchant
(
data
)
{
data
.
method
=
`
${
path
}
goods.type.editGoodsRelatedParty`
data
.
method
=
`
${
path
}
goods.type.editGoodsRelatedParty`
return
request
(
data
,
'post'
)
return
request
(
data
,
"post"
)
}
}
// 获取素材详情
// 获取素材详情
export
function
getProductInfo
(
data
)
{
export
function
getProductInfo
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.get.byId`
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) {
...
@@ -51,3 +51,9 @@ export function listWithPagePurchaseInfo(data) {
data
.
method
=
`
${
path2
}
listWithPage.purchaseInfo`
data
.
method
=
`
${
path2
}
listWithPage.purchaseInfo`
return
request
(
data
)
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 @@
...
@@ -18,7 +18,7 @@
<span
class=
"price"
>
价格:
<span
<span
class=
"price"
>
价格:
<span
class=
"priceNum"
>
¥
{{
handleItemInfo
.
purchasePrice
}}
</span></span>
class=
"priceNum"
>
¥
{{
handleItemInfo
.
purchasePrice
}}
</span></span>
<span
class=
"turnover"
>
成交量:
<span
<span
class=
"turnover"
>
成交量:
<span
class=
"num"
>
{{
goodsInfo
.
purchaseOrderCount
}}
笔
</span></span>
class=
"num"
>
{{
goodsInfo
.
purchaseOrderCount
||
0
}}
笔
</span></span>
</div>
</div>
<div
class=
"skuCon"
>
<div
class=
"skuCon"
>
<div
class=
"label"
>
规格:
</div>
<div
class=
"label"
>
规格:
</div>
...
@@ -85,8 +85,9 @@ export default {
...
@@ -85,8 +85,9 @@ export default {
default
:
()
=>
{
}
default
:
()
=>
{
}
}
,
}
,
goodsId
:
{
goodsId
:
{
type
:
String
,
type
:
[
String
,
Number
]
default
:
'24'
// 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 @@
...
@@ -24,26 +24,19 @@
class=
"label"
>
{{
addressInfo
.
contactAddress
}}
</span></span>
class=
"label"
>
{{
addressInfo
.
contactAddress
}}
</span></span>
</div>
</div>
</div>
</div>
<div
class=
"d2-container-content"
>
<div
class=
"d2-container-content
shopMallCon
"
>
<!-- :stretch="false" -->
<div
class=
"classifyContainer"
>
<div
class=
"classifyContainer"
>
<!--
<div
class=
"centerfrom"
>
订阅名
</div>
-->
<el-tabs
v-model=
"searchForm.goodsType"
<div
class=
"spanall"
@
tab-click=
"handleSearch"
ref=
"formList"
>
type=
"card"
>
<span
class=
"spanalone"
<el-tab-pane
v-for=
"(item, i) in navList"
v-for=
"(item, i) in navList"
:key=
"i"
:key=
"i"
@
click=
"getchange(item, i)"
class=
"tabItem"
:class=
"scopedSlots == i ? 'item-one' : ''"
>
{{
item
.
goodsTypeName
}}
</span>
:label=
"item.goodsTypeName"
</div>
:name=
"item.goodsType"
></el-tab-pane>
<div
@
click=
"showMoreSourceList"
</el-tabs>
v-show=
"ulheight > 34"
class=
"centerfrom"
>
<span
:class=
"
{ rolate: showli }"
class="moreFrom">
{{
fromText
}}
</span>
</div>
</div>
</div>
<div
class=
"searchCon"
>
<div
class=
"searchCon"
>
<d2-search
ref=
"showSearch"
<d2-search
ref=
"showSearch"
...
@@ -64,7 +57,7 @@
...
@@ -64,7 +57,7 @@
:class=
"
{active:item.active}"
:class=
"
{active:item.active}"
:key="index">
:key="index">
<!-- 图片
{{
item
.
thumbUrl
}}
-->
<!-- 图片
{{
item
.
thumbUrl
}}
-->
<img
src=
"item.thumbUrl"
<img
:
src=
"item.thumbUrl"
class=
"img"
class=
"img"
alt=
""
>
alt=
""
>
<span
class=
"goodsName one-line-ellipsis"
>
{{
item
.
goodsName
}}
</span>
<span
class=
"goodsName one-line-ellipsis"
>
{{
item
.
goodsName
}}
</span>
...
@@ -84,7 +77,6 @@
...
@@ -84,7 +77,6 @@
</div>
</div>
</div>
</div>
<div
class=
"pageCon"
>
<div
class=
"pageCon"
>
<!-- sizes,total,,jumper -->
<el-pagination
background
<el-pagination
background
@
size-change=
"handleSizeChange"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
@
current-change=
"handleCurrentChange"
...
@@ -96,12 +88,12 @@
...
@@ -96,12 +88,12 @@
</div>
</div>
</div>
</div>
<!-- 购物车组件 -->
<!-- 购物车组件 -->
<shoppingCartCom
/>
<shoppingCartCom
:address-info=
"addressInfo"
/>
<addressCom
:visible
.
sync=
"addressComVisible"
<addressCom
:visible
.
sync=
"addressComVisible"
@
handleConfirmAddress=
"addressGet"
@
handleConfirmAddress=
"addressGet"
:goods-id=
"selectItem.id"
:address-info=
"addressInfo"
/>
:address-info=
"addressInfo"
/>
<goodsDetailCom
:visible
.
sync=
"goodsDetailComVisible"
/>
<goodsDetailCom
:visible
.
sync=
"goodsDetailComVisible"
:goods-id=
"selectItem.id"
/>
</d2-container>
</d2-container>
</
template
>
</
template
>
...
@@ -121,6 +113,7 @@ export default {
...
@@ -121,6 +113,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
// activeGoodsType: '',
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
addressComVisible
:
false
,
addressComVisible
:
false
,
goodsDetailComVisible
:
false
,
goodsDetailComVisible
:
false
,
...
@@ -142,21 +135,19 @@ export default {
...
@@ -142,21 +135,19 @@ export default {
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
12
pageSize
:
12
},
},
scopedSlots
:
0
,
// scopedSlots: 0,
ulheight
:
0
,
// ulheight: 0,
fromText
:
'更多'
,
// fromText: '更多',
showli
:
false
,
// showli: false,
navList
:
[
navList
:
[],
{
purchaseList
:
[
navItem
:
'所有就好尬建档赶快来好看'
// {
}
// thumbUrl: "string",
// goodsName: "string",
// purchaseOrderCount: 0,
// id: 0
// }
],
],
purchaseList
:
[{
thumbUrl
:
"string"
,
goodsName
:
"string"
,
purchaseOrderCount
:
0
,
id
:
0
}],
addressInfo
:
{
addressInfo
:
{
contactName
:
''
,
contactName
:
''
,
contactPhone
:
''
,
contactPhone
:
''
,
...
@@ -176,13 +167,12 @@ export default {
...
@@ -176,13 +167,12 @@ export default {
this
.
addressGet
()
this
.
addressGet
()
},
},
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
// debugger
this
.
ulheight
=
this
.
$refs
.
formList
.
scrollHeight
// console.log(test);
})
},
},
methods
:
{
methods
:
{
// handleTabClick(item) {
// console.log(item)
// this.listWithPagePurchaseInfo()
// },
handleSearch
()
{
handleSearch
()
{
this
.
page
.
pageNum
=
1
this
.
page
.
pageNum
=
1
this
.
listWithPagePurchaseInfo
()
this
.
listWithPagePurchaseInfo
()
...
@@ -203,10 +193,14 @@ export default {
...
@@ -203,10 +193,14 @@ export default {
},
},
listWithPagePurchaseInfo
()
{
listWithPagePurchaseInfo
()
{
// ...this.searchForm.goodsType?
const
params
=
{
const
params
=
{
...
this
.
page
,
...
this
.
page
,
...
this
.
searchForm
goodsType
:
+
this
.
searchForm
.
goodsType
||
''
,
goodsName
:
this
.
searchForm
.
goodsName
}
}
// console.log(params)
// return
listWithPagePurchaseInfo
(
params
).
then
((
result
)
=>
{
listWithPagePurchaseInfo
(
params
).
then
((
result
)
=>
{
const
{
list
,
total
}
=
result
const
{
list
,
total
}
=
result
// 调试用
// 调试用
...
@@ -227,43 +221,22 @@ export default {
...
@@ -227,43 +221,22 @@ export default {
const
{
list
}
=
result
const
{
list
}
=
result
console
.
log
(
list
,
'list'
)
console
.
log
(
list
,
'list'
)
if
(
list
.
length
)
{
if
(
list
.
length
)
{
this
.
navList
=
list
.
map
(({
categoryType
,
categoryName
})
=>
{
const
navList
=
list
.
map
(({
categoryType
,
categoryName
})
=>
{
return
{
return
{
goodsType
:
categoryType
,
goodsType
:
categoryType
.
toString
()
,
goodsTypeName
:
categoryName
goodsTypeName
:
categoryName
}
}
})
})
this
.
navList
=
[{
goodsType
:
''
,
goodsTypeName
:
'所有'
},
...
navList
]
console
.
log
(
this
.
productType
)
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
()
{
addressGet
()
{
// userInfo
// userInfo
// let { merchant:{merchantId,} } = this.userInfo
// let { merchant:{merchantId,} } = this.userInfo
addressGet
().
then
((
result
)
=>
{
addressGet
().
then
((
result
)
=>
{
console
.
log
(
result
)
console
.
log
(
result
)
this
.
addressInfo
=
result
this
.
addressInfo
=
result
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
...
@@ -294,7 +267,12 @@ export default {
...
@@ -294,7 +267,12 @@ export default {
.d2-header-switch
{
.d2-header-switch
{
display
:
none
;
display
:
none
;
}
}
.shopMallCon
{
padding
:
0
0
20px
!important
;
}
.goodsCon
{
.goodsCon
{
box-sizing
:
border-box
;
padding
:
0
20px
;
display
:
flex
;
display
:
flex
;
//
justify-content
:
space-between
;
//
justify-content
:
space-between
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
...
@@ -411,93 +389,10 @@ export default {
...
@@ -411,93 +389,10 @@ export default {
min-width
:
670px
;
min-width
:
670px
;
}
}
}
}
.classifyContainer
{
::v-deep
.classifyContainer
{
width
:
100%
;
width
:
100%
;
display
:
flex
;
.el-tabs__nav
{
border-top
:
none
!important
;
//
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
);
}
}
}
}
}
</
style
>
</
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