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 a206b197
authored
Mar 05, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
第三轮bug修复
1 parent
c12f6096
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
209 additions
and
118 deletions
src/assets/style/public.scss
src/components/baseDialog/index.vue
src/views/purchase/components/orderDetailDialog.vue
src/views/purchase/components/shoppingCartCom.vue
src/views/purchase/purchasingMall.vue
src/assets/style/public.scss
View file @
a206b19
...
...
@@ -3,6 +3,20 @@
// 工具类名统一前缀
$prefix
:
d2
;
ul
,
li
{
padding
:
0
;
margin
:
0
;
list-style
:
none
}
body
,
p
,
h1
,
h2
{
margin
:
0
;
}
// 禁止用户选中 鼠标变为手形
%unable-select
{
user-select
:
none
;
...
...
@@ -238,6 +252,8 @@ $prefix: d2;
color
:
#0947c6
;
}
/* 以下两个修改箭头颜色 */
// .el-tooltip__popper[x-placement^='top'] .popper__arrow {
// border-top-color: #505050;
...
...
src/components/baseDialog/index.vue
View file @
a206b19
<
template
>
<el-dialog
id=
"baseDialog"
top=
"15vh"
:close-on-click-modal=
"true"
:close-on-press-escape=
"true"
:title=
"dialogConfig.title"
:width=
"dialogConfig.width"
:visible
.
sync=
"visible"
:show-close=
"config.showClose"
class=
"noborder"
:append-to-body=
"config.appendToBody"
>
<el-dialog
id=
"baseDialog"
top=
"15vh"
:close-on-click-modal=
"true"
:close-on-press-escape=
"true"
:title=
"dialogConfig.title"
:width=
"dialogConfig.width"
:visible
.
sync=
"visible"
:show-close=
"config.showClose"
class=
"noborder"
:append-to-body=
"config.appendToBody"
>
<slot
/>
<div
slot=
"footer"
v-if=
"config.isShowFooter"
>
<el-button
type=
"primary"
@
click=
"confirmBtn"
>
<div
slot=
"footer"
v-if=
"config.isShowFooter"
>
<el-button
type=
"primary"
@
click=
"confirmBtn"
>
{{
config
.
confirm_name
}}
</el-button>
<el-button
@
click=
"visible = false"
>
...
...
@@ -116,11 +107,12 @@ export default {
border-radius
:
6px
;
//
padding
:
0
;
overflow
:
hidden
;
.el-dialog__header
{
//
box-shadow
:
0px
0px
5px
0px
rgba
(
136
,
152
,
157
,
0.3
);
border-bottom
:
solid
1px
#e6e6e6
;
border-radius
:
6px
6px
0px
0px
;
padding
:
18px
20px
18px
25px
;
.el-dialog__title
{
//
color
:
#212121
;
color
:
#333333
;
...
...
@@ -129,6 +121,7 @@ export default {
font-weight
:
600
;
//
font-weight
:
16px
;
}
.el-dialog__close
{
color
:
#666
;
font-weight
:
600
;
...
...
@@ -144,6 +137,7 @@ export default {
max-height
:
calc
(
100%
-
121px
);
//
height
:
calc
(
100%
-
121px
);
}
.roleTitle
{
margin-right
:
40px
;
}
...
...
src/views/purchase/components/orderDetailDialog.vue
View file @
a206b19
<
template
>
<baseDialog
:is-show
.
sync=
"dialogShow"
:config=
"dialogConfig.setting"
:dialog-config=
"dialogConfig.config"
@
closeDialog=
"handleDetailClose"
>
<baseDialog
:is-show
.
sync=
"dialogShow"
:config=
"dialogConfig.setting"
:dialog-config=
"dialogConfig.config"
@
closeDialog=
"handleDetailClose"
>
<div
class=
"detail-content"
v-if=
"dialogShow"
>
<div
class=
"addressTitle"
>
<img
src=
"../images/addressIcon.webp"
alt=
""
class=
"icon"
>
<img
src=
"../images/addressIcon.webp"
alt=
""
class=
"icon"
>
<span
class=
"title"
>
{{
paramsObj
.
merchantName
}}
</span>
</div>
<div
class=
"address-info"
>
<span
class=
"name"
>
收货人:
<span
class=
"label"
>
{{
detailInfo
.
contactName
}}
</span></span>
<span
class=
"phone"
>
电话:
<span
class=
"label"
>
{{
detailInfo
.
contactPhone
}}
</span></span>
<span
class=
"address"
>
收货地址:
<span
class=
"label"
>
{{
detailInfo
.
contactAddress
}}
</span></span>
<span
class=
"address"
>
收货地址:
<span
class=
"label"
>
{{
detailInfo
.
contactAddress
}}
</span></span>
</div>
<div
class=
"table-class"
>
<d2-table
ref=
"purchaseOrderDetailTable"
:table-params=
"tableParams"
@
refreshTable=
"refreshTable"
:table-data=
"detailInfo.tableData"
:tableTotal=
"detailInfo.tableTotal"
>
</d2-table>
<d2-table
ref=
"purchaseOrderDetailTable"
:table-params=
"tableParams"
@
refreshTable=
"refreshTable"
:table-data=
"detailInfo.tableData"
:table-total=
"detailInfo.tableTotal"
>
</d2-table>
</div>
</div>
</baseDialog>
...
...
@@ -48,7 +39,7 @@ export default {
dialogShow
:
{
get
()
{
if
(
this
.
visible
)
{
this
.
getDetail
({
currentPage
:
1
,
pageSize
:
20
})
this
.
getDetail
({
currentPage
:
1
,
pageSize
:
20
})
}
return
this
.
visible
},
...
...
@@ -77,8 +68,8 @@ export default {
tableColumns
:
[
{
label
:
'商品名称'
,
prop
:
'upgradeGoodsName'
,
prop
:
'upgradeGoodsName'
},
{
label
:
'系列'
,
...
...
@@ -130,32 +121,43 @@ export default {
.addressTitle
{
display
:
flex
;
align-items
:
center
;
.title
{
font-family
:
PingFangSC-Medium
;
font-weight
:
600
;
font-size
:
16px
;
color
:
#333333
;
}
.icon
{
.icon
{
width
:
28px
;
height
:
28px
;
margin-right
:
8px
;
}
}
.address-info
{
display
:
flex
;
box-sizing
:
border-box
;
align-items
:
center
;
justify-content
:
space-between
;
//
justify-content
:
space-between
;
flex-wrap
:
wrap
;
width
:
100%
;
height
:
36px
;
//
height
:
36px
;
padding
:
0
20px
;
margin-top
:
10px
;
font-size
:
14px
;
color
:
#666666
;
>span
{
margin-right
:
20px
;
margin-bottom
:
10px
;
}
.label
{
color
:
#333333
;
}
.address
{
min-width
:
500px
;
}
...
...
src/views/purchase/components/shoppingCartCom.vue
View file @
a206b19
...
...
@@ -56,10 +56,24 @@
<
span
class
=
"label"
>
总价:
<
/span>
<
span
class
=
"num"
>
¥
{{
totalPrice
}}
<
/span>
<!--
<
div
><
/div> -->
<
el
-
button
class
=
"submitBtn"
v
-
preventReClick
:
loading
=
"$store.state.d2admin.loading.value"
@
click
=
"handleSubmit"
type
=
"primary"
>
结算
<
/el-button>
<
el
-
button
class
=
"submitBtn"
v
-
preventReClick
:
loading
=
"$store.state.d2admin.loading.value"
@
click
=
"validateGoodsNumber"
type
=
"primary"
>
结算
<
/el-button>
<
/div>
<
/el-drawer>
<
baseDialog
class
=
"addressDialog"
:
is
-
show
.
sync
=
"dialogShow"
:
config
=
"dialogConfig.setting"
:
dialog
-
config
=
"dialogConfig.config"
@
handleClick
=
"handleSubmit"
>
<
h4
class
=
"title"
>
确认要结算订单吗
?
<
/h4>
<
div
class
=
"info"
>
<
p
class
=
"tips"
><
span
>
请核对收货仓信息
:
<
/span> <el-button type="text" @click="editAddress">修改</
el
-
button
><
/p>
<
ul
class
=
"orderInfoCom"
>
<
li
class
=
"item"
v
-
for
=
"(item, index) in addressInfoList"
:
key
=
"index"
>
<
span
class
=
"label"
>
{{
item
.
label
}}
<
/span>
<
span
class
=
"conten"
>
{{
addressInfo
[
item
.
name
]
}}
<
/span>
<
/li>
<
/ul>
<
/div>
<
/baseDialog>
<
/div>
<
/template>
...
...
@@ -77,13 +91,48 @@ export default {
data
()
{
return
{
drawer
:
false
,
dialogShow
:
false
,
direction
:
'rtl'
,
isAllCheck
:
false
,
isIndeterminate
:
true
,
totalPrice
:
0
,
goodsSelectTotalNumber
:
0
,
goodsTotalNumber
:
0
,
goodsList
:
[]
goodsList
:
[],
dialogConfig
:
{
setting
:
{
showClose
:
true
,
appendToBody
:
false
,
isShowFooter
:
true
,
cancel_name
:
'取消结算'
,
confirm_name
:
'确定结算'
}
,
config
:
{
title
:
'结算确认'
,
width
:
'950px'
}
}
,
addressInfoList
:
[{
label
:
'店铺名称'
,
name
:
'yqMerchantName'
}
,
{
label
:
'店铺编号'
,
name
:
'yqMerchantId'
}
,
{
label
:
'收货人'
,
name
:
'contactName'
}
,
{
label
:
'收货人电话'
,
name
:
'contactPhone'
}
,
{
label
:
'收货地址'
,
name
:
'contactAddress'
}
],
selectList
:
[]
}
}
,
computed
:
{
...
...
@@ -115,14 +164,16 @@ export default {
}
)
}
,
methods
:
{
handleSubmit
()
{
editAddress
()
{
this
.
dialogShow
=
false
this
.
$emit
(
'editAddress'
)
}
,
validateGoodsNumber
()
{
// 判断 是否有地址
if
(
!
this
.
addressInfo
.
id
)
{
this
.
$message
.
warning
(
'请选择地址'
)
return
}
console
.
log
(
this
.
addressInfo
)
// return
// 判断 是否有选中的商品
const
selectList
=
this
.
goodsSelectStatus
.
reduce
((
list
,
item
)
=>
{
if
(
item
.
selectedFlag
===
'Y'
)
{
...
...
@@ -133,27 +184,35 @@ export default {
}
return
list
}
,
[])
if
(
selectList
.
length
)
{
const
{
contactAddress
,
contactName
,
contactPhone
}
=
this
.
addressInfo
const
params
=
{
orderDelivery
:
{
contactAddress
,
contactName
,
contactPhone
}
,
shoppingCarList
:
selectList
}
console
.
log
(
params
)
// return
purchaseOrderAdd
(
params
).
then
((
result
)
=>
{
this
.
$message
.
success
(
'提交成功'
)
this
.
getGoodsList
()
this
.
drawer
=
false
}
)
// purchaseOrderAdd
// this.getGoodsList()
if
(
!
selectList
.
length
)
{
return
this
.
$message
.
warning
(
'请选择商品'
)
}
else
{
this
.
$message
.
warning
(
'请选择商品'
)
this
.
selectList
=
selectList
this
.
dialogShow
=
true
}
}
,
handleSubmit
()
{
const
{
contactAddress
,
contactName
,
contactPhone
}
=
this
.
addressInfo
const
params
=
{
orderDelivery
:
{
contactAddress
,
contactName
,
contactPhone
}
,
shoppingCarList
:
this
.
selectList
}
// console.log(params)
// return
purchaseOrderAdd
(
params
).
then
((
result
)
=>
{
this
.
$message
.
success
(
'提交成功'
)
this
.
getGoodsList
()
this
.
drawer
=
false
this
.
dialogShow
=
false
}
)
// purchaseOrderAdd
// this.getGoodsList()
//
}
else
{
//
}
}
,
handleDelete
(
upgradeGoodsId
)
{
// console.log(upgradeGoodsId)
shoppingCarRemove
({
id
:
upgradeGoodsId
}
).
then
((
result
)
=>
{
...
...
@@ -494,4 +553,34 @@ export default {
}
}
}
.
addressDialog
{
.
title
{
text
-
align
:
center
;
font
-
size
:
20
px
;
color
:
#
f8ba37
;
}
.
tips
{
display
:
flex
;
justify
-
content
:
space
-
between
;
}
.
info
{
padding
:
15
px
20
px
;
box
-
shadow
:
0
px
0
px
5
px
0
px
rgba
(
136
,
152
,
157
,
0.3
);
}
.
item
{
margin
-
bottom
:
15
px
;
}
.
label
{
display
:
inline
-
block
;
width
:
100
px
;
text
-
align
:
right
;
margin
-
right
:
10
px
;
}
}
<
/style>
src/views/purchase/purchasingMall.vue
View file @
a206b19
<!-- 采购商城 -->
<
template
>
<d2-container
class=
"mallContainer"
>
<div
class=
"header addressCon"
slot=
"header"
>
<div
class=
"header addressCon"
slot=
"header"
>
<div
class=
"addressTitle"
>
<img
src=
"./images/addressIcon.webp"
alt=
""
class=
"icon"
>
<img
src=
"./images/addressIcon.webp"
alt=
""
class=
"icon"
>
<span
class=
"title"
>
{{
$$
(
addressInfo
,
'yqMerchantName'
)
}}
</span>
<span
class=
"edit pointer"
@
click=
"addressComVisible = true"
>
<img
src=
"./images/editAddressIcon.webp"
alt=
""
class=
"editIcon"
>
<span
class=
"edit pointer"
@
click=
"addressComVisible = true"
>
<img
src=
"./images/editAddressIcon.webp"
alt=
""
class=
"editIcon"
>
修改
</span>
</div>
...
...
@@ -20,80 +14,51 @@
<!-- 收货人:白敬亭 -->
<span
class=
"name"
>
收货人:
<span
class=
"label"
>
{{
$$
(
addressInfo
,
'contactName'
)
}}
</span></span>
<span
class=
"phone"
>
电话:
<span
class=
"label"
>
{{
$$
(
addressInfo
,
'contactPhone'
)
}}
</span></span>
<span
class=
"address"
>
收货地址:
<span
class=
"label"
>
{{
$$
(
addressInfo
,
'contactAddress'
)
}}
</span></span>
<span
class=
"address"
>
收货地址:
<span
class=
"label"
>
{{
$$
(
addressInfo
,
'contactAddress'
)
}}
</span></span>
</div>
</div>
<div
class=
"d2-container-content shopMallCon"
>
<!-- :stretch="false" -->
<div
class=
"classifyContainer"
>
<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
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"
class=
"show-search"
label-width=
"0px"
:col-width=
"6"
:search-form=
"searchForm"
:form-data=
"showFormData"
/>
<el-button
size=
"small"
@
click=
"handleSearch"
type=
"primary"
>
<d2-search
ref=
"showSearch"
class=
"show-search"
label-width=
"0px"
:col-width=
"6"
:search-form=
"searchForm"
:form-data=
"showFormData"
/>
<el-button
size=
"small"
@
click=
"handleSearch"
type=
"primary"
>
查询
</el-button>
</div>
<div
class=
"goodsCon"
>
<div
class=
"goodsItemCon"
v-for=
"(item,index) in purchaseList"
:class=
"
{active:item.active}"
:key="index">
<div
class=
"goodsItemCon"
v-for=
"(item, index) in purchaseList"
:class=
"
{ active: item.active }" :key="index">
<!-- 图片
{{
item
.
thumbUrl
}}
-->
<img
:src=
"item.thumbUrl"
class=
"img"
alt=
""
>
<img
:src=
"item.thumbUrl"
class=
"img"
alt=
""
>
<span
class=
"goodsName one-line-ellipsis"
>
{{
item
.
goodsName
}}
</span>
<!-- 名称
{{
item
.
goodsName
}}
-->
<span
class=
"purchaseOrderCount"
>
成交量/笔:
{{
item
.
purchaseOrderCount
}}
</span>
<!-- 成交量
{{
item
.
purchaseOrderCount
}}
-->
<span
class=
"viewPurchase pointer"
@
click=
"handleDetail(item,index)"
>
<span
class=
"viewPurchase pointer"
@
click=
"handleDetail(item, index)"
>
查看购买
</span>
</div>
<div
class=
"emptyCom"
v-show=
"!purchaseList.length"
>
<img
:src=
"emptyImgUrl"
class=
"emptyImg"
alt=
""
>
<div
class=
"emptyCom"
v-show=
"!purchaseList.length"
>
<img
:src=
"emptyImgUrl"
class=
"emptyImg"
alt=
""
>
<span
class=
"tips"
>
暂无数据
</span>
</div>
</div>
<div
class=
"pageCon"
>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page.pageNum"
:page-sizes=
"[10,20,30,40]"
:page-size=
"page.pageSize"
:total=
"total"
layout=
"->,prev,pager,next"
/>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page.pageNum"
:page-sizes=
"[10, 20, 30, 40]"
:page-size=
"page.pageSize"
:total=
"total"
layout=
"->,prev,pager,next"
/>
</div>
</div>
<!-- 购物车组件 -->
<shoppingCartCom
:address-info=
"addressInfo"
/>
<addressCom
:visible
.
sync=
"addressComVisible"
@
handleConfirmAddress=
"addressGet"
:address-info=
"addressInfo"
/>
<goodsDetailCom
:visible
.
sync=
"goodsDetailComVisible"
:goods-id=
"selectItem.id"
/>
<shoppingCartCom
:address-info=
"addressInfo"
@
editAddress=
"addressComVisible = true"
/>
<addressCom
:visible
.
sync=
"addressComVisible"
@
handleConfirmAddress=
"addressGet"
:address-info=
"addressInfo"
/>
<goodsDetailCom
:visible
.
sync=
"goodsDetailComVisible"
:goods-id=
"selectItem.id"
/>
</d2-container>
</
template
>
...
...
@@ -264,18 +229,22 @@ export default {
::v-deep
.mallContainer
{
width
:
1400px
;
margin
:
0
auto
;
.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
;
.goodsItemCon
{
box-sizing
:
border-box
;
width
:
177px
;
...
...
@@ -288,54 +257,66 @@ export default {
margin-right
:
16px
;
overflow
:
hidden
;
padding
:
8px
8px
16px
;
&.active
{
border
:
1px
solid
#185efe
;
}
.img
{
width
:
157px
;
height
:
157px
;
margin-bottom
:
8px
;
}
.goodsName
{
font-weight
:
600
;
color
:
#333333
;
margin-bottom
:
8px
;
}
.purchaseOrderCount
{
font-size
:
12px
;
color
:
#666666
;
margin-bottom
:
16px
;
}
.viewPurchase
{
//
font-weight
:
500
;
//
font-size
:
14px
;
color
:
#185efe
;
}
}
.goodsItemCon
:nth-child
(
6n
)
{
margin-right
:
0
;
}
}
.emptyCom
{
display
:
flex
;
flex-direction
:
column
;
margin
:
75px
auto
;
text-align
:
center
;
.tips
{
font-size
:
20px
;
color
:
#666
;
margin
:
16px
0
;
}
}
.d2-container-full__body
{
overflow-x
:
hidden
!important
;
}
}
.addressCon
{
padding
:
10px
20px
;
.addressTitle
{
display
:
flex
;
align-items
:
center
;
.title
{
font-family
:
PingFangSC-Medium
;
font-weight
:
600
;
...
...
@@ -350,16 +331,19 @@ export default {
font-size
:
14px
;
color
:
#185efe
;
}
.editIcon
{
width
:
20px
;
height
:
20px
;
}
}
.icon
{
width
:
32px
;
height
:
32px
;
margin-right
:
8px
;
}
.addressInfo
{
display
:
flex
;
box-sizing
:
border-box
;
...
...
@@ -373,24 +357,30 @@ export default {
background
:
#f9f9f9
;
font-size
:
14px
;
color
:
#666666
;
.label
{
color
:
#333333
;
//
margin-left
:
0px
;
}
.address
{
min-width
:
500px
;
}
}
}
.searchCon
{
height
:
65px
;
.show-search
{
width
:
670px
!important
;
min-width
:
670px
;
}
}
::v-deep
.classifyContainer
{
width
:
100%
;
.el-tabs__nav
{
border-top
:
none
!important
;
}
...
...
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