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 5122740f
authored
Aug 25, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 新增战败页面
1 parent
fa21bf06
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1103 additions
and
32 deletions
api/module/boutique.js
assets/images/boutique/filter.png
pages/boutique/components/OrderCard.vue
pages/boutique/tool/components/DefeatOrder.vue
pages/boutique/tool/components/OrderDetail.vue
pages/boutique/tool/components/OrderManagement.vue
pages/boutique/tool/contant.js
api/module/boutique.js
View file @
5122740
...
...
@@ -307,5 +307,13 @@ module.exports = {
createQrcodeImage
(
data
)
{
// dj.api.smartcarlife.serviceMerchant.getByMerchantId
return
http
.
post
({
method
:
'dj.api.smartcarlife.common.createWeappQrcode'
,
projectName
:
'boutique'
,
...
data
})
},
/** 不升级常用字符列表 */
getConfigList
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.config.list'
,
projectName
:
'boutique'
,
...
data
})
},
/** 战败订单批量补录 */
notUpgradeOrder
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.notUpgrade.batchInsert'
,
projectName
:
'boutique'
,
...
data
})
}
}
assets/images/boutique/filter.png
0 → 100644
View file @
5122740
1023 Bytes
pages/boutique/components/OrderCard.vue
View file @
5122740
...
...
@@ -271,7 +271,7 @@ export default {
if
(
await
this
.
inspectionOfProhibitionBill
())
return
this
.
$emit
(
'jump'
,
'CreateOrder'
,
this
.
orderCardDetail
)
}
else
{
this
.
$emit
(
'jump'
,
'DefeatOrder'
)
this
.
$emit
(
'jump'
,
'DefeatOrder'
,
this
.
orderCardDetail
)
}
},
cancelSelection
()
{
...
...
pages/boutique/tool/components/DefeatOrder.vue
View file @
5122740
<
template
>
<view>
<view
class=
"defeat-order"
>
<view
class=
"common-title"
>
战败录单
</view>
<view
class=
"box"
>
<scroll-view
class=
"scroll-view"
scroll-y=
"true"
>
<view
class=
"box-content"
>
<GlCell
:formList=
"formList"
:formData=
"orderObj"
@
radioChange=
"radioChange"
@
inputBlur=
"inputBlur"
@
handleCell=
"handleCell"
>
<!-- 使用v-for循环渲染产品组件,减少重复代码 -->
<template
v-for=
"(_, slotName) in productSlots"
:slot=
"slotName"
>
<Product
:key=
"slotName"
v-if=
"orderObj[slotName] && orderObj[slotName].length"
@
changeTotalPrice=
"changeTotalPrice"
:list=
"orderObj[slotName]"
:positionTypeList=
"positionTypeList"
:baseConfigData=
"baseConfigData"
></Product>
</
template
>
<
template
slot=
"package"
>
<Package
v-if=
"orderObj.package"
:list=
"orderObj.package"
:positionTypeList=
"positionTypeList"
></Package>
</
template
>
<
template
slot=
"skuGoods"
>
<SkuGoods
v-if=
"orderObj.skuGoods"
:list=
"orderObj.skuGoods"
:positionTypeList=
"positionTypeList"
:baseConfigData=
"baseConfigData"
></SkuGoods>
<view
class=
"total"
v-if=
"totalPrice > 0"
>
<view
class=
"total-left"
>
总价
</view>
<view
class=
"total-right"
>
¥
{{
totalPrice
}}
</view>
</view>
</
template
>
<
template
slot=
"otherPay"
>
<view
v-if=
"showPayTips"
class=
"pay-tips"
>
其他收款:当客户已向嘀加付款但无法使用流水补录时,新建工单应选择收款方为「嘀加收款」且支付方为「其他收款」。
</view>
</
template
>
<
template
slot=
"reasonList"
>
<view
class=
"reason-list flex flex-wrap"
>
<view
class=
"reason-item"
v-for=
"(item, index) in orderObj.shortcutList"
:key=
"index"
@
click=
"reasonClick(item.confValue)"
>
{{
item
.
confValue
}}
</view>
</view>
</
template
>
</GlCell>
</view>
<view
@
click=
"submit"
class=
"btn"
>
战败下单
</view>
</scroll-view>
</view>
<!-- 弹窗 -->
<order-popup
ref=
"orderPopup"
:data=
"orderObj"
:dataKey=
"valueKey"
@
onConfirm=
"onConfirm"
:externalData=
"externalData"
:popupType=
"popupType"
/>
</view>
</template>
<
script
>
import
utils
from
'@/utils/utils'
import
dayjs
from
'dayjs'
import
OrderPopup
from
'@/components/OrderPopup/index.vue'
import
GlCell
from
'../../../../components/Form/GlCell.vue'
import
Product
from
'./Product.vue'
import
Package
from
'./Package.vue'
import
SkuGoods
from
'./SkuGoods.vue'
import
{
DEFEAT_FORM_LIST
,
popupTypeEnum
,
payTypeList
}
from
'../contant'
export
default
{
name
:
'DefeatOrder'
,
components
:
{
GlCell
,
OrderPopup
,
Product
,
Package
,
SkuGoods
},
props
:
{
transmissionOfData
:
{
type
:
Object
,
default
:
()
=>
null
}
},
watch
:
{
transmissionOfData
:
{
handler
(
newVal
)
{
if
(
newVal
)
{
console
.
log
(
'接收到的交易数据:'
,
newVal
)
this
.
orderObj
.
customer
=
newVal
.
customer
}
},
immediate
:
true
}
},
data
()
{
return
{
orderCreateType
:
'createWithPay'
,
// supplementOrder(补录订单) createWithPay(新增)
formList
:
utils
.
deepClone
(
DEFEAT_FORM_LIST
),
userInfo
:
{},
baseConfigData
:
{},
requiredList
:
[],
// 录单设置的必填项
orderObj
:
{
customer
:
{},
customerSex
:
'1'
,
experienceFlag
:
'Y'
,
payeeType
:
1
,
salesType
:
'0'
,
frontGear
:
null
,
frontWindow
:
null
,
rearWindow
:
null
,
rearGear
:
null
,
sunRoof
:
null
},
// 弹窗传入的数据},
popupType
:
0
,
popupTypeEnum
,
externalData
:
[],
//弹窗接口数据
subShopMerchantList
:
[],
// 二级流量方列表
employeeList
:
[],
djPayList
:
[],
// 嘀加收款方对应支付方式
merchantPayList
:
[],
// 门店收款方对应支付方式
configPayTypeList
:
[],
// 园区店配置支持的支付方式
payTypeList
,
goodsList
:
[],
positionTypeList
:
[],
valueKey
:
''
,
totalPrice
:
0
,
// 产品槽位配置,用于循环渲染产品组件
productSlots
:
{
frontGear
:
true
,
frontWindow
:
true
,
rearGear
:
true
,
rearWindow
:
true
,
sunRoof
:
true
}
}
},
computed
:
{
showPayTips
()
{
if
(
this
.
orderObj
.
payeeType
==
0
&&
this
.
orderObj
.
selectPayType
==
7
)
return
true
else
return
false
}
},
onload
(
options
)
{
console
.
log
(
options
,
'options'
)
},
mounted
()
{
console
.
log
(
'mounted'
,
this
.
orderCreateType
)
this
.
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
||
{}
this
.
baseConfigData
=
uni
.
$storage
.
get
(
'mock_data'
)
||
{}
const
{
userInfo
}
=
this
// 在原有的 orderObj 对象上新增这些属性
Object
.
assign
(
this
.
orderObj
,
{
sellerMerchantName
:
userInfo
.
merchantName
,
sellerName
:
userInfo
.
name
,
sellerMerchantId
:
userInfo
.
merchantId
,
sellerUserId
:
userInfo
.
uuid
,
merchantId
:
userInfo
.
shopMerchantId
,
merchantName
:
userInfo
.
shopMerchantName
})
this
.
initData
()
},
methods
:
{
initData
()
{
const
{
userInfo
}
=
this
this
.
getShopMerchantPointConfig
(
userInfo
.
shopMerchantId
)
this
.
getSubShopMerchantList
(
userInfo
.
shopMerchantId
)
this
.
getSetting
()
this
.
getConfig
()
this
.
getConfigList
()
// this.getEmployeeList()
this
.
getSelectOrderGoodsList
()
this
.
getPositionList
()
if
(
this
.
orderCreateType
==
'createWithPay'
)
this
.
getLastUserOrderInfo
()
// 补录订单不需要设置默认值
},
// 选择行事件
handleCell
(
val
)
{
console
.
log
(
val
,
this
.
orderObj
)
// 获取当前选中的popupType
this
.
popupType
=
Object
.
keys
(
this
.
popupTypeEnum
).
find
(
key
=>
this
.
popupTypeEnum
[
key
].
key
===
val
.
value
)
*
1
// 获取对应的list字段
const
popupConfig
=
this
.
popupTypeEnum
[
this
.
popupType
]
if
(
popupConfig
&&
popupConfig
.
list
)
{
this
.
externalData
=
this
[
popupConfig
.
list
]
||
[]
}
else
{
this
.
externalData
=
[]
}
// 定义产品相关字段数组
const
productFields
=
[
'frontGear'
,
'frontWindow'
,
'rearGear'
,
'rearWindow'
,
'sunRoof'
,
'package'
,
'skuGoods'
]
if
(
productFields
.
includes
(
val
.
value
))
{
this
.
valueKey
=
val
.
value
}
console
.
log
(
this
.
popupType
,
this
.
externalData
,
'-------------'
)
this
.
$refs
.
orderPopup
.
open
()
},
// 单选框change事件
radioChange
(
e
,
val
)
{
console
.
log
(
e
,
val
)
this
.
orderObj
[
val
.
value
]
=
e
.
detail
.
value
if
(
val
.
value
==
'payeeType'
)
{
this
.
changePayee
()
}
},
// 弹窗确认回调
onConfirm
(
val
)
{
console
.
log
(
val
,
'onConfirm'
)
const
{
chooseContent
}
=
val
// 根据popupTypeEnum优化处理
const
_typeValue
=
this
.
popupTypeEnum
[
this
.
popupType
]
console
.
log
(
_typeValue
)
// 定义产品相关字段数组
const
productFields
=
[
'frontGear'
,
'frontWindow'
,
'rearGear'
,
'rearWindow'
,
'sunRoof'
,
'package'
,
'skuGoods'
]
if
(
_typeValue
.
key
==
'carBrand'
)
{
// 车型
this
.
$set
(
this
.
orderObj
,
_typeValue
.
key
,
`
${
chooseContent
.
carBrand
}
-
${
chooseContent
.
carChildsBrandName
}
-
${
chooseContent
.
carSeriesName
}
`
)
this
.
orderObj
.
customer
=
{
...(
this
.
orderObj
.
customer
||
{}),
...
chooseContent
}
}
else
if
(
_typeValue
.
key
==
'couponInfo'
)
{
// 礼券
const
{
couponName
,
merchantCouponId
,
customerCouponCode
}
=
chooseContent
Object
.
assign
(
this
.
orderObj
,
{
couponName
:
couponName
,
merchantCouponId
:
merchantCouponId
,
customerCouponCode
:
customerCouponCode
})
this
.
$set
(
this
.
orderObj
,
'couponInfo'
,
couponName
+
customerCouponCode
)
}
else
if
(
productFields
.
includes
(
_typeValue
.
key
))
{
// 商品类,需计算总价
this
.
$set
(
this
.
orderObj
,
_typeValue
.
key
,
val
.
chooseContent
)
this
.
$nextTick
(()
=>
{
// 确保数据更新后再计算总价
this
.
changeTotalPrice
()
})
}
else
if
(
_typeValue
.
key
==
'todayShow'
)
{
const
weeks
=
[
'星期日'
,
'星期一'
,
'星期二'
,
'星期三'
,
'星期四'
,
'星期五'
,
'星期六'
]
this
.
$set
(
this
.
orderObj
,
'todayShow'
,
dayjs
(
chooseContent
).
format
(
'YYYY-MM-DD'
)
+
' '
+
weeks
[
dayjs
(
chooseContent
).
day
()])
this
.
$set
(
this
.
orderObj
,
'createDate'
,
dayjs
(
chooseContent
).
format
(
'YYYY-MM-DD'
))
}
else
if
(
_typeValue
.
key
)
{
console
.
log
(
_typeValue
)
this
.
orderObj
[
_typeValue
.
targetIdKey
]
=
chooseContent
[
_typeValue
.
sourceIdKey
]
this
.
$set
(
this
.
orderObj
,
_typeValue
.
targetNameKey
,
chooseContent
[
_typeValue
.
sourceNameKey
])
}
},
// 输入框失去焦点事件
inputBlur
(
e
,
val
)
{
console
.
log
(
e
,
val
)
this
.
orderObj
.
customer
[
val
.
value
]
=
this
.
orderObj
[
val
.
value
]
},
checkRequired
()
{
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
// 把formList中所有required为true的对象放到一个数组中
const
requiredArr
=
[]
const
onlyLabelItem
=
[]
this
.
formList
.
forEach
(
group
=>
{
group
.
forEach
(
item
=>
{
if
(
item
.
required
===
true
&&
item
.
hidden
!==
true
)
{
if
(
item
.
onlyLabel
===
true
)
{
onlyLabelItem
.
push
(
item
)
}
else
{
requiredArr
.
push
(
item
)
}
}
})
})
// 遍历requiredArr,检查orderObj中是否有对应的值
for
(
let
i
=
0
;
i
<
requiredArr
.
length
;
i
++
)
{
const
item
=
requiredArr
[
i
]
// 兼容嵌套customer对象的情况
let
value
if
(
item
.
value
===
'customerName'
||
item
.
value
===
'customerPhone'
||
item
.
value
===
'standNo'
||
item
.
value
===
'plateNumber'
)
{
value
=
this
.
orderObj
.
customer
?
this
.
orderObj
.
customer
[
item
.
value
]
:
undefined
}
else
{
value
=
this
.
orderObj
[
item
.
value
]
}
// 0、false、'0'等视为有效,null/undefined/空字符串视为无效
if
(
value
===
undefined
||
value
===
null
||
value
===
''
)
{
uni
.
showToast
({
title
:
`
${
item
.
label
}
不能为空`
,
icon
:
'none'
})
return
false
}
// 如果是customerPhone,添加phoneRex校验
if
(
item
.
value
===
'customerPhone'
&&
!
phoneRex
.
test
(
value
))
{
uni
.
showToast
({
title
:
`请输入正确的
${
item
.
label
}
`
,
icon
:
'none'
})
return
false
}
}
// 处理onlyLabel为true的特殊校验
if
(
onlyLabelItem
.
length
>
0
)
{
// 检查frontGear、frontWindow、rearGear、rearWindow、sunRoof和couponInfo字段中是否至少有一个不为空
const
labelFields
=
[
'frontGear'
,
'frontWindow'
,
'rearGear'
,
'rearWindow'
,
'sunRoof'
]
const
hasValue
=
labelFields
.
some
(
field
=>
{
console
.
log
(
field
,
this
.
orderObj
[
field
])
const
value
=
this
.
orderObj
[
field
]
return
value
!==
undefined
&&
value
!==
null
&&
(
Array
.
isArray
(
value
)
?
value
.
length
>
0
:
value
!==
''
)
})
console
.
log
(
hasValue
,
hasValue
)
if
(
!
hasValue
)
{
uni
.
showToast
({
title
:
'请至少选择一个产品'
,
icon
:
'none'
})
return
false
}
}
return
true
},
// 提交
async
submit
()
{
console
.
log
(
this
.
orderObj
)
if
(
!
this
.
checkRequired
())
return
const
{
orderCreateType
}
=
this
const
obj
=
utils
.
deepClone
(
this
.
orderObj
)
const
otherCustomer
=
[
'standNo'
,
'plateNumber'
,
'customerSex'
,
'experienceFlag'
,
'salesType'
]
obj
.
customer
=
{
...
obj
.
customer
,
...
otherCustomer
.
reduce
((
acc
,
key
)
=>
{
if
(
obj
[
key
]
!==
undefined
)
{
acc
[
key
]
=
obj
[
key
]
delete
obj
[
key
]
}
return
acc
},
{})
}
// 将 frontGear、frontWindow、rearGear、rearWindow、sunRoof 字段合并到 goodsList 中
const
labelFields
=
[
'frontGear'
,
'frontWindow'
,
'rearGear'
,
'rearWindow'
,
'sunRoof'
]
let
goodsList
=
[]
labelFields
.
forEach
(
field
=>
{
if
(
Array
.
isArray
(
obj
[
field
])
&&
obj
[
field
].
length
>
0
)
{
goodsList
=
goodsList
.
concat
(
obj
[
field
])
}
delete
obj
[
field
]
})
if
(
goodsList
.
length
>
0
)
{
obj
.
subOrderList
=
goodsList
.
map
(
item
=>
{
return
{
totalPrice
:
item
.
goods
.
sellPrice
,
number
:
item
.
goods
.
number
,
merchantGoodsId
:
item
.
goods
.
merchantGoodsId
}
})
}
obj
.
notUpgradeOrderList
=
[{
customer
:
obj
.
customer
,
subOrderList
:
obj
.
subOrderList
}]
delete
obj
.
carBrand
delete
obj
.
couponInfo
delete
obj
.
refusalReason
delete
obj
.
customer
delete
obj
.
subOrderList
delete
obj
.
todayShow
delete
obj
.
package
delete
obj
.
payeeType
delete
obj
.
skuGoods
console
.
log
(
obj
,
'rucan'
)
const
res
=
await
uni
.
$api
.
boutiqueApi
.
notUpgradeOrder
({
json
:
JSON
.
stringify
(
obj
)
})
console
.
log
(
res
,
'===submit'
)
if
(
res
)
{
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'success'
})
this
.
$emit
(
'jump'
,
'OrderManagement'
)
}
},
// 计算所有产品的总价
changeTotalPrice
()
{
let
total
=
0
// 遍历所有产品槽位
Object
.
keys
(
this
.
productSlots
).
forEach
(
slotName
=>
{
const
productList
=
this
.
orderObj
[
slotName
]
if
(
Array
.
isArray
(
productList
)
&&
productList
.
length
>
0
)
{
// 计算每个产品的价格 * 数量,并累加到总价
productList
.
forEach
(
item
=>
{
if
(
item
.
goods
&&
item
.
goods
.
sellPrice
&&
item
.
goods
.
number
)
{
total
+=
parseFloat
(
item
.
goods
.
sellPrice
)
*
parseInt
(
item
.
goods
.
number
)
}
})
}
})
console
.
log
(
total
,
'total'
)
// 更新总价
this
.
totalPrice
=
total
.
toFixed
(
2
)
},
// 获取上一个订单的销售顾问信息 并且不是再次下单
async
getLastUserOrderInfo
()
{
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getLastUserOrderInfo
({
sellerUserId
:
this
.
userInfo
.
subLoginUser
.
uuid
})
this
.
$set
(
this
.
orderObj
,
'employeeName'
,
res
.
employeeName
)
this
.
orderObj
.
userId
=
res
.
userId
console
.
log
(
res
,
'上一个订单的销售顾问信息'
)
},
async
getShopMerchantPointConfig
(
merchantId
)
{
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getShopMerchantPointConfig
({
merchantId
})
console
.
log
(
res
)
if
(
res
.
pointsMultiRole
==
'Y'
)
{
const
employeeCell
=
this
.
formList
[
0
].
find
(
item
=>
item
.
label
===
'销售顾问'
)
if
(
employeeCell
)
employeeCell
.
label
=
'销售顾问/录单员'
// 找到formList中label为"交付专员"的对象,添加hidden: true
const
deliveryCell
=
this
.
formList
[
0
].
find
(
item
=>
item
.
label
===
'交付专员'
)
if
(
deliveryCell
)
{
deliveryCell
.
hidden
=
false
}
}
},
// 判断二级流量方
async
getSubShopMerchantList
(
merchantId
)
{
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getSubShopMerchantList
({
merchantId
})
console
.
log
(
res
,
'流量方'
)
if
(
res
&&
res
.
length
)
{
this
.
subShopMerchantList
=
res
const
cell
=
this
.
formList
[
0
].
find
(
item
=>
item
.
label
===
'二级流量方'
)
if
(
cell
)
{
cell
.
hidden
=
false
}
}
},
// 动态获取 车型 车架 车牌 是否必填
getYQorderInfo
()
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
const
YQorderSetting
=
uni
.
$storage
.
get
(
'boutique_YQorderSetting'
)
if
(
YQorderSetting
)
return
resolve
(
YQorderSetting
)
else
{
const
{
userInfo
}
=
this
let
{
merchantId
,
merchantName
}
=
userInfo
.
subLoginUser
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getMerchantRecordingSettings
({
merchantId
,
merchantName
})
console
.
log
(
res
)
if
(
res
)
{
uni
.
$storage
.
set
(
'boutique_YQorderSetting'
,
res
)
resolve
(
res
)
}
}
})
},
// 获取车型、车架号、车牌号必填规则
async
getSetting
()
{
const
res
=
await
this
.
getYQorderInfo
()
console
.
log
(
res
,
'========'
)
const
dictionaryObj
=
{
carTypeRequiredFlag
:
'carBrand'
,
standNoRequiredFlag
:
'standNo'
,
plateNumRequiredFlag
:
'plateNumber'
}
for
(
const
key
in
dictionaryObj
)
{
const
cell
=
this
.
formList
[
1
].
find
(
item
=>
item
.
value
===
dictionaryObj
[
key
])
if
(
cell
)
cell
.
required
=
res
[
key
]
==
'Y'
}
},
async
getConfig
()
{
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getYqStoreConfig
({
yqMerchantId
:
this
.
orderObj
.
sellerMerchantId
})
console
.
log
(
res
)
let
m
=
res
.
supportPayTypes
||
[]
let
n
=
this
.
payTypeList
let
list
=
n
.
filter
(
k
=>
{
let
idx
=
m
.
find
(
j
=>
j
==
k
.
value
)
return
idx
>=
0
})
// this.configPayTypeList = list
this
.
djPayList
=
[
...
list
?.
filter
(
v
=>
!
[
2
,
5
].
includes
(
Number
(
v
.
value
))),
{
name
:
'对公转账'
,
value
:
'6'
},
{
name
:
'其它收款'
,
value
:
'7'
}
]
this
.
merchantPayList
=
[...
list
?.
filter
(
v
=>
v
.
value
==
2
)]
this
.
changePayee
()
console
.
log
(
this
.
djPayList
,
this
.
merchantPayList
,
'list'
)
},
changePayee
()
{
const
cell
=
this
.
formList
[
2
].
find
(
item
=>
item
.
value
===
'selectPayType'
)
if
(
cell
)
{
cell
.
radioList
=
this
.
orderObj
.
payeeType
==
1
?
this
.
merchantPayList
:
this
.
djPayList
if
(
cell
.
radioList
&&
cell
.
radioList
.
length
>
0
)
{
cell
.
current
=
cell
.
radioList
[
0
].
value
this
.
orderObj
.
selectPayType
=
cell
.
radioList
[
0
].
value
}
}
},
// 获取 销售顾问列表
async
getEmployeeList
()
{
const
{
userInfo
,
orderObj
}
=
this
const
{
shopMerchantId
,
sceneType
,
merchantId
}
=
userInfo
,
data
=
await
uni
.
$api
.
popupApi
.
getEmployeeList
({
merchantId
:
orderObj
.
idKey
==
'sellerUserId'
?
merchantId
:
shopMerchantId
,
sceneList
:
orderObj
.
idKey
==
'sellerUserId'
?
''
:
[
sceneType
]
})
if
(
data
&&
data
.
length
)
{
this
.
employeeList
=
data
// this.$set(this.orderObj, 'employeeName', data[0].staffName)
// this.orderObj.userId = data[0].uuid
}
},
async
getPositionList
()
{
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getPositionList
({})
this
.
positionTypeList
=
res
},
// 商品列表
async
getSelectOrderGoodsList
()
{
const
{
userInfo
}
=
this
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getSelectOrderGoodsList
({
merchantId
:
userInfo
.
shopMerchantId
,
sceneType
:
userInfo
.
sceneType
})
console
.
log
(
res
,
'=====getSelectOrderGoodsList'
)
// 分类映射
const
posMap
=
{
frontGear
:
[
1
],
frontWindow
:
[
2
],
rearGear
:
[
3
],
rearWindow
:
[
4
],
sunRoof
:
[
5
,
6
,
7
]
}
// 初始化各类商品数组
const
arrMap
=
{
frontGear
:
[],
frontWindow
:
[],
rearGear
:
[],
rearWindow
:
[],
sunRoof
:
[]
}
res
.
forEach
(
val
=>
{
if
(
val
.
goodsFlag
==
1
)
{
let
subVal
=
val
.
goods
subVal
.
positionStr
=
subVal
.
position
subVal
.
upgradePrice
=
subVal
.
sellPrice
subVal
.
price
=
subVal
.
sellPrice
subVal
.
goodsId
=
subVal
.
merchantGoodsId
Object
.
keys
(
posMap
).
forEach
(
key
=>
{
if
(
posMap
[
key
].
includes
(
subVal
.
merchantGoodsPosition
))
{
arrMap
[
key
].
push
(
val
)
}
})
}
})
// 批量设置 hidden 属性
Object
.
keys
(
arrMap
).
forEach
(
key
=>
{
const
cell
=
this
.
formList
[
2
].
find
(
item
=>
item
.
value
===
key
)
if
(
cell
)
cell
.
hidden
=
arrMap
[
key
].
length
===
0
})
},
// 获取不升级常用字符列表
getConfigList
()
{
uni
.
$api
.
boutiqueApi
.
getConfigList
({
confGroup
:
'SMARTCARLIFE_NOT_UPGRADE_LABEL'
})
.
then
(
data
=>
{
console
.
log
(
data
)
this
.
orderObj
.
shortcutList
=
data
})
},
reasonClick
(
text
)
{
this
.
$set
(
this
.
orderObj
,
'refusalReason'
,
(
this
.
orderObj
?.
refusalReason
||
''
)
+
text
)
this
.
orderObj
.
customer
.
refusalReason
=
(
this
.
orderObj
.
customer
.
refusalReason
||
''
)
+
text
console
.
log
(
this
.
orderObj
.
customer
?.
refusalReason
)
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
</
style
>
\ No newline at end of file
.defeat-order
{
height
:
100%
;
}
.box
{
height
:
calc
(
100%
-
#{
toRpx
(
120
)}
);
padding-bottom
:
toRpx
(
24
);
.scroll-view
{
height
:
100%
;
}
}
.box-content
{
padding
:
0
toRpx
(
48
);
}
.shop-list
{
padding
:
toRpx
(
12
)
toRpx
(
32
)
toRpx
(
12
)
0
;
.shop-item
{
display
:
flex
;
align-items
:
center
;
background-color
:
#f5f7fa
;
border-radius
:
toRpx
(
16
);
margin-bottom
:
toRpx
(
16
);
padding
:
toRpx
(
24
);
.right
{
flex
:
1
;
font-size
:
toRpx
(
28
);
margin-left
:
toRpx
(
24
);
.shop-name
{
color
:
#ff781f
;
}
.alias
{
margin-top
:
toRpx
(
12
);
font-size
:
toRpx
(
24
);
color
:
#666
;
}
}
}
}
.front-gear-box
{
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
toRpx
(
24
);
.front-gear-input-box
{
display
:
flex
;
align-items
:
center
;
.front-gear-label
{
font-size
:
toRpx
(
24
);
margin-right
:
toRpx
(
24
);
color
:
#999999
;
}
.front-gear-input
{
position
:
relative
;
display
:
flex
;
border
:
toRpx
(
2
)
solid
#eff0f2
;
background-color
:
#fff
;
font-size
:
toRpx
(
28
);
height
:
toRpx
(
70
);
width
:
toRpx
(
250
);
line-height
:
toRpx
(
70
);
text-align
:
right
;
.uni-input
{
padding
:
0
toRpx
(
32
);
height
:
100%
;
}
.unit
{
position
:
absolute
;
top
:
50%
;
left
:
toRpx
(
32
);
transform
:
translateY
(
-50%
);
}
}
}
.control
{
display
:
flex
;
align-items
:
center
;
.control-input
{
width
:
toRpx
(
94
);
height
:
toRpx
(
74
);
background-color
:
#fff
;
border
:
toRpx
(
2
)
solid
#eff0f2
;
padding
:
0
toRpx
(
10
);
text-align
:
center
;
}
.minus
,
.add
{
width
:
toRpx
(
80
);
height
:
toRpx
(
74
);
line-height
:
toRpx
(
70
);
text-align
:
center
;
background-color
:
#fff
;
border-top
:
toRpx
(
2
)
solid
#eff0f2
;
border-bottom
:
toRpx
(
2
)
solid
#eff0f2
;
}
.minus
{
border-radius
:
toRpx
(
12
)
0
0
toRpx
(
12
);
border-left
:
toRpx
(
2
)
solid
#eff0f2
;
}
.add
{
border-radius
:
0
toRpx
(
12
)
toRpx
(
12
)
0
;
border-right
:
toRpx
(
2
)
solid
#eff0f2
;
}
}
}
.package-list
{
padding
:
toRpx
(
12
)
toRpx
(
32
)
toRpx
(
12
)
0
;
.package-item
{
background-color
:
#f5f7fa
;
border-radius
:
toRpx
(
16
);
margin-bottom
:
toRpx
(
16
);
.header
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
border-bottom
:
toRpx
(
1.6
)
solid
#dce1e6
;
padding
:
toRpx
(
24
);
&-left
{
display
:
flex
;
align-items
:
center
;
font-size
:
toRpx
(
28
);
.name
{
margin-left
:
toRpx
(
26
);
color
:
#999
;
}
.price
{
color
:
#666
;
}
}
}
.goods-item
{
padding
:
toRpx
(
24
);
border-bottom
:
toRpx
(
1.6
)
solid
#dce1e6
;
&:last-child
{
border-bottom
:
none
;
}
.goods-name
{
color
:
#ff781f
;
font-size
:
toRpx
(
28
);
}
.alias-name
{
margin-top
:
toRpx
(
12
);
font-size
:
toRpx
(
24
);
color
:
#666
;
}
}
}
}
.total
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
toRpx
(
24
)
toRpx
(
32
)
toRpx
(
24
)
0
;
font-size
:
toRpx
(
28
);
border-bottom
:
toRpx
(
2
)
solid
#f7f7f6
;
&-left
{
color
:
#333
;
font-weight
:
500
;
}
&
-right
{
color
:
#f45001
;
font-weight
:
500
;
}
}
.pay-tips
{
padding
:
toRpx
(
24
)
toRpx
(
24
)
toRpx
(
24
)
0
;
font-size
:
toRpx
(
24
);
color
:
#999
;
}
.reason-list
{
gap
:
toRpx
(
24
);
margin-bottom
:
toRpx
(
32
);
margin-top
:
toRpx
(
24
);
.reason-item
{
padding
:
toRpx
(
28
)
toRpx
(
18
);
border-radius
:
toRpx
(
16
);
background
:
#f2f2f2
;
color
:
#666666
;
font-size
:
toRpx
(
28
);
font-weight
:
400
;
}
}
.defeat-order
::v-deep
.cell-value
.textarea
{
margin-bottom
:
0
;
}
.btn
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin
:
toRpx
(
88
)
auto
0
;
width
:
toRpx
(
1130
);
height
:
toRpx
(
80
);
color
:
#fff
;
border-radius
:
toRpx
(
48
);
background
:
linear-gradient
(
0deg
,
#2c66f7
0%
,
#48a6ff
100%
);
}
</
style
>
pages/boutique/tool/components/OrderDetail.vue
View file @
5122740
...
...
@@ -177,6 +177,7 @@
import
utils
from
'@/utils/utils'
import
order_mixins
from
'../../order_mixins.js'
import
dayjs
from
'dayjs'
import
{
index
}
from
'@/env'
export
default
{
name
:
'OrderDetail'
,
props
:
{
...
...
@@ -255,7 +256,7 @@ export default {
})
}
// 膜类商品 并且服务商开通了使用膜卷号配置 不走签名流程
if
(
this
.
baseConfigData
?.
membraneTypeList
?.
includes
(
e
?.
upgradeGoodsType
)
&&
isUseFilmRoll
&&
!
signatureSwitch
)
{
if
(
this
.
baseConfigData
?.
membraneTypeList
?.
includes
(
e
?.
upgradeGoodsType
)
&&
this
.
isUseFilmRoll
&&
!
this
.
signatureSwitch
)
{
let
result
=
await
api
.
getfilmRollNoByGoods
({
upgradeGoodsId
:
e
.
upgradeGoodsId
,
yqMerchantId
:
data
?.
sellerMerchantId
,
...
...
@@ -426,9 +427,9 @@ export default {
if
(
configInfo
)
{
return
resolve
(
configInfo
)
}
else
{
wx
.
request
({
uni
.
request
({
// url: `${domain}${path}?method=${method}`,
url
:
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-boutique-work-wechat-miniapp&env=
${
target
[
envI
ndex
]}
`
,
url
:
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-boutique-work-wechat-miniapp&env=
${
target
[
i
ndex
]}
`
,
// data,
method
:
'GET'
,
// header,
...
...
pages/boutique/tool/components/OrderManagement.vue
View file @
5122740
...
...
@@ -4,12 +4,15 @@
<input
class=
"uni-input"
v-model=
"keyword"
placeholder=
"输入客户姓名/商品名称/订单编号/手机号搜索"
/>
</view>
<view
class=
"tab-container"
>
<view
class=
"tab-item"
:class=
"
{ active: tabIndex === index }" v-for="(item, index) in tabList" :key="index" @click="switchTab(index)">
<text>
{{
item
.
tabName
}}
</text>
<text
class=
"num"
>
{{
item
.
num
}}
</text>
<view
class=
"tab-container flex justify-between"
>
<view
class=
"flex"
>
<view
class=
"tab-item"
:class=
"
{ active: tabIndex === index }" v-for="(item, index) in tabList" :key="index" @click="switchTab(index)">
<text>
{{
item
.
tabName
}}
</text>
<text
class=
"num"
>
{{
item
.
num
}}
</text>
</view>
</view>
<view>
<view
class=
"flex filter-item justify-center align-center"
@
click=
"openFilter"
>
筛选
<view
class=
"sprite-icon icon-filter"
></view>
</view>
...
...
@@ -123,7 +126,7 @@
</scroll-view>
</
template
>
</PublishPopup>
<order-screen
ref=
"
test"
@
onConfirm=
"回调
"
/>
<order-screen
ref=
"
openFilter"
@
onConfirm=
"openFilterConfirm
"
/>
</view>
</template>
...
...
@@ -234,6 +237,14 @@ export default {
delete
this
.
searchObj
.
statusList
this
.
search
()
},
openFilter
()
{
this
.
$refs
.
openFilter
.
open
()
},
openFilterConfirm
(
val
)
{
console
.
log
(
val
)
this
.
searchObj
=
val
this
.
search
()
},
tabChange
(
index
)
{
this
.
activeIndex
=
index
if
(
!
this
.
normalOrderNoList
.
length
)
{
...
...
@@ -507,10 +518,20 @@ export default {
.tab-container
{
display
:
flex
;
justify-content
:
start
;
//
justify-content
:
start
;
padding
:
toRpx
(
0
)
toRpx
(
48
)
toRpx
(
24
);
height
:
toRpx
(
80
);
margin-bottom
:
toRpx
(
20
);
.filter-item
{
width
:
toRpx
(
164
);
height
:
toRpx
(
72
);
border-radius
:
toRpx
(
16
);
background
:
#fff
;
border
:
toRpx
(
2
)
solid
#ffffff
cc
;
color
:
#333333
;
font-size
:
toRpx
(
28
);
font-weight
:
400
;
}
}
.tab-item
{
...
...
pages/boutique/tool/contant.js
View file @
5122740
...
...
@@ -32,7 +32,7 @@ const FORM_LIST = [
// key: 'staffName',
required
:
true
,
showText
:
'merchantName'
}
,
}
],
[
{
...
...
@@ -87,7 +87,7 @@ const FORM_LIST = [
label
:
'选择车型'
,
value
:
'carBrand'
,
type
:
'select'
,
key
:
'carInfo'
,
key
:
'carInfo'
},
{
label
:
'车架号(VIN)'
,
...
...
@@ -116,7 +116,7 @@ const FORM_LIST = [
name
:
'否'
}
]
}
,
}
],
[
{
...
...
@@ -208,7 +208,7 @@ const FORM_LIST = [
name
:
'4s店收款'
,
disabled
:
false
}
]
,
]
},
{
label
:
'支付方式'
,
...
...
@@ -231,7 +231,7 @@ const FORM_LIST = [
// }
],
addHtml
:
'otherPay'
}
,
}
],
[
{
...
...
@@ -241,7 +241,271 @@ const FORM_LIST = [
type
:
'textarea'
,
placeholder
:
'请输入 (100字以内)'
,
class
:
'cell-break'
}
]
]
const
DEFEAT_FORM_LIST
=
[
[
{
label
:
'战败日期'
,
value
:
'todayShow'
,
type
:
'select'
,
// key: 'staffName',
required
:
true
},
{
label
:
'销售顾问/录单员'
,
value
:
'employeeName'
,
type
:
'select'
,
// key: 'staffName',
required
:
true
,
showText
:
'shopMerchantName'
},
{
label
:
'交付专员'
,
value
:
'deliveryEmployeeName'
,
type
:
'select'
,
required
:
true
,
// key: 'staffName',
hidden
:
true
,
showText
:
'shopMerchantName'
},
{
label
:
'二级流量方'
,
value
:
'subShopMerchantName'
,
type
:
'select'
,
required
:
true
,
// key: 'subMerchantName',
hidden
:
true
},
{
label
:
'转化人员'
,
value
:
'sellerName'
,
type
:
'select'
,
// key: 'staffName',
required
:
true
,
showText
:
'merchantName'
}
],
[
{
label
:
'车主姓名'
,
value
:
'customerName'
,
maxlength
:
'16'
,
type
:
'input'
,
required
:
true
},
{
label
:
'客户来源'
,
value
:
'salesType'
,
type
:
'radio'
,
current
:
'0'
,
radioList
:
[
{
value
:
'0'
,
name
:
'售前'
},
{
value
:
'1'
,
name
:
'售后'
}
],
required
:
true
,
hidden
:
true
},
{
label
:
'性别'
,
value
:
'customerSex'
,
type
:
'radio'
,
current
:
'1'
,
radioList
:
[
{
value
:
'1'
,
name
:
'男'
},
{
value
:
'2'
,
name
:
'女'
}
]
},
{
label
:
'手机号'
,
value
:
'customerPhone'
,
maxlength
:
'11'
,
type
:
'input'
,
required
:
true
,
inputType
:
'number'
},
{
label
:
'选择车型'
,
value
:
'carBrand'
,
type
:
'select'
,
key
:
'carInfo'
},
{
label
:
'车架号(VIN)'
,
value
:
'standNo'
,
maxlength
:
'17'
,
type
:
'input'
},
{
label
:
'车牌号'
,
value
:
'plateNumber'
,
maxlength
:
'8'
,
type
:
'input'
},
{
label
:
'是否体验'
,
value
:
'experienceFlag'
,
type
:
'radio'
,
current
:
'Y'
,
required
:
true
,
radioList
:
[
{
value
:
'Y'
,
name
:
'是'
},
{
value
:
'N'
,
name
:
'否'
}
]
}
],
[
{
label
:
'精品礼券'
,
value
:
'couponInfo'
,
type
:
'select'
,
key
:
'name'
,
required
:
true
,
hidden
:
true
},
{
label
:
'请选择产品'
,
onlyLabel
:
true
,
required
:
true
,
noBorder
:
true
},
{
label
:
'前挡'
,
value
:
'frontGear'
,
type
:
'select'
,
key
:
'name'
,
labellIcon
:
'front-gear'
,
addHtml
:
'frontGear'
,
hidden
:
true
},
{
label
:
'前侧窗玻璃'
,
value
:
'frontWindow'
,
type
:
'select'
,
key
:
'name'
,
labellIcon
:
'front-window'
,
addHtml
:
'frontWindow'
,
hidden
:
true
},
{
label
:
'后侧窗玻璃'
,
value
:
'rearGear'
,
type
:
'select'
,
key
:
'name'
,
labellIcon
:
'rear-gear'
,
addHtml
:
'rearGear'
,
hidden
:
true
},
{
label
:
'后档'
,
value
:
'rearWindow'
,
type
:
'select'
,
key
:
'name'
,
labellIcon
:
'rear-window'
,
addHtml
:
'rearWindow'
,
hidden
:
true
},
{
label
:
'天窗'
,
value
:
'sunRoof'
,
type
:
'select'
,
key
:
'name'
,
labellIcon
:
'sun-roof'
,
addHtml
:
'sunRoof'
,
hidden
:
true
},
{
label
:
'套餐'
,
value
:
'package'
,
type
:
'select'
,
key
:
'name'
,
addHtml
:
'package'
,
hidden
:
true
},
{
label
:
'其他精品'
,
value
:
'skuGoods'
,
type
:
'select'
,
key
:
'name'
,
addHtml
:
'skuGoods'
,
hidden
:
true
},
{
label
:
'收款方式'
,
value
:
'payeeType'
,
type
:
'radio'
,
key
:
'name'
,
current
:
'1'
,
radioList
:
[
{
value
:
'0'
,
name
:
'嘀加收款'
,
disabled
:
false
},
{
value
:
'1'
,
name
:
'4s店收款'
,
disabled
:
false
}
],
hidden
:
true
},
{
label
:
'支付方式'
,
value
:
'selectPayType'
,
type
:
'radio'
,
key
:
'name'
,
current
:
'0'
,
radioList
:
[
// {
// value: '3',
// name: 'POS机'
// },
// {
// value: '6',
// name: '对公转账'
// },
// {
// value: '7',
// name: '其他收款'
// }
],
addHtml
:
'otherPay'
,
hidden
:
true
}
],
[
{
label
:
'车主拒升理由'
,
value
:
'refusalReason'
,
maxlength
:
'100'
,
type
:
'textarea'
,
placeholder
:
'请输入 (100字以内)'
,
class
:
'cell-break'
,
required
:
true
,
addHtml
:
'reasonList'
,
noBorder
:
true
}
]
]
...
...
@@ -315,40 +579,40 @@ const popupTypeEnum = {
},
5
:
{
key
:
'couponInfo'
,
list
:
''
,
list
:
''
},
6
:
{
key
:
'frontGear'
,
list
:
''
,
list
:
''
},
7
:
{
key
:
'frontWindow'
,
list
:
''
,
list
:
''
},
8
:
{
key
:
'rearGear'
,
list
:
''
,
list
:
''
},
9
:
{
key
:
'rearWindow'
,
list
:
''
,
list
:
''
},
10
:
{
key
:
'sunRoof'
,
list
:
''
,
list
:
''
},
11
:
{
key
:
'package'
,
list
:
''
,
list
:
''
},
12
:
{
key
:
'skuGoods'
,
list
:
''
,
list
:
''
},
13
:
{
key
:
'todayShow'
,
list
:
''
}
}
export
{
FORM_LIST
,
popupTypeEnum
,
payTypeList
}
\ No newline at end of file
export
{
FORM_LIST
,
popupTypeEnum
,
payTypeList
,
DEFEAT_FORM_LIST
}
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