Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d0922c80
authored
Aug 20, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 公共弹窗自定义
1 parent
dc1a2119
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
286 additions
and
43 deletions
api/module/boutique.js
assets/images/boutique/tipsPopupBg.png
components/PublishPopup.vue
pages/boutique/components/OrderCard.vue
pages/boutique/tool/components/ConfirmOrder.vue
utils/utils.js
api/module/boutique.js
View file @
d0922c8
...
@@ -231,5 +231,17 @@ module.exports = {
...
@@ -231,5 +231,17 @@ module.exports = {
/**根据订单号获取订单详情(含套餐) */
/**根据订单号获取订单详情(含套餐) */
getPackageGoodsDetail
(
data
)
{
getPackageGoodsDetail
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.packageGoodsDetail'
,
projectName
:
'boutique'
,
...
data
})
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.packageGoodsDetail'
,
projectName
:
'boutique'
,
...
data
})
},
/** 根据订单号获取订单详情 */
getOrderDetail
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.detail'
,
projectName
:
'boutique'
,
...
data
})
},
/**改变支付订单状态 */
createPayOrder
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.payOrder.create'
,
projectName
:
'boutique'
,
...
data
})
},
/** 修改订单备注 */
updateOrderRemark
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.updateRemark'
,
projectName
:
'boutique'
,
...
data
})
}
}
}
}
assets/images/boutique/tipsPopupBg.png
0 → 100644
View file @
d0922c8
148 KB
components/PublishPopup.vue
View file @
d0922c8
...
@@ -3,16 +3,21 @@
...
@@ -3,16 +3,21 @@
<page-meta
:page-style=
"'overflow:' + (show ? 'hidden' : 'visible')"
></page-meta>
<page-meta
:page-style=
"'overflow:' + (show ? 'hidden' : 'visible')"
></page-meta>
<uni-popup
:class=
"popupClass"
ref=
"publishPopup"
:type=
"type"
@
change=
"change"
:is-mask-click=
"isMaskClick"
:safe-area=
"safeArea"
:showClose=
"showClose"
>
<uni-popup
:class=
"popupClass"
ref=
"publishPopup"
:type=
"type"
@
change=
"change"
:is-mask-click=
"isMaskClick"
:safe-area=
"safeArea"
:showClose=
"showClose"
>
<!-- 顶部标题栏插槽 -->
<!-- 顶部标题栏插槽 -->
<slot
name=
"header"
>
<slot
name=
"header"
></slot
>
<view
class=
"popup-top-box flex align-center"
>
<view
class=
"popup-top-box flex align-center"
v-if=
"showTitle"
>
<text
class=
"popup-top-box-title"
>
{{
title
}}
</text>
<text
class=
"popup-top-box-title"
>
{{
title
}}
</text>
<uni-icons
@
click=
"closePopup"
class=
"icon-close"
type=
"closeempty"
></uni-icons>
<uni-icons
@
click=
"closePopup"
class=
"icon-close"
type=
"closeempty"
></uni-icons>
</view>
</view>
</slot>
</slot>
<!-- 主要内容插槽 -->
<!-- 主要内容插槽 -->
<slot
name=
"content"
></slot>
<slot
name=
"content"
></slot>
<!-- 底部插槽 -->
<!-- 底部插槽 插槽有内容就优先自定义内容-->
<slot
name=
"footer"
></slot>
<slot
name=
"footer"
>
<view
class=
"footer-box flex justify-center"
>
<view
class=
"cancle-btn btn"
@
click
.
stop=
"closePopup"
>
取消
</view>
<view
class=
"sure-btn btn"
@
click
.
stop=
"confirm"
>
确认
</view>
</view>
</slot>
</uni-popup>
</uni-popup>
</
template
>
</
template
>
...
@@ -43,7 +48,12 @@ export default {
...
@@ -43,7 +48,12 @@ export default {
title
:
{
title
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
}
},
showTitle
:{
type
:
Boolean
,
default
:
true
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -51,7 +61,7 @@ export default {
...
@@ -51,7 +61,7 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
open
()
{
open
(
callback
)
{
this
.
$refs
.
publishPopup
.
open
()
this
.
$refs
.
publishPopup
.
open
()
},
},
change
(
e
)
{
change
(
e
)
{
...
@@ -60,6 +70,9 @@ export default {
...
@@ -60,6 +70,9 @@ export default {
closePopup
()
{
closePopup
()
{
this
.
$refs
.
publishPopup
.
close
()
this
.
$refs
.
publishPopup
.
close
()
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
},
confirm
()
{
this
.
$emit
(
'confirm'
)
}
}
}
}
}
}
...
@@ -92,4 +105,31 @@ export default {
...
@@ -92,4 +105,31 @@ export default {
font-size
:
toRpx
(
24
);
font-size
:
toRpx
(
24
);
font-weight
:
600
;
font-weight
:
600
;
}
}
.footer-box
{
width
:
100%
;
height
:
toRpx
(
164
);
background-color
:
#fff
;
position
:
absolute
;
border-radius
:
0
0
toRpx
(
42
)
toRpx
(
42
);
bottom
:
0
;
.btn
{
width
:
40%
;
height
:
toRpx
(
80
);
border-radius
:
toRpx
(
48
);
opacity
:
1
;
line-height
:
toRpx
(
80
);
text-align
:
center
;
color
:
rgba
(
26
,
26
,
26
,
0.6
);
font-size
:
toRpx
(
32
);
font-weight
:
500
;
}
.cancle-btn
{
background
:
#f0f1f5
;
}
.sure-btn
{
color
:
#fff
;
background
:
linear-gradient
(
0deg
,
#2c66f7
0%
,
#48a6ff
100%
);
margin-left
:
toRpx
(
32
);
}
}
</
style
>
</
style
>
pages/boutique/components/OrderCard.vue
View file @
d0922c8
...
@@ -249,30 +249,6 @@ export default {
...
@@ -249,30 +249,6 @@ export default {
}
}
this
.
$refs
.
recordOrderPopup
.
open
()
this
.
$refs
.
recordOrderPopup
.
open
()
// this.uni.showModal({
// show: true,
// title: '请选择录单入口',
// tabTitleShow: false,
// success: async res => {
// // 跳转新增订单页面 并带特定参数
// console.log(item, 'showSelectType')
// if (this.selectType == 1) {
// if (await this.inspectionOfProhibitionBill()) return
// wx.$router.go('tabWorkOrder.createOrder', {
// scene,
// ...item
// })
// } else {
// wx.$router.go('tabWorkOrder.defeatOrder', {
// scene,
// ...item,
// isExpiredTraffic: this.selectType == 3
// })
// }
// },
// error: () => {}
// })
},
},
// 获取轻改录单配置是否启用流量失效
// 获取轻改录单配置是否启用流量失效
...
@@ -294,10 +270,13 @@ export default {
...
@@ -294,10 +270,13 @@ export default {
if
(
this
.
selectType
==
1
)
{
if
(
this
.
selectType
==
1
)
{
console
.
log
(
await
this
.
inspectionOfProhibitionBill
())
console
.
log
(
await
this
.
inspectionOfProhibitionBill
())
if
(
await
this
.
inspectionOfProhibitionBill
())
return
if
(
await
this
.
inspectionOfProhibitionBill
())
return
this
.
$emit
(
'jump'
,
'CreateOrder'
)
this
.
$emit
(
'jump'
,
'CreateOrder'
,
this
.
orderCardDetail
)
}
else
{
}
else
{
this
.
$emit
(
'jump'
,
'DefeatOrder'
)
this
.
$emit
(
'jump'
,
'DefeatOrder'
)
}
}
},
cancelSelection
()
{
this
.
$refs
.
recordOrderPopup
.
closePopup
()
}
}
}
}
}
}
...
...
pages/boutique/tool/components/ConfirmOrder.vue
View file @
d0922c8
...
@@ -6,6 +6,16 @@
...
@@ -6,6 +6,16 @@
<text
class=
"fs-16 fw-7"
>
等待客户付款
</text>
<text
class=
"fs-16 fw-7"
>
等待客户付款
</text>
<text
class=
"fs-13 ml-12"
>
点击下一步,锁定并生成工单码。
</text>
<text
class=
"fs-13 ml-12"
>
点击下一步,锁定并生成工单码。
</text>
</view>
</view>
<view
v-if=
"!isErrorOrder && (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7)"
class=
"box date-box box-shell flex justify-between align-center"
>
<view
class=
"date-box-label"
>
收款时间
<text
class=
"required"
>
*
</text>
</view>
<view
class=
"flex justify-between align-center"
>
<view
class=
"date-box-value"
>
{{
successDate
}}
</view>
<view
class=
"handlerBtn"
@
click=
"toshowDateModal"
>
编辑
</view>
</view>
</view>
<!-- 商品信息 -->
<!-- 商品信息 -->
<view
class=
"box-shell"
>
<view
class=
"box-shell"
>
<view
class=
"box-shell-title"
>
商品信息
</view>
<view
class=
"box-shell-title"
>
商品信息
</view>
...
@@ -55,7 +65,7 @@
...
@@ -55,7 +65,7 @@
<view
v-else
>
{{
orderInfo
[
item
.
key
]
||
''
}}
</view>
<view
v-else
>
{{
orderInfo
[
item
.
key
]
||
''
}}
</view>
</view>
</view>
</view>
</view>
<view
v-if=
"item.copy"
class=
"copy-btn"
@
click=
"
copyText
"
>
<view
v-if=
"item.copy"
class=
"copy-btn"
@
click=
"
setCopyData(orderInfo[item.key])
"
>
<view
class=
"sprite-icon icon-icon-copy copy"
></view>
<view
class=
"sprite-icon icon-icon-copy copy"
></view>
</view>
</view>
</view>
</view>
...
@@ -90,10 +100,10 @@
...
@@ -90,10 +100,10 @@
<view
class=
"label"
>
{{
item
.
label
}}
</view>
<view
class=
"label"
>
{{
item
.
label
}}
</view>
<view
class=
"value"
:style=
"
{ color: item.color || '#333' }">
<view
class=
"value"
:style=
"
{ color: item.color || '#333' }">
<view
v-if=
"item.arr"
>
<view
v-if=
"item.arr"
>
<view
v-if=
"orderInfo[item.arr[1]]"
>
<view
v-if=
"orderInfo[item.arr[1]]"
class=
"flex"
>
<view
v-for=
"(i, ind) in item.arr"
:key=
"ind"
>
<view
v-for=
"(i, ind) in item.arr"
:key=
"ind"
>
<view
class=
"value-item text-hide"
>
<view
class=
"value-item text-hide"
>
<text
v-if=
"ind == 1"
>
|
</text>
<text
v-if=
"ind == 1"
class=
"lineText"
>
|
</text>
{{
orderInfo
[
i
]
}}
{{
orderInfo
[
i
]
}}
</view>
</view>
</view>
</view>
...
@@ -102,12 +112,9 @@
...
@@ -102,12 +112,9 @@
<view
v-else
>
<view
v-else
>
{{
item
.
enum
?
item
.
enum
[
orderInfo
[
item
.
key
]]
:
orderInfo
[
item
.
key
]
||
''
}}
{{
item
.
enum
?
item
.
enum
[
orderInfo
[
item
.
key
]]
:
orderInfo
[
item
.
key
]
||
''
}}
</view>
</view>
<view
v-if=
"item.copy"
>
<view
class=
"copy"
@
click=
"setCopyData"
>
<!-- 复制 -->
<!--
<image
src=
"
{{
IMG_URL
}}
copy_icon_gapy.png" class="copyImage" binderror="" bindload="">
</image>
-->
</view>
</view>
</view>
<view
v-if=
"item.copy"
class=
"copy-btn"
@
click=
"setCopyData(orderInfo[item.key])"
>
<view
class=
"sprite-icon icon-icon-copy copy"
></view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -122,16 +129,32 @@
...
@@ -122,16 +129,32 @@
</view>
</view>
<view
class=
"flex align-center footer-box justify-center"
>
<view
class=
"flex align-center footer-box justify-center"
>
<view
class=
"edit btn"
>
修改
</view>
<view
class=
"edit btn"
@
clcik=
"edit"
>
修改
</view>
<view
class=
"confirm btn"
>
确认
</view>
<view
class=
"confirm btn"
@
click=
"confirm"
>
确认
</view>
</view>
</view>
<PublishPopup
ref=
"tipsPopup"
popupClass=
"tipsPopup"
type=
"center"
:showClose=
"true"
:showTitle=
"false"
@
confirm=
"confirmTips"
>
<template
#
content
>
<view>
<image
class=
"tipsPopupBg"
src=
"@/assets/images/boutique/tipsPopupBg.png"
/>
<view
class=
"title"
>
重要提示
</view>
<view
class=
"tipsConent"
>
<view>
请检查店内是否配备POS机,确认信息后该工单将无法撤销或修改!
</view>
<view>
若4S店已向车主收款,请返回修改支付方式为
</view>
<text>
"门店收款"
</text>
</view>
</view>
</view>
</view>
</
template
>
</PublishPopup>
<OrderPopup
:orderType=
"orderInfo.selectPayType"
v-if=
"showPopup"
:show=
"showPopup"
:qrCode=
"orderInfo.payOrder.outTradeNo || ''"
:price=
"orderInfo.total_price"
:orderCode=
"orderInfo.orderCode"
/>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
import
utils
from
'@/utils/utils'
import
utils
from
'@/utils/utils'
import
order_mixins
from
'../../order_mixins.js'
import
order_mixins
from
'../../order_mixins.js'
import
dayjs
from
'dayjs'
import
dayjs
from
'dayjs'
import
PublishPopup
from
'@/components/PublishPopup.vue'
import
OrderPopup
from
'@/components/OrderPopup/index.vue'
export
default
{
export
default
{
name
:
'OrderConfirm'
,
name
:
'OrderConfirm'
,
props
:
{
props
:
{
...
@@ -140,6 +163,9 @@ export default {
...
@@ -140,6 +163,9 @@ export default {
default
:
()
=>
({})
default
:
()
=>
({})
}
}
},
},
components
:
{
PublishPopup
},
data
()
{
data
()
{
return
{
return
{
...
order_mixins
.
data
,
...
order_mixins
.
data
,
...
@@ -150,7 +176,9 @@ export default {
...
@@ -150,7 +176,9 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
getPositionList
()
this
.
getPositionList
()
this
.
getDetail
(
'250819144103724'
)
// 250819144103724
this
.
getDetail
(
'250818205800944'
)
this
.
successDate
=
dayjs
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
},
methods
:
{
methods
:
{
replaceItemText
(
item
)
{
replaceItemText
(
item
)
{
...
@@ -298,11 +326,135 @@ export default {
...
@@ -298,11 +326,135 @@ export default {
async
getPositionList
()
{
async
getPositionList
()
{
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getPositionList
({})
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getPositionList
({})
this
.
positionTypeList
=
res
this
.
positionTypeList
=
res
},
setCopyData
(
e
)
{
utils
.
setCopyData
(
`
${
e
}
`
)
},
confirm
()
{
this
.
checkPayType
()
},
edit
()
{
this
.
$emit
(
'jump'
,
'CreateOrder'
,
this
.
orderInfo
)
},
checkPayType
()
{
let
_this
=
this
// 微信支付
if
(
this
.
orderInfo
.
selectPayType
==
1
)
{
// _this.setData({
// showPopup: true,
// });
_this
.
getDetail
(
this
.
orderInfo
.
orderCode
)
if
(
!
time
)
{
time
=
setInterval
(()
=>
{
_this
.
getDetail
(
_this
.
orderInfo
.
orderCode
)
},
5
*
1000
)
}
return
false
}
// pos机支付
if
(
this
.
orderInfo
.
selectPayType
==
3
)
{
if
(
this
.
orderInfo
.
status
==
1
)
{
this
.
$refs
.
tipsPopup
.
open
()
}
else
{
_this
.
createPayOrder
()
}
}
else
{
console
.
log
(
'支付完成'
)
if
(
!
this
.
successDate
&&
!
this
.
isErrorOrder
&&
this
.
orderInfo
.
selectPayType
!=
0
)
return
uni
.
showToast
({
title
:
this
.
orderInfo
.
selectPayType
==
2
?
'请选择4S店收款时间'
:
'请选择嘀加收款时间'
})
this
.
showPopup
=
true
}
},
confirmTips
()
{
this
.
createPayOrder
()
},
createPayOrder
()
{
let
{
orderInfo
:
{
selectPayType
,
orderCode
,
payeeType
},
outTradeNo
,
payVoucherList
,
successDate
,
isErrorOrder
}
=
this
let
obj
=
{
orderCode
,
payType
:
selectPayType
,
payeeType
:
payeeType
}
// 支付方式 2:门店收款 5:嘀加收款 6:对公转账 7:其它收款
if
([
2
,
5
,
6
,
7
].
includes
(
Number
(
selectPayType
))
&&
!
isErrorOrder
)
{
obj
.
successDate
=
new
Date
(
successDate
).
format
(
'yyyy-MM-dd hh:mm:ss'
)
}
if
(
payVoucherList
?.
length
&&
outTradeNo
)
{
obj
.
payVoucherList
=
payVoucherList
.
map
(
v
=>
{
return
v
?.
url
})
obj
.
outTradeNo
=
outTradeNo
}
console
.
log
(
obj
)
uni
.
showLoading
()
// 状态更新 需刷新工单列表和预约管理列表
utils
.
refreshPageData
()
uni
.
$api
.
boutiqueApi
.
createPayOrder
(
obj
).
then
(
res
=>
{
console
.
log
(
res
)
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
wx
.
hideLoading
()
console
.
log
(
`类型为:
${
selectPayType
}
`
)
if
(
selectPayType
==
3
||
selectPayType
==
1
)
{
this
.
setData
({
[
'orderInfo.payOrder.outTradeNo'
]:
data
.
outTradeNo
,
showPopup
:
true
})
this
.
getDetail
(
orderCode
)
if
(
!
time
)
{
time
=
setInterval
(()
=>
{
// console.log('6666666666')
this
.
getDetail
(
orderCode
)
},
5
*
1000
)
}
}
else
{
wx
.
$router
.
redirectTo
(
'orderDetail'
,
data
)
}
}
else
{
wx
.
$util
.
showToast
(
message
)
}
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
//
Popup
样式
::v-deep
.tipsPopup
.uni-popup__wrapper
{
width
:
toRpx
(
848
);
height
:
toRpx
(
744
);
border-radius
:
toRpx
(
42
);
background
:
rgb
(
255
,
255
,
255
)
!important
;
.tipsPopupBg
{
border-radius
:
toRpx
(
42
)
toRpx
(
42
)
0
0
;
width
:
100%
;
height
:
toRpx
(
244
);
}
.title
{
color
:
#333333
;
font-size
:
toRpx
(
40
);
font-weight
:
500
;
text-align
:
center
;
margin-top
:
toRpx
(
48
);
}
.tipsConent
{
color
:
#666666
;
font-size
:
toRpx
(
32
);
font-weight
:
400
;
padding
:
toRpx
(
16
)
toRpx
(
64
);
line-height
:
toRpx
(
48
);
text
{
color
:
#347bff
;
}
}
}
.order-confirm
{
.order-confirm
{
position
:
relative
;
position
:
relative
;
height
:
100%
;
height
:
100%
;
...
@@ -348,6 +500,43 @@ export default {
...
@@ -348,6 +500,43 @@ export default {
.py-8
{
.py-8
{
padding
:
toRpx
(
8
)
0
;
padding
:
toRpx
(
8
)
0
;
}
}
.date-box
{
display
:
flex
;
align-items
:
center
;
position
:
relative
;
}
.date-box-label
{
font-weight
:
400
;
font-size
:
toRpx
(
28
);
color
:
#333333
;
}
.date-box-value
{
font-weight
:
500
;
font-size
:
toRpx
(
40
);
color
:
#333333
;
}
.required
{
color
:
#f00
;
margin-left
:
toRpx
(
8
);
}
.handlerBtn
{
color
:
#4673ff
;
font-size
:
toRpx
(
26
);
font-weight
:
400
;
margin-left
:
toRpx
(
8
);
}
.copy-btn
{
display
:
flex
;
align-items
:
center
;
color
:
#808291
;
.copy
{
margin-right
:
toRpx
(
8
);
margin-left
:
toRpx
(
20
);
}
}
.top-tips
{
.top-tips
{
width
:
100%
;
width
:
100%
;
height
:
toRpx
(
48
);
height
:
toRpx
(
48
);
...
@@ -422,6 +611,9 @@ export default {
...
@@ -422,6 +611,9 @@ export default {
}
}
.order-info
{
.order-info
{
.value
.value-item
text
{
margin
:
0
toRpx
(
6
);
}
.label
{
.label
{
width
:
toRpx
(
156
);
width
:
toRpx
(
156
);
color
:
#999999
;
color
:
#999999
;
...
...
utils/utils.js
View file @
d0922c8
...
@@ -238,6 +238,24 @@ const showNoAccess = () => {
...
@@ -238,6 +238,24 @@ const showNoAccess = () => {
icon
:
'error'
icon
:
'error'
})
})
}
}
/**设置粘贴板内容 */
const
setCopyData
=
(
data
,
callBack
)
=>
{
console
.
log
(
data
,
'setCopyData'
)
uni
.
setClipboardData
({
data
:
data
,
success
(
res
)
{
console
.
log
(
res
,
'setCopyData'
)
if
(
callBack
&&
typeof
callBack
===
'function'
)
callBack
(
res
)
}
})
}
/** 刷新工单管理 预约管理数据 */
const
refreshPageData
=
notRefreshOrder
=>
{
if
(
!
notRefreshOrder
)
getApp
().
globalData
.
orderListRefresh
=
true
getApp
().
globalData
.
dateListRefresh
=
true
getApp
().
globalDataorderListDateListScreenRefresh
=
true
}
export
default
{
export
default
{
compareVersions
,
compareVersions
,
convertDateTimeFormat
,
convertDateTimeFormat
,
...
@@ -255,5 +273,7 @@ export default {
...
@@ -255,5 +273,7 @@ export default {
getViewInfo
,
getViewInfo
,
setPrice
,
setPrice
,
decimal
,
decimal
,
showNoAccess
showNoAccess
,
setCopyData
,
refreshPageData
}
}
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