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 b689b6c3
authored
Aug 19, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'V4.56.0' of
http://192.168.3.233:8090/glsx/gl_tape
into V4.56.0
2 parents
1700b95e
dc1a2119
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
221 additions
and
72 deletions
api/module/boutique.js
assets/css/sprite.scss
assets/images/sprite.png
pages/boutique/tool/components/ConfirmOrder.vue
pages/boutique/tool/components/CreateOrder.vue
pages/boutique/tool/index.vue
api/module/boutique.js
View file @
b689b6c
...
@@ -181,7 +181,7 @@ module.exports = {
...
@@ -181,7 +181,7 @@ module.exports = {
})
})
},
},
// 根据商户号获取可选商品列表
// 根据商户号获取可选商品列表
getSelectOrderGoodsList
(
data
){
getSelectOrderGoodsList
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.selectOrderGoods.list'
,
method
:
'dj.api.smartcarlife.selectOrderGoods.list'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -227,5 +227,9 @@ module.exports = {
...
@@ -227,5 +227,9 @@ module.exports = {
/** 获取商户基本信息 */
/** 获取商户基本信息 */
getServiceBaseInfo
(
data
)
{
getServiceBaseInfo
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo'
,
projectName
:
'boutique'
,
...
data
})
return
http
.
post
({
method
:
'dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo'
,
projectName
:
'boutique'
,
...
data
})
},
/**根据订单号获取订单详情(含套餐) */
getPackageGoodsDetail
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.packageGoodsDetail'
,
projectName
:
'boutique'
,
...
data
})
}
}
}
}
assets/css/sprite.scss
View file @
b689b6c
This diff is collapsed.
Click to expand it.
assets/images/sprite.png
View file @
b689b6c
2.56 MB
|
W:
|
H:
2.56 MB
|
W:
|
H:
2-up
Swipe
Onion skin
pages/boutique/tool/components/ConfirmOrder.vue
View file @
b689b6c
...
@@ -10,29 +10,29 @@
...
@@ -10,29 +10,29 @@
<view
class=
"box-shell"
>
<view
class=
"box-shell"
>
<view
class=
"box-shell-title"
>
商品信息
</view>
<view
class=
"box-shell-title"
>
商品信息
</view>
<view
class=
"good-list"
>
<view
class=
"good-list"
>
<view
class=
"good"
>
<view
class=
"good"
v-for=
"(item, index) in orderInfo.subOrderList"
>
<view
class=
"flex justify-between align-center"
>
<view
class=
"flex justify-between align-center"
>
<text
class=
"good-name"
>
商品名称:
</text>
<text
class=
"good-name"
>
商品名称:
{{
replaceItemText
(
item
.
upgradeGoodsName
)
||
''
}}
</text>
<text
class=
"good-price"
>
¥
1000
</text>
<text
class=
"good-price"
>
¥
{{
item
.
price
}}
</text>
</view>
</view>
<view
class=
"flex justify-between align-center pt-6"
>
<view
class=
"flex justify-between align-center pt-6"
>
<text
class=
"good-alias"
>
商品别名:
</text>
<text
class=
"good-alias"
>
商品别名:
{{
replaceItemText
(
item
.
upgradeGoodsAlias
)
||
''
}}
</text>
</view>
</view>
<view
class=
"flex align-center pt-12"
>
<view
class=
"flex align-center pt-12"
>
<text
class=
"good-sku"
>
天窗玻璃
</text>
<text
class=
"good-sku"
>
{{
item
.
positionStr
||
item
.
upgradeGoodsTypeName
}}
</text>
<text
class=
"good-count"
>
x
2
</text>
<text
class=
"good-count"
>
x
{{
item
.
number
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"flex align-center py-8"
>
<view
class=
"flex align-center py-8"
>
<view
class=
"sprite-icon icon-coupon fs-14"
></view>
<view
class=
"sprite-icon icon-coupon fs-14"
></view>
<text
class=
"fs-14 coupon-name"
>
贴膜抵用券GH647-039(系统
)
</text>
<text
class=
"fs-14 coupon-name"
>
{{
orderInfo
.
couponName
||
''
}}{{
orderInfo
.
customerCoupon
.
customerCouponCode
||
''
}}
(
{{
orderInfo
.
customerCoupon
.
employeeName
||
''
}}
)
</text>
</view>
</view>
<view
class=
"flex justify-end align-center"
>
<view
class=
"flex justify-end align-center"
>
<text
class=
"good-total-lable"
>
商品总金额:
</text>
<text
class=
"good-total-lable"
>
商品总金额:
</text>
<text
class=
"good-total-value"
>
<text
class=
"good-total-value"
>
<text
class=
"unit"
>
¥
</text>
<text
class=
"unit"
>
¥
</text>
{{
toPrice
(
218.98887
,
2
)
}}
{{
orderInfo
.
total_price
}}
</text>
</text>
</view>
</view>
</view>
</view>
...
@@ -43,9 +43,8 @@
...
@@ -43,9 +43,8 @@
<view
v-for=
"(item, index) in orderObj"
:key=
"index"
class=
"flex align-center pt-8"
>
<view
v-for=
"(item, index) in orderObj"
:key=
"index"
class=
"flex align-center pt-8"
>
<view
class=
"label"
>
{{
item
.
label
}}
</view>
<view
class=
"label"
>
{{
item
.
label
}}
</view>
<view
v-if=
"item.key == 'status'"
>
<view
v-if=
"item.key == 'status'"
>
<view
class=
"value"
:style=
"
{ color: item.constructionFlag == 'Y' ? status[orderInfo.status].color : '' }">
<view
class=
"value"
:style=
"
{ color: status[orderInfo.status].color || '' }">
<!--
{{
item
.
constructionFlag
==
'Y'
?
status
[
orderInfo
.
status
].
text
:
'待施工'
}}
-->
{{
status
[
orderInfo
.
status
].
text
}}
<!--
{{
status
[
orderInfo
.
status
].
text
}}
-->
</view>
</view>
</view>
</view>
<view
v-else
>
<view
v-else
>
...
@@ -56,10 +55,8 @@
...
@@ -56,10 +55,8 @@
<view
v-else
>
{{
orderInfo
[
item
.
key
]
||
''
}}
</view>
<view
v-else
>
{{
orderInfo
[
item
.
key
]
||
''
}}
</view>
</view>
</view>
</view>
</view>
<view
v-if=
"item.copy"
>
<view
v-if=
"item.copy"
class=
"copy-btn"
@
click=
"copyText"
>
<view
class=
"copy"
@
click=
"setCopyData"
>
<view
class=
"sprite-icon icon-icon-copy copy"
></view>
<!-- 复制 -->
</view>
</view>
</view>
</view>
</view>
<view
v-if=
"(orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length"
>
<view
v-if=
"(orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length"
>
...
@@ -134,22 +131,173 @@
...
@@ -134,22 +131,173 @@
<
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'
export
default
{
export
default
{
name
:
'OrderConfirm'
,
name
:
'OrderConfirm'
,
props
:
{
props
:
{
order
Info
:
{
order
ObjData
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
({})
default
:
()
=>
({})
}
}
},
},
data
()
{
data
()
{
return
{
return
{
...
order_mixins
.
data
...
order_mixins
.
data
,
positionTypeList
:
[],
isErrorOrder
:
false
,
orderInfo
:
{}
}
}
},
},
mounted
()
{
this
.
getPositionList
()
this
.
getDetail
(
'250819144103724'
)
},
methods
:
{
methods
:
{
toPrice
(
val
,
num
)
{
replaceItemText
(
item
)
{
return
Number
(
utils
.
decimal
(
val
,
num
)).
toFixed
(
2
)
var
reg
=
getRegExp
(
';~;'
,
'g'
)
return
item
?
item
.
replace
(
reg
,
' '
)
:
''
},
async
getDetail
(
orderCode
)
{
// console.log(orderCode)
let
_this
=
this
uni
.
$api
.
boutiqueApi
.
getPackageGoodsDetail
({
orderCode
})
.
then
(
data
=>
{
if
(
data
.
payOrder
&&
data
.
payOrder
.
payStatus
==
2
)
{
if
(
time
)
clearInterval
(
time
)
// wx.$router.redirectTo('orderDetail', {
// orderCode
// })
return
}
let
couponName
=
data
.
customerCoupon
?
data
.
customerCoupon
.
couponName
:
''
let
total_price
=
0
let
warrantyCardList
=
[]
for
(
var
i
=
0
;
i
<
data
?.
subOrderList
?.
length
;
i
++
)
{
let
e
=
data
?.
subOrderList
[
i
]
total_price
+=
e
.
totalPrice
e
.
price
=
Number
(
utils
.
decimal
(
Number
(
e
.
totalPrice
/
e
.
number
),
2
)).
toFixed
(
2
)
e
.
positionStr
=
this
.
positionTypeList
.
filter
(
v
=>
v
.
positionValue
==
e
.
upgradeGoodsPosition
)[
0
]?.
positionName
||
''
if
(
e
.
upgradeWarrantyPeriod
||
e
.
upgradeWarrantyPeriod
>
0
)
{
warrantyCardList
.
push
({
warrantyPeriod
:
e
.
upgradeWarrantyPeriod
,
goodsName
:
e
.
upgradeGoodsAlias
||
e
.
upgradeGoodsName
})
}
}
data
.
packageGoodsList
?.
forEach
(
item
=>
{
item
.
packageGoodsOrderList
.
forEach
(
g
=>
{
g
.
price
=
g
.
totalPrice
?
Number
(
g
.
totalPrice
)
/
Number
(
g
.
number
)
:
g
.
upgradePrice
})
item
.
goodsList
=
item
.
packageGoodsOrderList
item
.
price
=
item
.
goodsList
.
reduce
((
prev
,
cur
)
=>
{
return
prev
+
Number
(
cur
.
totalPrice
)
/
Number
(
cur
.
number
)
},
0
)
item
.
count
=
item
.
goodsList
.
length
?
item
.
goodsList
[
0
].
number
:
1
let
total
=
item
.
price
*
item
.
count
item
.
totalPrice
=
utils
.
decimal
(
total
,
2
)
item
.
packageGoodsOrderList
.
forEach
(
g
=>
{
g
.
positionStr
=
this
.
positionTypeList
.
filter
(
v
=>
v
.
positionValue
==
g
.
upgradeGoodsPosition
)[
0
]?.
positionName
||
''
})
total_price
+=
item
.
totalPrice
})
data
=
{
...
data
.
customer
,
...
data
.
payOrder
,
...
data
,
packageGoodsList
:
data
.
packageGoodsList
,
couponName
,
total_price
:
Number
(
utils
.
decimal
(
total_price
,
2
)).
toFixed
(
2
)
}
if
(
data
.
orderTime
)
data
.
time
=
dayjs
(
new
Date
(
data
.
orderTime
)).
format
(
'YYYY-MM-DD HH:mm:ss'
)
if
(
data
.
customerCoupon
)
{
data
.
customerCoupon
.
customerCouponCode
=
data
.
customerCoupon
.
customerCouponCode
.
split
(
'-'
)[
0
]
}
if
(
data
.
customer
.
carSeriesName
)
{
data
.
carType
=
`
${
data
.
customer
.
carBrand
||
''
}
-
${
data
.
customer
.
carChildsBrandName
||
''
}
-
${
data
.
customer
.
carSeriesName
||
''
}
`
}
_this
.
orderInfo
=
data
_this
.
flag
=
true
_this
.
warrantyCardList
=
warrantyCardList
// 校验是否显示二级流量方
if
(
data
.
subShopMerchantName
)
{
if
(
_this
.
customerObj
.
findIndex
(
val
=>
val
?.
key
&&
val
.
key
==
'subShopMerchantName'
)
<
0
)
{
_this
.
customerObj
[
_this
.
customerObj
.
length
-
2
]
=
{
label
:
'二级流量方'
,
key
:
'subShopMerchantName'
}
}
}
// 是2:门店收款 5:嘀加收款 6:对公转账 7:其它收款并且不是错误订单 自动打开门店收款弹窗
if
(
!
_this
.
isErrorOrder
&&
[
2
,
5
,
6
,
7
].
includes
(
Number
(
data
.
selectPayType
)))
{
_this
.
toshowDateModal
()
}
// 获取园区店技师配置信息
uni
.
$api
.
boutiqueApi
.
getQYTechnicianList
({
yqMerchantId
:
uni
.
$storage
.
get
(
'userInfo'
)?.
merchantId
})
.
then
(
respone
=>
{
if
(
respone
?.
code
==
0
)
{
if
(
respone
?.
data
.
length
>
0
)
this
.
isArtificer
(
respone
.
data
)
}
})
// } else {
// wx.showModal({
// title: '温馨提示',
// content: message,
// showCancel: false,
// confirmText: '刷新',
// confirmColor: '#347BFF',
// success(res) {
// if (res.confirm) {
// _this.getDetail(orderCode)
// }
// }
// })
// }
})
},
async
getPackageGoodsDetail
(
orderCode
)
{
try
{
let
params
=
{
orderCode
}
let
{
total_price
}
=
this
.
data
.
orderInfo
uni
.
$api
.
boutiqueApi
.
getPackageGoodsDetail
(
params
).
then
(
res
=>
{
res
.
data
?.
packageGoodsList
.
forEach
(
item
=>
{
item
.
packageGoodsOrderList
.
forEach
(
g
=>
{
g
.
price
=
g
.
totalPrice
?
Number
(
g
.
totalPrice
)
/
Number
(
g
.
number
)
:
g
.
upgradePrice
})
item
.
goodsList
=
item
.
packageGoodsOrderList
item
.
price
=
item
.
goodsList
.
reduce
((
prev
,
cur
)
=>
{
return
prev
+
Number
(
cur
.
totalPrice
)
/
Number
(
cur
.
number
)
},
0
)
item
.
count
=
item
.
goodsList
.
length
?
item
.
goodsList
[
0
].
number
:
1
let
total
=
item
.
price
*
item
.
count
item
.
totalPrice
=
utils
.
decimal
(
total
,
2
)
item
.
packageGoodsOrderList
.
forEach
(
g
=>
{
g
.
positionStr
=
this
.
positionTypeList
.
filter
(
v
=>
v
.
positionValue
==
g
.
upgradeGoodsPosition
)[
0
]?.
positionName
||
''
})
total_price
=
Number
(
total_price
)
+
Number
(
item
.
totalPrice
)
})
if
(
res
.
code
==
0
)
{
this
.
setData
({
packageGoodsList
:
res
.
data
.
packageGoodsList
,
'orderInfo.total_price'
:
Number
(
utils
.
decimal
(
total_price
,
2
)).
toFixed
(
2
)
})
}
})
}
catch
(
err
)
{}
},
async
getPositionList
()
{
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getPositionList
({})
this
.
positionTypeList
=
res
}
}
}
}
}
}
...
...
pages/boutique/tool/components/CreateOrder.vue
View file @
b689b6c
...
@@ -4,8 +4,7 @@
...
@@ -4,8 +4,7 @@
<view
class=
"box"
>
<view
class=
"box"
>
<scroll-view
class=
"scroll-view"
scroll-y=
"true"
>
<scroll-view
class=
"scroll-view"
scroll-y=
"true"
>
<view
class=
"box-content"
>
<view
class=
"box-content"
>
<GlCell
:formList=
"formList"
:formData=
"orderObj"
@
radioChange=
"radioChange"
@
inputBlur=
"inputBlur"
<GlCell
:formList=
"formList"
:formData=
"orderObj"
@
radioChange=
"radioChange"
@
inputBlur=
"inputBlur"
@
handleCell=
"handleCell"
>
@
handleCell=
"handleCell"
>
<template
slot=
"frontGear"
>
<template
slot=
"frontGear"
>
<Product
v-if=
"orderObj.frontGear && orderObj.frontGear.length"
:list=
"orderObj.frontGear"
:positionTypeList=
"positionTypeList"
:baseConfigData=
"baseConfigData"
></Product>
<Product
v-if=
"orderObj.frontGear && orderObj.frontGear.length"
:list=
"orderObj.frontGear"
:positionTypeList=
"positionTypeList"
:baseConfigData=
"baseConfigData"
></Product>
</
template
>
</
template
>
...
@@ -21,13 +20,12 @@
...
@@ -21,13 +20,12 @@
</scroll-view>
</scroll-view>
</view>
</view>
<!-- 弹窗 -->
<!-- 弹窗 -->
<order-popup
ref=
"orderPopup"
:data=
"orderObj"
:dataKey=
"valueKey"
@
onConfirm=
"onConfirm"
:externalData=
"externalData"
<order-popup
ref=
"orderPopup"
:data=
"orderObj"
:dataKey=
"valueKey"
@
onConfirm=
"onConfirm"
:externalData=
"externalData"
:popupType=
"popupType"
/>
:popupType=
"popupType"
/>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
import
utils
from
"@/utils/utils"
;
import
utils
from
'@/utils/utils'
import
OrderPopup
from
'@/components/OrderPopup/index.vue'
import
OrderPopup
from
'@/components/OrderPopup/index.vue'
import
GlCell
from
'../../../../components/Form/GlCell.vue'
import
GlCell
from
'../../../../components/Form/GlCell.vue'
import
Product
from
'./Product.vue'
import
Product
from
'./Product.vue'
...
@@ -69,7 +67,7 @@ export default {
...
@@ -69,7 +67,7 @@ export default {
experienceFlag
:
'Y'
,
experienceFlag
:
'Y'
,
payeeType
:
1
,
payeeType
:
1
,
salesType
:
'0'
,
salesType
:
'0'
,
frontGear
:
null
,
frontGear
:
null
},
// 弹窗传入的数据},
},
// 弹窗传入的数据},
popupType
:
0
,
popupType
:
0
,
popupTypeEnum
,
popupTypeEnum
,
...
@@ -82,7 +80,7 @@ export default {
...
@@ -82,7 +80,7 @@ export default {
payTypeList
,
payTypeList
,
goodsList
:
[],
goodsList
:
[],
positionTypeList
:
[],
positionTypeList
:
[],
valueKey
:
''
,
valueKey
:
''
}
}
},
},
computed
:
{
computed
:
{
...
@@ -125,21 +123,21 @@ export default {
...
@@ -125,21 +123,21 @@ export default {
handleCell
(
val
)
{
handleCell
(
val
)
{
console
.
log
(
val
,
this
.
orderObj
)
console
.
log
(
val
,
this
.
orderObj
)
// 获取当前选中的popupType
// 获取当前选中的popupType
this
.
popupType
=
Object
.
keys
(
this
.
popupTypeEnum
).
find
(
key
=>
this
.
popupTypeEnum
[
key
].
key
===
val
.
value
)
*
1
;
this
.
popupType
=
Object
.
keys
(
this
.
popupTypeEnum
).
find
(
key
=>
this
.
popupTypeEnum
[
key
].
key
===
val
.
value
)
*
1
// 获取对应的list字段
// 获取对应的list字段
const
popupConfig
=
this
.
popupTypeEnum
[
this
.
popupType
]
;
const
popupConfig
=
this
.
popupTypeEnum
[
this
.
popupType
]
if
(
popupConfig
&&
popupConfig
.
list
)
{
if
(
popupConfig
&&
popupConfig
.
list
)
{
this
.
externalData
=
this
[
popupConfig
.
list
]
||
[]
;
this
.
externalData
=
this
[
popupConfig
.
list
]
||
[]
}
else
{
}
else
{
this
.
externalData
=
[]
;
this
.
externalData
=
[]
}
}
// 定义产品相关字段数组
// 定义产品相关字段数组
const
productFields
=
[
'frontGear'
,
'frontWindow'
,
'rearGear'
,
'rearWindow'
,
'sunRoof'
]
;
const
productFields
=
[
'frontGear'
,
'frontWindow'
,
'rearGear'
,
'rearWindow'
,
'sunRoof'
]
if
(
productFields
.
includes
(
val
.
value
))
{
if
(
productFields
.
includes
(
val
.
value
))
{
this
.
valueKey
=
val
.
value
;
this
.
valueKey
=
val
.
value
}
}
console
.
log
(
this
.
popupType
,
this
.
externalData
,
'-------------'
)
console
.
log
(
this
.
popupType
,
this
.
externalData
,
'-------------'
)
this
.
$refs
.
orderPopup
.
open
()
;
this
.
$refs
.
orderPopup
.
open
()
},
},
// 单选框change事件
// 单选框change事件
radioChange
(
e
,
val
)
{
radioChange
(
e
,
val
)
{
...
@@ -153,7 +151,7 @@ export default {
...
@@ -153,7 +151,7 @@ export default {
console
.
log
(
val
,
'onConfirm'
)
console
.
log
(
val
,
'onConfirm'
)
const
{
chooseContent
}
=
val
const
{
chooseContent
}
=
val
// 根据popupTypeEnum优化处理
// 根据popupTypeEnum优化处理
const
_typeValue
=
this
.
popupTypeEnum
[
this
.
popupType
]
;
const
_typeValue
=
this
.
popupTypeEnum
[
this
.
popupType
]
console
.
log
(
_typeValue
)
console
.
log
(
_typeValue
)
if
(
_typeValue
.
key
==
'carBrand'
)
{
if
(
_typeValue
.
key
==
'carBrand'
)
{
// 车型
// 车型
...
@@ -185,71 +183,71 @@ export default {
...
@@ -185,71 +183,71 @@ export default {
this
.
orderObj
.
customer
[
val
.
value
]
=
this
.
orderObj
[
val
.
value
]
this
.
orderObj
.
customer
[
val
.
value
]
=
this
.
orderObj
[
val
.
value
]
},
},
checkRequired
()
{
checkRequired
()
{
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
;
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
// 把formList中所有required为true的对象放到一个数组中
// 把formList中所有required为true的对象放到一个数组中
const
requiredArr
=
[]
;
const
requiredArr
=
[]
const
onlyLabelItem
=
[]
;
const
onlyLabelItem
=
[]
this
.
formList
.
forEach
(
group
=>
{
this
.
formList
.
forEach
(
group
=>
{
group
.
forEach
(
item
=>
{
group
.
forEach
(
item
=>
{
if
(
item
.
required
===
true
&&
item
.
hidden
!==
true
)
{
if
(
item
.
required
===
true
&&
item
.
hidden
!==
true
)
{
if
(
item
.
onlyLabel
===
true
)
{
if
(
item
.
onlyLabel
===
true
)
{
onlyLabelItem
.
push
(
item
)
;
onlyLabelItem
.
push
(
item
)
}
else
{
}
else
{
requiredArr
.
push
(
item
)
;
requiredArr
.
push
(
item
)
}
}
}
}
})
;
})
})
;
})
// 遍历requiredArr,检查orderObj中是否有对应的值
// 遍历requiredArr,检查orderObj中是否有对应的值
for
(
let
i
=
0
;
i
<
requiredArr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
requiredArr
.
length
;
i
++
)
{
const
item
=
requiredArr
[
i
]
;
const
item
=
requiredArr
[
i
]
// 兼容嵌套customer对象的情况
// 兼容嵌套customer对象的情况
let
value
;
let
value
if
(
item
.
value
===
'customerName'
||
item
.
value
===
'customerPhone'
||
item
.
value
===
'standNo'
||
item
.
value
===
'plateNumber'
)
{
if
(
item
.
value
===
'customerName'
||
item
.
value
===
'customerPhone'
||
item
.
value
===
'standNo'
||
item
.
value
===
'plateNumber'
)
{
value
=
this
.
orderObj
.
customer
?
this
.
orderObj
.
customer
[
item
.
value
]
:
undefined
;
value
=
this
.
orderObj
.
customer
?
this
.
orderObj
.
customer
[
item
.
value
]
:
undefined
}
else
{
}
else
{
value
=
this
.
orderObj
[
item
.
value
]
;
value
=
this
.
orderObj
[
item
.
value
]
}
}
// 0、false、'0'等视为有效,null/undefined/空字符串视为无效
// 0、false、'0'等视为有效,null/undefined/空字符串视为无效
if
(
value
===
undefined
||
value
===
null
||
value
===
''
)
{
if
(
value
===
undefined
||
value
===
null
||
value
===
''
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
`
${
item
.
label
}
不能为空`
,
title
:
`
${
item
.
label
}
不能为空`
,
icon
:
'none'
icon
:
'none'
})
;
})
return
false
;
return
false
}
}
// 如果是customerPhone,添加phoneRex校验
// 如果是customerPhone,添加phoneRex校验
if
(
item
.
value
===
'customerPhone'
&&
!
phoneRex
.
test
(
value
))
{
if
(
item
.
value
===
'customerPhone'
&&
!
phoneRex
.
test
(
value
))
{
uni
.
showToast
({
uni
.
showToast
({
title
:
`请输入正确的
${
item
.
label
}
`
,
title
:
`请输入正确的
${
item
.
label
}
`
,
icon
:
'none'
icon
:
'none'
})
;
})
return
false
;
return
false
}
}
}
}
// 处理onlyLabel为true的特殊校验
// 处理onlyLabel为true的特殊校验
if
(
onlyLabelItem
.
length
>
0
)
{
if
(
onlyLabelItem
.
length
>
0
)
{
// 检查frontGear、frontWindow、rearGear、rearWindow、sunRoof和couponInfo字段中是否至少有一个不为空
// 检查frontGear、frontWindow、rearGear、rearWindow、sunRoof和couponInfo字段中是否至少有一个不为空
const
labelFields
=
[
'frontGear'
,
'frontWindow'
,
'rearGear'
,
'rearWindow'
,
'sunRoof'
]
;
const
labelFields
=
[
'frontGear'
,
'frontWindow'
,
'rearGear'
,
'rearWindow'
,
'sunRoof'
]
const
hasValue
=
labelFields
.
some
(
field
=>
{
const
hasValue
=
labelFields
.
some
(
field
=>
{
console
.
log
(
field
,
this
.
orderObj
[
field
])
console
.
log
(
field
,
this
.
orderObj
[
field
])
const
value
=
this
.
orderObj
[
field
]
;
const
value
=
this
.
orderObj
[
field
]
return
value
!==
undefined
&&
value
!==
null
&&
(
Array
.
isArray
(
value
)
?
value
.
length
>
0
:
value
!==
''
)
;
return
value
!==
undefined
&&
value
!==
null
&&
(
Array
.
isArray
(
value
)
?
value
.
length
>
0
:
value
!==
''
)
})
;
})
console
.
log
(
hasValue
,
hasValue
)
console
.
log
(
hasValue
,
hasValue
)
if
(
!
hasValue
)
{
if
(
!
hasValue
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'请至少选择一个产品'
,
title
:
'请至少选择一个产品'
,
icon
:
'none'
icon
:
'none'
})
;
})
return
false
;
return
false
}
}
}
}
return
true
;
return
true
},
},
// 提交
// 提交
...
@@ -288,6 +286,7 @@ export default {
...
@@ -288,6 +286,7 @@ export default {
title
:
'保存成功'
,
title
:
'保存成功'
,
icon
:
'success'
icon
:
'success'
})
})
this
.
$emit
(
'jump'
,
'ConfirmOrder'
,
res
.
data
)
}
}
},
},
async
getShopMerchantPointConfig
(
merchantId
)
{
async
getShopMerchantPointConfig
(
merchantId
)
{
...
@@ -309,7 +308,7 @@ export default {
...
@@ -309,7 +308,7 @@ export default {
console
.
log
(
res
,
'流量方'
)
console
.
log
(
res
,
'流量方'
)
if
(
res
&&
res
.
length
)
{
if
(
res
&&
res
.
length
)
{
this
.
subShopMerchantList
=
res
this
.
subShopMerchantList
=
res
const
cell
=
this
.
formList
[
0
].
find
(
item
=>
item
.
label
===
'二级流量方'
)
;
const
cell
=
this
.
formList
[
0
].
find
(
item
=>
item
.
label
===
'二级流量方'
)
if
(
cell
)
{
if
(
cell
)
{
cell
.
hidden
=
false
cell
.
hidden
=
false
}
}
...
@@ -352,11 +351,11 @@ export default {
...
@@ -352,11 +351,11 @@ export default {
})
})
console
.
log
(
res
)
console
.
log
(
res
)
let
m
=
res
.
supportPayTypes
||
[]
let
m
=
res
.
supportPayTypes
||
[]
let
n
=
this
.
payTypeList
;
let
n
=
this
.
payTypeList
let
list
=
n
.
filter
(
(
k
)
=>
{
let
list
=
n
.
filter
(
k
=>
{
let
idx
=
m
.
find
(
(
j
)
=>
j
==
k
.
value
);
let
idx
=
m
.
find
(
j
=>
j
==
k
.
value
)
return
idx
>=
0
;
return
idx
>=
0
})
;
})
// this.configPayTypeList = list
// this.configPayTypeList = list
this
.
djPayList
=
[
this
.
djPayList
=
[
...
list
?.
filter
(
v
=>
!
[
2
,
5
].
includes
(
Number
(
v
.
value
))),
...
list
?.
filter
(
v
=>
!
[
2
,
5
].
includes
(
Number
(
v
.
value
))),
...
@@ -369,16 +368,14 @@ export default {
...
@@ -369,16 +368,14 @@ export default {
value
:
'7'
value
:
'7'
}
}
]
]
this
.
merchantPayList
=
[
this
.
merchantPayList
=
[...
list
?.
filter
(
v
=>
v
.
value
==
2
)]
...
list
?.
filter
(
v
=>
v
.
value
==
2
)
]
this
.
changePayee
()
this
.
changePayee
()
console
.
log
(
this
.
djPayList
,
this
.
merchantPayList
,
'list'
)
console
.
log
(
this
.
djPayList
,
this
.
merchantPayList
,
'list'
)
},
},
changePayee
()
{
changePayee
()
{
const
cell
=
this
.
formList
[
2
].
find
(
item
=>
item
.
value
===
'selectPayType'
)
;
const
cell
=
this
.
formList
[
2
].
find
(
item
=>
item
.
value
===
'selectPayType'
)
if
(
cell
)
{
if
(
cell
)
{
cell
.
radioList
=
this
.
orderObj
.
payeeType
==
1
?
this
.
merchantPayList
:
this
.
djPayList
;
cell
.
radioList
=
this
.
orderObj
.
payeeType
==
1
?
this
.
merchantPayList
:
this
.
djPayList
if
(
cell
.
radioList
&&
cell
.
radioList
.
length
>
0
)
{
if
(
cell
.
radioList
&&
cell
.
radioList
.
length
>
0
)
{
cell
.
current
=
cell
.
radioList
[
0
].
value
cell
.
current
=
cell
.
radioList
[
0
].
value
this
.
orderObj
.
selectPayType
=
cell
.
radioList
[
0
].
value
this
.
orderObj
.
selectPayType
=
cell
.
radioList
[
0
].
value
...
...
pages/boutique/tool/index.vue
View file @
b689b6c
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</view>
</view>
</view>
</view>
<view
class=
"detail-right"
>
<view
class=
"detail-right"
>
<component
:is=
"toolComponentName"
@
jump=
"jump"
:
selected-trade-data=
"selectedTrade
Data"
/>
<component
:is=
"toolComponentName"
@
jump=
"jump"
:
transmission-of-data=
"transmissionOf
Data"
/>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -43,7 +43,7 @@ export default {
...
@@ -43,7 +43,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
toolComponentName
:
''
,
toolComponentName
:
''
,
selectedTrade
Data
:
null
transmissionOf
Data
:
null
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -54,7 +54,7 @@ export default {
...
@@ -54,7 +54,7 @@ export default {
console
.
log
(
item
)
console
.
log
(
item
)
this
.
toolComponentName
=
item
.
name
this
.
toolComponentName
=
item
.
name
if
(
item
.
name
!==
'CreateOrder'
)
{
if
(
item
.
name
!==
'CreateOrder'
)
{
this
.
selectedTrade
Data
=
null
this
.
transmissionOf
Data
=
null
}
}
},
},
backPage
()
{
backPage
()
{
...
@@ -65,7 +65,7 @@ export default {
...
@@ -65,7 +65,7 @@ export default {
this
.
toolComponentName
=
name
this
.
toolComponentName
=
name
console
.
log
(
this
.
toolComponentName
)
console
.
log
(
this
.
toolComponentName
)
if
(
val
)
{
if
(
val
)
{
this
.
selectedTrade
Data
=
val
this
.
transmissionOf
Data
=
val
}
}
}
}
}
}
...
...
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