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 4f0c3eaf
authored
Dec 06, 2025
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.5.0' of
http://192.168.3.233:8090/glsx/gl_tape
into SAAS+V5.5.0
2 parents
1c4a7e97
7113e787
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
709 additions
and
322 deletions
api/module/equity.js
api/request/signHttp.js
components/Form/GlCell.vue
components/OrderPopup/components/Customer.vue
components/OrderPopup/components/EmployeeList.vue
components/OrderPopup/components/SkuGoodsList.vue
components/OrderPopup/config.js
env.js
init.js
pages/boutique/tool/components/CreateOrder.vue
pages/boutique/tool/components/DailyReport.vue
pages/equity/tool/components/ContractPopup.vue
pages/equity/tool/components/CreateOrder.vue
pages/equity/tool/components/DailyReport.vue
pages/equity/tool/components/DefeatOrder.vue
pages/equity/tool/components/OrderCard.vue
pages/equity/tool/components/OrderManagement.vue
pages/equity/tool/components/OrderPay.vue
pages/equity/tool/components/SkuGoods.vue
pages/equity/tool/contant.js
utils/utils.js
api/module/equity.js
View file @
4f0c3ea
...
...
@@ -46,7 +46,7 @@ module.exports = {
/**
* 订单详情
*/
getOrderDetail
(
data
)
{
getOrderDetail
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.detail'
,
projectName
:
'boutique'
,
...
...
@@ -54,7 +54,7 @@ module.exports = {
})
},
/**pos支付 */
getPosQr
(
data
)
{
getPosQr
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.payOrder.create'
,
projectName
:
'boutique'
,
...
...
@@ -65,7 +65,7 @@ module.exports = {
* 查询门店录单设置
},
*/
orderSettingList
(
data
)
{
orderSettingList
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.field.setting.list'
,
projectName
:
'boutique'
,
...
...
@@ -74,7 +74,7 @@ module.exports = {
},
/** 报价单分页列表 */
quotationPage
(
data
)
{
quotationPage
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page'
,
projectName
:
'boutique'
,
...
...
@@ -82,7 +82,7 @@ module.exports = {
})
},
/** 根据id查询报价单数据 */
getQuotationInfo
(
data
)
{
getQuotationInfo
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate'
,
projectName
:
'boutique'
,
...
...
@@ -90,7 +90,7 @@ module.exports = {
})
},
/** 修改车损报价单客户基本信息信息 */
updateCustomerInfo
(
data
)
{
updateCustomerInfo
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update'
,
projectName
:
'boutique'
,
...
...
@@ -99,7 +99,7 @@ module.exports = {
},
/** 报价单订单分状态统计信息 */
orderStatistics
(
data
)
{
orderStatistics
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics'
,
projectName
:
'boutique'
,
...
...
@@ -107,7 +107,7 @@ module.exports = {
})
},
// 查询订单是否支持状态变更
getOrderRefundStep
(
data
)
{
getOrderRefundStep
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.refundApplyRecord.isExist'
,
projectName
:
'boutique'
,
...
...
@@ -115,7 +115,7 @@ module.exports = {
})
},
/**报价单-撤销工单 */
cancelOrderById
(
data
)
{
cancelOrderById
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.quotation.cancel'
,
projectName
:
'boutique'
,
...
...
@@ -123,7 +123,7 @@ module.exports = {
})
},
// 车损报价单战败订单创建
defeatOrderCreate
(
data
)
{
defeatOrderCreate
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add.defeat.order'
,
projectName
:
'boutique'
,
...
...
@@ -131,11 +131,46 @@ module.exports = {
})
},
// 更新合同协议内容
updateZyInfo
(
data
)
{
updateZyInfo
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update'
,
projectName
:
'boutique'
,
...
data
})
},
/** 根据商户号商品id获取可选升级商品列表 */
quotationGoodsList
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.quotationGoods.list'
,
projectName
:
'boutique'
,
...
data
})
},
/**
* /** 修改车损报价单信息 */
updateQuotation
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.update'
,
projectName
:
'boutique'
,
...
data
})
},
getCheckEmployeeList
(
data
)
{
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
// data.sceneList = [1]
return
http
.
post
({
method
:
'dj.api.smartcarlife.employee.onTheJob.getByMerchantId'
,
projectName
:
'boutique'
,
...
data
})
// return api.post("dj.api.smartcarlife.employee.getByMerchantId", data);
},
/** 更新报价单状态 */
updateOrderStatus
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.status.update'
,
projectName
:
'boutique'
,
...
data
})
}
}
api/request/signHttp.js
View file @
4f0c3ea
...
...
@@ -13,6 +13,7 @@ module.exports = {
return
;
}
if
(
!
uni
.
$signHttp
)
uni
.
$signHttp
=
new
Request
(
uni
.
signHttpConfig
)
data
.
source
=
1
resolve
(
uni
.
$signHttp
.
post
(
url
,
data
,
_config
))
}
})
...
...
components/Form/GlCell.vue
View file @
4f0c3ea
...
...
@@ -23,7 +23,7 @@
</view>
</template>
<
template
v-for=
"(item, idx) in items"
>
<view
v-if=
"!item.hidden"
>
<view
v-if=
"!item.hidden"
:key=
"idx"
>
<view
class=
"cell-row"
:key=
"idx"
...
...
@@ -93,7 +93,7 @@
:key=
"radio.value + item.value"
>
<radio
style=
"transform: scale(0.
7
)"
style=
"transform: scale(0.
65) translateY(-3px
)"
:value=
"radio.value"
:disabled=
"item.disabled || radio.disabled"
:checked=
"radio.value == item.current"
...
...
components/OrderPopup/components/Customer.vue
View file @
4f0c3ea
...
...
@@ -54,10 +54,10 @@ export default {
this
.
updateParams
(
params
,
list
||
[])
},
initData
(
list
)
{
const
{
params
:
{
idKey
},
data
}
=
this
const
{
params
:
{
idKey
},
data
}
=
this
if
(
data
[
idKey
])
{
this
.
currentId
=
data
[
idKey
]
let
item
=
list
.
find
(
i
=>
i
.
customerPhone
==
this
.
currentId
)
let
item
=
list
.
find
(
i
=>
i
.
id
==
this
.
currentId
)
this
.
$emit
(
'choose'
,
item
)
}
this
.
list
=
list
...
...
@@ -68,12 +68,12 @@ export default {
this
.
getList
(
searchValue
,
true
)
},
choose
(
i
)
{
this
.
currentId
=
i
.
customerPhone
this
.
currentId
=
i
.
id
this
.
$emit
(
'choose'
,
i
)
},
checkActive
(
i
)
{
let
{
currentId
,
data
,
params
}
=
this
return
currentId
?
i
.
customerPhone
==
currentId
:
i
.
customerPhone
==
data
[
params
.
idKey
]
return
currentId
?
i
.
id
==
currentId
:
i
.
id
==
data
[
params
.
idKey
]
}
}
}
...
...
components/OrderPopup/components/EmployeeList.vue
View file @
4f0c3ea
<
template
>
<view
class=
"employee-list"
>
<template
v-for=
"(i, index) in list"
>
<view
:key=
"index"
@
click=
"choose(i)"
:class=
"['item flex',
{ active: checkActive(i) }]"
>
<view
:key=
"index"
@
click=
"choose(i)"
:class=
"['item flex',
{ active: checkActive(i) }]">
<view
class=
"sprite-icon icon-tag-checked"
></view>
{{
i
.
staffName
}}
</view>
...
...
components/OrderPopup/components/SkuGoodsList.vue
View file @
4f0c3ea
...
...
@@ -313,7 +313,7 @@ export default {
if
(
e
.
goodsFlag
!=
2
)
{
let
id
=
''
if
(
e
.
goodsFlag
==
3
)
id
=
e
.
packageGoods
.
packageCode
if
(
e
.
goodsFlag
==
1
)
id
=
e
.
goods
.
goodsId
if
(
e
.
goodsFlag
==
1
)
id
=
String
(
e
.
goods
.
goodsId
)
this
.
currentIds
.
push
(
id
)
this
.
chooseList
.
push
(
e
)
}
...
...
@@ -339,19 +339,28 @@ export default {
id
=
packageCode
}
else
{
let
{
goodsId
}
=
i
.
goods
id
=
goodsId
id
=
String
(
goodsId
)
}
let
{
currentIds
}
=
this
,
i
ndex
=
currentIds
.
indexOf
(
id
)
if
(
i
ndex
==
-
1
)
{
let
{
currentIds
,
chooseList
}
=
this
,
delI
ndex
=
currentIds
.
indexOf
(
id
)
if
(
delI
ndex
==
-
1
)
{
this
.
currentIds
.
push
(
id
)
this
.
chooseList
.
push
(
i
)
}
else
{
this
.
currentIds
.
splice
(
index
,
1
)
this
.
chooseList
.
splice
(
index
,
1
)
this
.
currentIds
.
splice
(
delIndex
,
1
)
const
delChooseIndex
=
chooseList
.
findIndex
(
e
=>
{
let
chooseId
=
''
if
(
e
.
goodsFlag
==
3
)
chooseId
=
e
.
packageGoods
.
packageCode
if
(
e
.
goodsFlag
==
1
)
chooseId
=
String
(
e
.
goods
.
goodsId
)
if
(
e
.
goodsFlag
==
i
.
goodsFlag
)
{
if
(
id
==
chooseId
)
return
e
}
})
if
(
delChooseIndex
!=
-
1
)
this
.
chooseList
.
splice
(
delChooseIndex
,
1
)
}
this
.
$emit
(
'choose'
,
this
.
chooseList
)
}
this
.
$emit
(
'choose'
,
this
.
chooseList
)
}
catch
(
error
)
{
console
.
log
(
error
)
}
...
...
@@ -374,12 +383,11 @@ export default {
chooseList
.
map
(
e
=>
{
if
(
e
.
goodsFlag
==
2
)
ids
.
push
(
e
.
multipleSpecificationsGoods
.
id
)
})
return
ids
.
includes
(
i
.
multipleSpecificationsGoods
.
id
)
}
if
(
goodsFlag
==
3
)
id
=
packageGoods
.
packageCode
else
id
=
goods
.
goodsId
if
(
currentIds
.
length
)
active
=
currentIds
.
includes
(
id
)
if
(
currentIds
.
length
)
active
=
currentIds
.
includes
(
String
(
id
)
)
return
active
},
handlePickerChange
(
e
,
{
...
...
@@ -411,11 +419,17 @@ export default {
let
goodsArr
=
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationGoodsMap
[
str
]
//当多规格商品只有一个时,直接选中
if
(
goodsArr
.
length
==
1
)
{
let
{
chooseList
}
=
this
,
addIndex
=
-
1
chooseList
.
map
((
item
,
ind
)
=>
{
if
(
item
.
goodsFlag
==
2
&&
item
.
multipleSpecificationsGoods
.
id
==
goodsList
[
index
].
multipleSpecificationsGoods
.
id
)
addIndex
=
ind
})
goodsList
[
index
].
active
=
true
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
=
goodsArr
[
0
]
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
goodsId
=
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
merchantGoodsId
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
specificationStr
=
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
specificationData
.
replace
(
/;~;/g
,
'/'
)
this
.
chooseList
.
push
(
goodsList
[
index
])
if
(
addIndex
==
-
1
)
this
.
chooseList
.
push
(
goodsList
[
index
])
else
this
.
chooseList
[
addIndex
]
=
goodsList
[
index
]
this
.
$emit
(
'choose'
,
this
.
chooseList
)
}
else
{
//多个多规格商品时出现弹窗
...
...
@@ -442,12 +456,16 @@ export default {
})
let
{
chooseList
}
=
this
chooseList
.
forEach
((
item
,
ind
)
=>
{
if
(
item
.
multipleSpecificationsGoods
.
id
=
==
goodsList
[
index
].
multipleSpecificationsGoods
.
id
)
{
if
(
item
.
goodsFlag
==
2
&&
item
.
multipleSpecificationsGoods
.
id
==
goodsList
[
index
].
multipleSpecificationsGoods
.
id
)
{
chooseList
.
splice
(
ind
,
1
)
console
.
log
(
chooseList
)
}
})
// this.chooseList = chooseList
console
.
log
(
this
.
chooseList
)
this
.
$emit
(
'choose'
,
this
.
chooseList
)
}
// console.log(this.list, index, goodsList[index])
this
.
$set
(
this
.
list
,
index
,
goodsList
[
index
])
}
else
{
if
(
goodsList
[
index
].
active
)
{
...
...
@@ -458,7 +476,7 @@ export default {
})
let
{
chooseList
}
=
this
chooseList
.
forEach
((
item
,
ind
)
=>
{
if
(
item
.
multipleSpecificationsGoods
.
id
===
goodsList
[
index
].
multipleSpecificationsGoods
.
id
)
{
if
(
item
.
goodsFlag
==
2
&&
item
.
multipleSpecificationsGoods
.
id
===
goodsList
[
index
].
multipleSpecificationsGoods
.
id
)
{
chooseList
.
splice
(
ind
,
1
)
}
})
...
...
@@ -551,9 +569,10 @@ export default {
.title
{
min-height
:
toRpx
(
88
);
padding
:
toRpx
(
24
)
0
toRpx
(
20
);
.goods-name
{
max-width
:
80%
;
}
}
.goods-name
{
max-width
:
80%
;
word-break
:
break-all
;
}
.base-tips
{
margin-bottom
:
20
rpx
;
...
...
components/OrderPopup/config.js
View file @
4f0c3ea
...
...
@@ -220,7 +220,7 @@ const componentConfig = {
loadComplete
:
false
,
placeholder
:
'查找'
,
nullTips
:
'请选择客户'
,
idKey
:
'
phone
'
,
idKey
:
'
customerId
'
,
cacheData
:
[],
loadComplete
:
false
,
searchValue
:
''
,
...
...
env.js
View file @
4f0c3ea
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'beta'
]
const
index
=
1
const
index
=
2
/**
*
0本地
...
...
init.js
View file @
4f0c3ea
...
...
@@ -68,11 +68,11 @@ uni.signHttpConfig = {
},
error
:
(
error
,
config
)
=>
{
console
.
log
(
'error事件触发'
,
error
,
config
)
if
(
error
&&
error
.
errMsg
==
'request:fail'
)
{
if
(
error
&&
error
.
errMsg
==
'request:fail'
)
{
return
uni
.
showToast
({
title
:
'网络异常'
,
icon
:
'none'
,
})
title
:
'网络异常'
,
icon
:
'none'
,
})
}
uni
.
showToast
({
title
:
error
.
msg
||
'业务异常'
,
...
...
pages/boutique/tool/components/CreateOrder.vue
View file @
4f0c3ea
...
...
@@ -431,15 +431,7 @@ export default {
}
if
(
this
.
orderObj
.
standNo
)
{
const
vinRex
=
/^
(?=
.*
[
A-Za-z
])[
A-Za-z0-9
]{17}
$/
console
.
log
(
this
.
orderObj
.
standNo
,
vinRex
.
test
(
this
.
orderObj
.
standNo
))
if
(
!
vinRex
.
test
(
this
.
orderObj
.
standNo
))
{
uni
.
showToast
({
title
:
`请输入正确的VIN码`
,
icon
:
'none'
})
return
false
}
if
(
!
utils
.
validateVIN
(
this
.
orderObj
.
standNo
))
throw
'车架号校验不匹配,请核对后重新输入'
}
// 处理onlyLabel为true的特殊校验
...
...
pages/boutique/tool/components/DailyReport.vue
View file @
4f0c3ea
...
...
@@ -127,7 +127,7 @@
:placeholder=
"i.inputPlaceholder || '请输入'"
placeholder-class=
"placeholder"
@
blur=
"handleCarInputBlur($event, i , item , index)"
:maxlength=
"3"
:maxlength=
"
i.maxlength ||
3"
:key=
"dateKey[`$
{i.key}_${index}`]"
auto-blur
>
...
...
@@ -353,6 +353,7 @@ export default {
required
:
true
,
min
:
0
,
max
:
3000
,
maxlength
:
4
,
inputPlaceholder
:
''
},
{
...
...
@@ -362,6 +363,7 @@ export default {
required
:
true
,
min
:
0
,
max
:
3000
,
maxlength
:
4
,
inputPlaceholder
:
''
},
]),
...
...
@@ -635,11 +637,11 @@ export default {
handleCarInputBlur
(
e
,
i
,
item
,
index
)
{
let
{
value
}
=
e
.
detail
if
(
value
)
{
let
{
key
}
=
i
,
let
{
key
,
max
}
=
i
,
numbers
=
value
.
match
(
/
\d
+/g
)
numbers
=
numbers
?
numbers
.
join
(
''
)
:
''
if
(
numbers
.
length
>
1
)
numbers
=
numbers
.
replace
(
/^0+/
,
''
)
item
[
key
]
=
Math
.
min
(
Math
.
max
(
Number
(
numbers
),
0
),
100
).
toString
()
item
[
key
]
=
Math
.
min
(
Math
.
max
(
Number
(
numbers
),
0
),
max
).
toString
()
this
.
dateKey
[
`
${
key
}
_
${
index
}
`
]
=
Date
.
now
()
}
},
...
...
pages/equity/tool/components/ContractPopup.vue
View file @
4f0c3ea
...
...
@@ -87,7 +87,18 @@ export default {
methods
:
{
open
(
data
)
{
this
.
currentId
=
''
this
.
data
=
data
console
.
log
(
'data'
,
data
)
if
(
data
&&
data
.
zyPayUrl
)
{
const
urls
=
data
.
zyPayUrl
.
split
(
','
).
filter
(
url
=>
url
.
trim
())
this
.
$set
(
this
.
contractData
,
this
.
uploadField
.
key
,
urls
.
map
(
url
=>
({
url
:
url
.
trim
(),
type
:
this
.
getFileTypeFromUrl
(
url
.
trim
()),
name
:
this
.
getFileNameFromUrl
(
url
.
trim
()),
size
:
0
// 从字符串无法获取文件大小
})))
console
.
log
(
'this.contractData'
,
this
.
contractData
)
}
this
.
$nextTick
(()
=>
{
this
.
$refs
.
popup
.
open
()
})
...
...
@@ -270,7 +281,7 @@ export default {
// 获取合同文件数组
getContractFiles
()
{
const
files
=
this
.
contractData
[
this
.
uploadField
.
key
]
return
Array
.
isArray
(
files
)
?
files
:
[]
return
Array
.
isArray
(
files
)
?
files
:
[]
},
// 检查是否是PDF文件
...
...
@@ -367,10 +378,19 @@ export default {
}
return
true
},
confirm
()
{
if
(
this
.
validate
){
this
.
$emit
(
'onConfirm'
,
this
.
contractData
)
}
confirm
()
{
if
(
this
.
validate
)
{
this
.
$emit
(
'onConfirm'
,
this
.
contractData
)
}
},
getFileTypeFromUrl
(
url
)
{
const
ext
=
url
.
split
(
'.'
).
pop
().
toLowerCase
()
return
ext
===
'pdf'
?
'pdf'
:
'image'
},
// 从URL获取文件名
getFileNameFromUrl
(
url
)
{
return
url
.
split
(
'/'
).
pop
().
split
(
'?'
)[
0
]
||
'未知文件'
},
}
}
...
...
pages/equity/tool/components/CreateOrder.vue
View file @
4f0c3ea
...
...
@@ -58,7 +58,10 @@
</GlCell>
</view>
<view
class=
"btns flex"
>
<view
class=
"btn save"
>
存草稿
</view>
<view
class=
"btn save"
@
click=
"handleEditSave"
>
存草稿
</view>
<view
@
click=
"submit"
class=
"btn"
...
...
@@ -88,6 +91,7 @@
<!-- 支付弹框 -->
<OrderPay
ref=
"OrderPay"
@
closePopup=
"closePopup"
@
jumpSuccess=
"jumpSuccess"
/>
</view>
...
...
@@ -138,8 +142,6 @@ export default {
immediate
:
true
,
deep
:
true
},
// (orderInfo.payType == 2 ||orderInfo.payType ==5 || orderInfo.payType == 6 || orderInfo.payType == 7 )
// &&!orderInfo.resetOrder&&!orderInfo.selectOutTradeNoArr
'orderObj.payType'
:
{
handler
(
val
)
{
this
.
formList
[
4
].
map
(
e
=>
{
...
...
@@ -149,16 +151,24 @@ export default {
},
immediate
:
true
,
deep
:
true
},
transmissionOfData
:
{
handler
(
val
)
{
const
paramsData
=
val
?.
paramsData
||
{}
if
(
paramsData
&&
paramsData
.
id
)
this
.
paramsData
=
paramsData
},
deep
:
true
,
immediate
:
true
}
},
data
()
{
return
{
paramsData
:
{},
saveStatus
:
false
,
showUpload
:
false
,
titleList
,
formList
:
utils
.
deepClone
(
FORM_LIST
),
baseConfigData
:
{},
requiredList
:
[],
// 录单设置的必填项
orderObj
:
{
mode
:
1
,
payee
:
0
,
// 收款方式
...
...
@@ -211,16 +221,161 @@ export default {
mounted
()
{
this
.
baseConfigData
=
uni
.
$storage
.
get
(
'mock_data'
)
||
{}
this
.
initData
()
},
methods
:
{
async
getQuotationInfoById
(
id
)
{
try
{
let
{
goodsList
:
quotationGoodsList
}
=
this
,
data
=
await
uni
.
$api
.
equityApi
.
getQuotationInfoById
({
id
}),
{
orderObj
}
=
this
,
{
owner
,
insurancePrice
,
quotedPriceUpdate
}
=
data
uni
.
hideLoading
()
orderObj
.
price
=
this
.
divideByHundred
(
owner
.
price
)
orderObj
.
insurancePrice
=
this
.
divideByHundred
(
insurancePrice
)
orderObj
.
quotedPriceUpdate
=
this
.
divideByHundred
(
quotedPriceUpdate
)
orderObj
.
vdQuotationGoodsList
=
data
.
vdQuotationGoodsList
.
map
(
item
=>
{
item
.
price
=
this
.
divideByHundred
(
item
.
goodsPrice
)
return
item
}
)
if
(
owner
.
carSeriesId
)
{
orderObj
.
carInfo
=
{
carBrand
:
owner
.
carBrand
,
carBrandId
:
owner
.
carBrandId
,
carChildsBrandId
:
owner
.
carChildsBrandId
,
carChildsBrandName
:
owner
.
carChildsBrandName
,
carSeriesId
:
owner
.
carSeriesId
,
carSeriesName
:
owner
.
carSeriesName
,
}
orderObj
.
carBrandText
=
`
${
owner
.
carBrand
}
-
${
owner
.
carChildsBrandName
}
-
${
owner
.
carSeriesName
}
`
}
if
(
owner
.
city
)
{
let
[
provinceText
,
cityText
]
=
owner
.
city
.
split
(
'-'
)
if
(
cityText
)
{
orderObj
.
provinceText
=
provinceText
orderObj
.
cityText
=
cityText
}
else
{
orderObj
.
provinceText
=
owner
.
city
orderObj
.
cityText
=
owner
.
city
}
}
this
.
formList
[
1
].
map
(
e
=>
{
if
(
e
.
value
==
'salesType'
)
e
.
current
=
owner
.
salesType
if
(
e
.
value
==
'ownerGender'
)
e
.
current
=
owner
.
ownerGender
})
orderObj
.
skuGoods
=
data
.
vdQuotationGoodsList
.
reduce
((
pre
,
item
)
=>
{
// 是普通商品
if
(
!
item
.
packageName
&&
!
item
.
specificationsValue
)
{
console
.
log
(
item
)
let
obj
=
{
...
item
,
goodsInfo
:
item
,
upgradeGoodsId
:
item
.
goodsId
,
merchantGoodsId
:
item
.
goodsId
,
sellPrice
:
this
.
divideByHundred
(
item
.
goodsPrice
),
minSellPrice
:
quotationGoodsList
?.
find
(
val
=>
val
?.
goods
?.
merchantGoodsId
==
item
.
goodsId
)?.
goods
?.
minSellPrice
,
// 按商品数据对比补充详情商品最低价
validMinSellPrice
:
quotationGoodsList
?.
find
(
val
=>
val
?.
goods
?.
merchantGoodsId
==
item
.
goodsId
)?.
goods
?.
validMinSellPrice
// 按商品数据对比补充详情商品校验最低价字段
}
pre
.
push
({
goodsFlag
:
1
,
goods
:
obj
,
packageGoods
:
null
})
}
//套餐
if
(
item
.
packageName
)
{
let
obj
=
{
...
item
,
merchantGoodsId
:
item
.
goodsId
,
upgradeGoodsId
:
item
.
goodsId
,
sellPrice
:
this
.
divideByHundred
(
item
.
goodsPrice
),
number
:
1
,
minSellPrice
:
quotationGoodsList
?.
find
(
val
=>
val
.
packageGoods
?.
goodsList
?.
length
&&
val
.
packageGoods
?.
packageCode
==
item
?.
packageId
)
?.
packageGoods
?.
goodsList
?.
find
(
subV
=>
subV
.
merchantGoodsId
==
item
.
goodsId
)?.
minSellPrice
,
// 按商品数据对比补充详情商品最低价
validMinSellPrice
:
quotationGoodsList
?.
find
(
val
=>
val
.
packageGoods
?.
goodsList
?.
length
&&
val
.
packageGoods
?.
packageCode
==
item
?.
packageId
)
?.
packageGoods
?.
goodsList
?.
find
(
subV
=>
subV
.
merchantGoodsId
==
item
.
goodsId
)?.
validMinSellPrice
// 按商品数据对比补充详情商品校验最低价字段
}
let
index
=
pre
.
findIndex
(
ele
=>
{
if
(
ele
.
packageGoods
)
{
return
ele
.
packageGoods
.
packageId
==
item
.
packageId
}
})
if
(
index
!=
-
1
)
{
pre
[
index
].
packageGoods
.
goodsList
.
push
(
obj
)
pre
[
index
].
price
=
NP
.
plus
(
pre
[
index
].
price
,
obj
.
price
)
}
else
{
pre
.
push
({
goods
:
null
,
goodsFlag
:
3
,
price
:
item
.
price
,
packageGoods
:
{
...
item
,
packageCode
:
item
.
packageId
,
goodsList
:
[{
...
obj
}]
}
})
}
}
//多规格商品
if
(
!
item
.
packageName
&&
item
.
specificationsValue
)
{
let
specificdata
=
this
.
handleSpecificationsEcho
(
item
)
pre
=
pre
.
concat
(
specificdata
)
}
return
pre
},
[])
let
keyList
=
[
'mode'
,
'payee'
,
'payType'
,
'referrerId'
,
'referrer'
,
'deliveryId'
,
'deliveryName'
,
'notes'
,
'id'
,
'orderId'
],
customerKeyList
=
[
'owner'
,
'phone'
,
'certificateNo'
,
'carVin'
,
'seat'
,
,
'ownerGender'
,
'ageRange'
,
'hobby'
,
'companion'
,
'carColor'
,
'salesType'
,
'city'
]
keyList
.
map
(
key
=>
{
if
(
data
[
key
]
!=
null
)
orderObj
[
key
]
=
data
[
key
]
})
customerKeyList
.
map
(
key
=>
{
if
(
owner
[
key
]
!=
null
)
orderObj
[
key
]
=
owner
[
key
]
})
if
(
owner
.
id
)
orderObj
.
ownerId
=
owner
.
id
this
.
orderObj
=
orderObj
this
.
getConfig
()
setTimeout
(()
=>
{
this
.
changeTotalPrice
()
},
0
)
}
catch
(
error
)
{
uni
.
hideLoading
()
if
(
error
)
uni
.
showToast
({
title
:
error
,
icon
:
'none'
,
})
}
},
initData
()
{
console
.
log
(
'initData'
,
this
.
orderObj
.
id
)
// 埋点
// uni.$track.add({ eventCode: 'app_create_order' })
this
.
getConfig
()
const
{
paramsData
}
=
this
this
.
getSelectOrderGoodsList
()
if
(
!
paramsData
.
id
)
this
.
getConfig
()
this
.
getShopMerchantPointConfig
()
this
.
orderSettingList
()
},
...
...
@@ -294,7 +449,7 @@ export default {
if
(
val
.
value
==
'payee'
)
this
.
changePayee
()
},
// 弹窗确认回调
onConfirm
(
val
)
{
onConfirm
(
val
,
flag
)
{
console
.
log
(
val
,
'onConfirm'
)
this
.
externalData
=
[]
// // const { chooseContent } = val
...
...
@@ -319,14 +474,13 @@ export default {
this
.
$set
(
this
.
orderObj
,
'skuGoods'
,
chooseContent
)
}
else
{
// 过滤出已选的goodFlag为2的对象
const
selectedGoods
=
this
.
orderObj
.
skuGoods
.
filter
(
item
=>
item
.
goodsFlag
===
2
)
const
singleGoods
=
chooseContent
.
filter
(
item
=>
item
.
goodsFlag
!=
2
)
const
selectedGoods
=
this
.
orderObj
[
_typeValue
.
key
]
.
filter
(
item
=>
item
.
goodsFlag
===
2
)
const
singleGoods
=
flag
?
this
.
orderObj
[
_typeValue
.
key
].
filter
(
item
=>
item
.
goodsFlag
!=
2
)
:
chooseContent
.
filter
(
item
=>
item
.
goodsFlag
!=
2
)
const
moreGoods
=
chooseContent
.
filter
(
item
=>
item
.
goodsFlag
===
2
)
.
filter
(
item
=>
{
return
!
selectedGoods
.
some
(
selectedItem
=>
selectedItem
.
multipleSpecificationsGoods
.
goods
.
goodsId
===
item
.
multipleSpecificationsGoods
.
goods
.
goodsId
)
})
console
.
log
(
singleGoods
,
'==='
)
// 合并已选的goodFlag为2的对象
this
.
orderObj
.
skuGoods
=
[...
singleGoods
,
...
moreGoods
,
...
selectedGoods
]
...
...
@@ -386,8 +540,7 @@ export default {
if
(
item
.
value
===
'phone'
&&
!
phoneRex
.
test
(
value
))
throw
`请输入正确的
${
item
.
label
}
`
}
if
(
orderObj
.
carVin
)
{
const
vinRex
=
/^
(?=
.*
[
A-Za-z
])[
A-Za-z0-9
]{17}
$/
if
(
!
vinRex
.
test
(
orderObj
.
carVin
))
throw
'请输入正确的车架号'
if
(
!
utils
.
validateVIN
(
orderObj
.
carVin
))
throw
'车架号校验不匹配,请核对后重新输入'
}
if
(
onlyLabelItem
.
length
)
{
...
...
@@ -412,34 +565,40 @@ export default {
async
submit
()
{
if
(
!
this
.
checkRequired
()
||
await
this
.
checkDailyReport
())
return
this
.
handleSecondConfirmCheck
()
this
.
handleSecondConfirmCheck
(
true
)
},
async
handleSecondConfirmCheck
()
{
async
handleSecondConfirmCheck
(
check
)
{
try
{
let
orderInfo
=
this
.
getInsurance
(),
{
payType
}
=
orderInfo
if
(
if
(
check
&&
([
2
,
5
,
6
,
7
].
includes
(
+
payType
))
&&
!
(
orderInfo
.
transactionNo
&&
orderInfo
.
paymentDocList
.
length
)
)
return
this
.
showUpload
=
true
if
(
orderInfo
.
pay2Time
)
orderInfo
.
pay2Time
=
dayjs
(
orderInfo
.
pay2Time
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
uni
.
showLoading
({
title
:
'报价中...'
,
title
:
`
${
check
?
'报价'
:
'保存'
}
中...`
,
mask
:
true
})
const
data
=
await
uni
.
$api
.
equityApi
.
quotationAdd
(
orderInfo
)
orderInfo
.
check
=
check
let
apiName
=
orderInfo
.
id
?
'updateQuotation'
:
'quotationAdd'
const
data
=
await
uni
.
$api
.
equityApi
[
apiName
](
orderInfo
)
this
.
saveStatus
=
false
if
(
data
)
{
if
([
2
,
5
,
6
,
7
].
includes
(
+
payType
))
return
this
.
$emit
(
'jump'
,
'OrderManagement'
)
let
status
=
await
this
.
createWithPay
(
data
)
wx
.
hideLoading
()
if
(
status
)
this
.
$refs
.
OrderPay
.
open
(
data
)
else
throw
false
if
(
check
)
{
if
([
2
,
5
,
6
,
7
].
includes
(
+
payType
))
return
this
.
$emit
(
'jump'
,
'OrderManagement'
)
let
status
=
await
this
.
createWithPay
(
data
)
if
(
status
)
this
.
$refs
.
OrderPay
.
open
(
data
)
else
throw
false
}
else
this
.
$emit
(
'jump'
,
'OrderManagement'
)
}
else
throw
false
}
catch
(
error
)
{
console
.
log
(
error
)
this
.
saveStatus
=
false
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'
报价
失败'
,
title
:
'
提交
失败'
,
icon
:
'none'
})
}
...
...
@@ -472,9 +631,10 @@ export default {
}
}
if
(
orderInfo
.
id
)
params
.
id
=
orderInfo
.
id
params
.
merchantId4s
=
default4SStoreInfo
?.
merchantId
params
.
merchantName4s
=
default4SStoreInfo
?.
merchantName
orderInfo
.
price
=
this
.
multipliedByHundred
(
orderInfo
.
price
)
params
.
insurancePrice
=
this
.
multipliedByHundred
(
orderInfo
.
insurancePrice
)
...
...
@@ -503,7 +663,6 @@ export default {
if
(
item
.
packageGoods
)
{
item
=
item
.
packageGoods
item
.
goodsList
.
map
(
ele
=>
{
// console.log(ele, '2222');
let
obj
=
{
packageId
:
item
.
packageCode
,
packageName
:
item
.
packageName
,
...
...
@@ -540,12 +699,12 @@ export default {
[]
)
let
keyList
=
[
'mode'
,
'payee'
,
'payType'
,
'referrerId'
,
'referrer'
,
'deliveryId'
,
'deliveryName'
,
'total'
,
'notes'
,
'tradeNo'
,
'transactionNo'
,
'paymentDocList'
,
'pay2Time'
'deliveryId'
,
'deliveryName'
,
'total'
,
'notes'
,
'tradeNo'
,
'transactionNo'
,
'paymentDocList'
,
'pay2Time'
,
'id'
,
'orderId'
],
customerKeyList
=
[
'owner'
,
'phone'
,
'certificateNo'
,
'carVin'
,
'seat'
,
'price'
,
'ownerGender'
,
'city'
,
'ageRange'
,
'hobby'
,
'companion'
,
'carColor'
,
'salesType'
]
keyList
.
map
(
key
=>
{
if
(
orderInfo
[
key
]
!=
null
)
params
[
key
]
=
orderInfo
[
key
]
...
...
@@ -553,6 +712,7 @@ export default {
customerKeyList
.
map
(
key
=>
{
if
(
orderInfo
[
key
]
!=
null
)
params
.
owner
[
key
]
=
orderInfo
[
key
]
})
if
(
orderInfo
.
ownerId
)
params
.
owner
.
id
=
orderInfo
.
ownerId
return
params
},
// 乘以100保留两位小数点
...
...
@@ -628,177 +788,67 @@ export default {
this
.
changePayee
()
},
changePayee
()
{
const
cell
=
this
.
formList
[
4
].
find
(
item
=>
item
.
value
===
'payType'
)
const
cell
=
this
.
formList
[
4
].
find
(
item
=>
item
.
value
===
'payType'
),
{
payType
}
=
this
.
orderObj
if
(
cell
)
{
cell
.
radioList
=
this
.
orderObj
.
payee
==
1
?
this
.
merchantPayList
:
this
.
djPayList
if
(
!
this
.
orderObj
.
id
&&
cell
.
radioList
&&
cell
.
radioList
.
length
>
0
)
{
cell
.
current
=
cell
.
radioList
[
0
].
value
let
index
=
cell
.
radioList
.
findIndex
(
i
=>
i
.
value
==
payType
)
if
(
index
==
-
1
)
index
=
0
if
(
cell
.
radioList
&&
cell
.
radioList
.
length
>
0
)
{
cell
.
current
=
cell
.
radioList
[
index
].
value
// 使用 $set 确保响应式更新
this
.
$set
(
this
.
orderObj
,
'payType'
,
cell
.
radioList
[
0
].
value
)
this
.
$set
(
this
.
orderObj
,
'payType'
,
cell
.
radioList
[
index
].
value
)
}
}
},
// 商品列表
async
getSelectOrderGoodsList
()
{
const
{
userInfo
}
=
this
const
{
userInfo
,
paramsData
}
=
this
if
(
paramsData
.
id
)
uni
.
showLoading
({
title
:
'加载中...'
,
mask
:
true
})
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getSelectOrderGoodsList
({
merchantId
:
userInfo
.
shopMerchantId
,
sceneType
:
userInfo
.
sceneType
})
this
.
goodsList
=
res
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
}
//商品多规格
if
(
val
.
goodsFlag
==
2
)
{
val
.
multipleSpecificationsGoods
.
specificationList
.
forEach
(
item
=>
{
item
.
specificationSelectValueList
=
[]
item
.
specificationValueList
.
forEach
(
second
=>
{
if
(
second
.
show
)
{
item
.
specificationSelectValueList
.
push
(
second
.
specificationValue
)
}
})
})
this
.
otherProduct
.
push
(
val
)
}
})
const
subOrderList
=
this
.
subOrderList
||
[]
console
.
log
(
'subOrderList'
,
subOrderList
)
let
chooseList
=
[]
subOrderList
.
map
(
e
=>
{
// 普通商品
if
(
e
&&
!
e
.
packageName
)
{
if
(
e
.
specificationData
.
indexOf
(
';~;'
)
==
-
1
)
{
// 修复取值字段名字错误问题
if
(
!
e
.
price
)
{
e
.
price
=
utils
.
decimal
(
Number
(
e
.
totalPrice
/
e
.
number
),
2
)
//最低价
}
e
.
sellPrice
=
e
.
price
e
.
goodsId
=
e
.
merchantGoodsId
if
(
!
e
.
minSellPrice
)
e
.
minSellPrice
=
e
.
upgradeShopMinPrice
e
.
goodsInfo
=
{
goodsName
:
e
.
upgradeGoodsAlias
||
e
.
upgradeGoodsName
}
e
.
merchantGoodsId
=
e
.
merchantGoodsId
||
e
.
id
chooseList
.
push
({
goodsFlag
:
1
,
goods
:
e
,
number
:
e
.
number
,
active
:
true
})
}
// 多规格商品
if
(
e
.
specificationData
.
indexOf
(
';~;'
)
>
-
1
)
{
// 修复取值字段名字错误问题
if
(
!
e
.
price
)
{
e
.
price
=
utils
.
decimal
(
Number
(
e
.
totalPrice
/
e
.
number
),
2
)
//最低价
e
.
sellPrice
=
e
.
price
}
e
.
goodsId
=
e
.
merchantGoodsId
if
(
!
e
.
minSellPrice
)
e
.
minSellPrice
=
e
.
upgradeShopMinPrice
e
.
goodsInfo
=
{
goodsName
:
e
.
upgradeGoodsAlias
||
e
.
upgradeGoodsName
}
e
.
count
=
e
.
number
e
.
merchantGoodsId
=
e
.
merchantGoodsId
||
e
.
id
let
specificdata
=
this
.
handleSpecificationsEcho
(
e
)
chooseList
=
chooseList
.
concat
(
specificdata
)
}
}
// 套餐
if
(
e
&&
e
.
packageName
)
{
e
.
packageGoodsOrderList
.
forEach
(
g
=>
{
g
.
oldPrice
=
g
.
sellPrice
||
g
.
upgradePrice
// g.sellPrice = g.sellPrice || g.upgradePrice;
g
.
price
=
g
.
totalPrice
?
Number
(
g
.
totalPrice
)
/
Number
(
g
.
number
)
:
g
.
sellPrice
g
.
sellPrice
=
g
.
price
})
e
.
goodsList
=
e
.
packageGoodsOrderList
e
.
upgradePrice
=
e
.
goodsList
.
reduce
((
prev
,
cur
)
=>
{
console
.
log
(
prev
,
cur
)
return
prev
+
cur
.
sellPrice
},
0
)
e
.
number
=
e
.
goodsList
.
length
?
e
.
goodsList
[
0
].
number
:
1
e
.
price
=
e
.
goodsList
.
reduce
((
prev
,
cur
)
=>
{
return
prev
+
Number
(
cur
.
totalPrice
)
/
Number
(
cur
.
number
)
},
0
)
chooseList
.
push
({
isType
:
'meal'
,
active
:
true
,
goodsFlag
:
3
,
packageGoods
:
e
,
number
:
e
.
number
,
totalPrice
:
e
.
price
})
}
})
const
_singleGoods
=
chooseList
.
filter
(
item
=>
item
.
goodsFlag
==
1
)
const
_packageGoods
=
chooseList
.
filter
(
item
=>
item
.
goodsFlag
==
3
)
const
_skuGoods
=
chooseList
.
filter
(
item
=>
item
.
goodsFlag
==
2
)
||
[]
console
.
log
(
_singleGoods
,
'singleGoods'
)
if
(
_singleGoods
)
{
const
noPositionGoods
=
_singleGoods
.
filter
(
item
=>
!
item
.
goods
.
upgradeGoodsPosition
)
if
(
noPositionGoods
.
length
>
0
)
{
_skuGoods
.
push
(...
noPositionGoods
)
}
}
if
(
_packageGoods
)
{
this
.
$set
(
this
.
orderObj
,
'package'
,
_packageGoods
)
}
if
(
_skuGoods
&&
_skuGoods
.
length
)
{
this
.
$set
(
this
.
orderObj
,
'skuGoods'
,
_skuGoods
)
}
this
.
changeTotalPrice
()
if
(
paramsData
.
id
)
this
.
getQuotationInfoById
(
paramsData
.
id
)
},
handleSpecificationsEcho
(
item
)
{
let
skuArr
=
[]
const
{
otherProduct
}
=
this
,
arr
=
item
.
specificationData
.
split
(
'/'
),
str
=
arr
.
join
(
';~;'
),
obj
=
{
count
:
item
.
count
,
goodsFlag
:
2
,
goods
:
null
,
active
:
true
,
isFlag
:
true
//初始化进来不显示标识
}
otherProduct
.
forEach
(
data
=>
{
console
.
log
(
'item'
,
item
)
let
{
goodsList
:
quotationGoodsList
}
=
this
,
skuArr
=
[],
arr
=
item
.
specificationsValue
.
split
(
'/'
),
str
=
arr
.
join
(
';~;'
);
quotationGoodsList
.
forEach
(
data
=>
{
if
(
data
.
goodsFlag
==
2
)
{
let
tempData
=
data
.
multipleSpecificationsGoods
.
specificationGoodsMap
[
str
]
if
(
tempData
)
{
tempData
.
forEach
(
temp
=>
{
if
(
temp
.
merchantGoodsId
==
item
.
goodsId
)
{
let
obj
=
{
goodsFlag
:
2
,
goods
:
null
,
}
obj
.
multipleSpecificationsGoods
=
{
...
data
.
multipleSpecificationsGoods
,
baseGoodsName
:
item
.
goodsName
||
item
.
upgradeGoodsName
,
goods
:
{
...
temp
,
price
:
item
.
price
,
sellPrice
:
item
.
price
,
goodsId
:
item
.
goodsId
,
specificationStr
:
item
.
specificationData
.
replace
(
/;~;/g
,
'/'
)
}
goods
:
temp
,
baseGoodsName
:
item
.
goodsName
}
temp
.
price
=
this
.
divideByHundred
(
item
.
goodsPrice
)
temp
.
goodsId
=
item
.
goodsId
temp
.
specificationStr
=
item
.
specificationsValue
console
.
log
(
'🚀'
,
obj
)
skuArr
.
push
(
obj
)
}
})
}
}
})
console
.
log
(
skuArr
)
return
skuArr
},
uploadConfirm
({
...
...
@@ -824,6 +874,7 @@ export default {
salesType
=
customerInfo
.
salesType
||
'0'
,
city
=
customerInfo
.
customerCity
Object
.
assign
(
orderObj
,
{
customerId
:
customerInfo
.
id
,
owner
:
customerInfo
.
customerName
,
phone
:
customerInfo
.
customerPhone
,
ownerGender
,
...
...
@@ -850,7 +901,7 @@ export default {
}
orderObj
.
city
=
city
}
if
(
customerInfo
.
carPrice
)
orderObj
.
price
=
customerInfo
.
carPrice
if
(
customerInfo
.
carPrice
)
orderObj
.
price
=
customerInfo
.
carPrice
if
(
customerInfo
.
salesUuid
)
{
orderObj
.
referrerId
=
customerInfo
.
salesUuid
orderObj
.
referrer
=
customerInfo
.
salesName
...
...
@@ -872,6 +923,34 @@ export default {
},
jumpSuccess
(
params
)
{
this
.
$emit
(
'jump'
,
'OrderDetail'
,
params
)
},
async
handleEditSave
()
{
let
{
saveStatus
}
=
this
if
(
saveStatus
)
return
false
this
.
saveStatus
=
true
this
.
handleSecondConfirmCheck
(
false
)
},
divideByHundred
:
str
=>
{
let
floatVal
=
parseFloat
(
str
)
if
(
isNaN
(
floatVal
))
{
return
0
}
floatVal
=
Math
.
round
(
str
*
100
)
/
10000
let
strVal
=
floatVal
.
toString
()
let
searchVal
=
strVal
.
indexOf
(
'.'
)
if
(
searchVal
<
0
)
{
searchVal
=
strVal
.
length
strVal
+=
'.'
}
while
(
strVal
.
length
<=
searchVal
+
2
)
{
strVal
+=
'0'
}
return
parseFloat
(
strVal
)
},
closePopup
(){
this
.
$emit
(
'jump'
,
'OrderManagement'
)
}
}
}
...
...
pages/equity/tool/components/DailyReport.vue
View file @
4f0c3ea
...
...
@@ -388,7 +388,7 @@ export default {
},
infoObject
()
{
let
{
tabIndex
,
carBandList
,
orderObj
:
{
templateType
,
totalOrderMoney
}
}
=
this
,
{
brandType
,
firstBrandId
}
=
carBandList
[
tabIndex
],
{
brandType
,
firstBrandId
}
=
carBandList
[
tabIndex
],
/**模版为广联权益 */
TemplateType3
=
templateType
==
3
,
//
NotAitoAndTemplateType3
=
brandType
!=
0
||
TemplateType3
,
//非问界 或者 广联权益 时隐藏
...
...
@@ -637,6 +637,8 @@ export default {
...
carBand
,
firstBrandId
,
firstBrandName
,
deliveryCountRecord
:
carBand
.
deliveryCount
,
notDeliveryCountRecord
:
carBand
.
notDeliveryCount
,
brandId
,
brandName
,
brandType
,
...
...
@@ -687,9 +689,9 @@ export default {
if
(
numbers
.
length
>
1
)
numbers
=
numbers
.
replace
(
/^0+/
,
''
)
this
.
orderObj
[
key
]
=
Math
.
min
(
Math
.
max
(
Number
(
numbers
),
0
),
100
).
toString
()
this
.
dateKey
[
key
]
=
Date
.
now
()
console
.
log
(
key
)
if
(
this
.
isNotEmpty
(
orderObj
.
recordStaffCount
)
&&
this
.
isNotEmpty
(
value
)
&&
orderObj
.
recordStaffCount
!=
value
&&
orderObj
.
lastStaffUuid
&&
userInfo
.
uuid
!=
orderObj
.
lastStaffUuid
...
...
@@ -718,6 +720,11 @@ export default {
)
},
handleCarInputBlur
(
e
,
i
,
item
,
index
)
{
const
{
orderObj
,
userInfo
,
carBandList
}
=
this
console
.
log
(
carBandList
,
'==='
)
let
{
value
}
=
e
.
detail
if
(
value
)
{
let
{
key
,
max
}
=
i
,
...
...
@@ -726,6 +733,31 @@ export default {
if
(
numbers
.
length
>
1
)
numbers
=
numbers
.
replace
(
/^0+/
,
''
)
item
[
key
]
=
Math
.
min
(
Math
.
max
(
Number
(
numbers
),
0
),
max
).
toString
()
this
.
dateKey
[
`
${
key
}
_
${
index
}
`
]
=
Date
.
now
()
if
([
'deliveryCount'
,
'notDeliveryCount'
].
includes
(
key
)
&&
orderObj
.
onBreak
==
'N'
)
{
let
checkName
=
`
${
key
}
Record`
,
checkValue
=
carBandList
[
index
][
checkName
]
if
(
this
.
isNotEmpty
(
item
[
key
])
&&
this
.
isNotEmpty
(
carBandList
[
index
][
checkName
])
&&
checkValue
!=
value
&&
orderObj
.
lastStaffUuid
&&
userInfo
.
uuid
!=
orderObj
.
lastStaffUuid
)
{
let
context
=
i
.
label
this
.
noticeObj
=
{
title
:
'重要提示'
,
text
:
`
${
context
}
与
${
orderObj
.
lastStaffName
}
提交不一致,再次确认!不一致提交日报时,
${
context
}
将被清空。`
,
type
:
'warning'
,
buttons
:
[
{
text
:
'确定'
,
type
:
'primary'
,
}
]
}
this
.
$nextTick
(()
=>
this
.
$refs
.
reportNotice
.
open
())
}
}
console
.
log
(
key
)
}
},
async
submit
()
{
...
...
@@ -842,7 +874,7 @@ export default {
showModal
=
true
carBandList
.
forEach
(
el
=>
{
if
(
el
.
brandType
==
item
.
brandType
)
{
context
+=
`【
${
item
.
brand
Name
}
】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值
${
item
.
differenceValue
context
+=
`【
${
item
.
tab
Name
}
】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值
${
item
.
differenceValue
}
,请相关驻店销售对齐核销再次提交\
t
\
n
`
}
})
...
...
pages/equity/tool/components/DefeatOrder.vue
View file @
4f0c3ea
...
...
@@ -43,20 +43,15 @@ 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
{
checkDailyReport
,
showNextModal
}
from
'@/utils/modalUtils'
import
{
DEFEAT_FORM_LIST
,
defeat_titleList
,
popupTypeEnum
,
payTypeList
}
from
'../contant'
import
{
debounce
}
from
'lodash'
import
NP
from
'number-precision'
export
default
{
name
:
'DefeatOrder'
,
components
:
{
GlCell
,
OrderPopup
,
Product
,
Package
,
SkuGoods
OrderPopup
},
props
:
{
transmissionOfData
:
{
...
...
@@ -141,6 +136,7 @@ export default {
formList
:
utils
.
deepClone
(
DEFEAT_FORM_LIST
),
userInfo
:
{},
baseConfigData
:
{},
valueKey
:
''
,
requiredList
:
[],
// 录单设置的必填项
orderObj
:
{
deafeatReason
:
''
,
...
...
@@ -182,7 +178,8 @@ export default {
djPayList
:
[],
// 嘀加收款方对应支付方式
merchantPayList
:
[],
// 门店收款方对应支付方式
configPayTypeList
:
[],
// 园区店配置支持的支付方式
payTypeList
payTypeList
,
defaultMsg
:
null
}
},
computed
:
{
...
...
@@ -203,7 +200,7 @@ export default {
this
.
initData
()
},
methods
:
{
initData
()
{
async
initData
()
{
const
{
userInfo
}
=
this
console
.
log
(
this
.
orderObj
,
'this.orderObj'
)
if
(
!
this
.
orderObj
.
id
)
{
...
...
@@ -220,7 +217,9 @@ export default {
merchantName
:
userInfo
.
shopMerchantName
})
}
await
this
.
getEmployeeList
()
this
.
getLastUserOrderInfo
()
this
.
getGoodsProduct
()
},
// handlerUserInfo() {
// let userInfo = uni.$storage.get('userInfo')
...
...
@@ -253,11 +252,30 @@ export default {
console
.
log
(
this
.
popupType
,
this
.
externalData
,
'-------------'
)
this
.
$refs
.
orderPopup
.
open
()
},
// 获取 销售顾问列表
async
getEmployeeList
()
{
console
.
log
(
'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
console
.
log
(
data
,
'data'
)
this
.
$set
(
this
.
orderObj
,
'employeeName'
,
data
[
0
].
staffName
)
this
.
orderObj
.
userId
=
data
[
0
].
uuid
this
.
orderObj
.
referrerId
=
data
[
0
].
uuid
console
.
log
(
this
.
orderObj
,
'this.orderObj'
)
}
},
// 获取上一个订单的销售顾问信息 并且不是再次下单
async
getLastUserOrderInfo
()
{
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getLastUserOrderInfo
({
sellerUserId
:
this
.
userInfo
.
subLoginUser
.
uuid
})
console
.
log
(
res
,
'上一个订单的销售顾问信息'
)
this
.
$set
(
this
.
orderObj
,
'employeeName'
,
res
.
employeeName
)
this
.
orderObj
.
userId
=
res
.
userId
console
.
log
(
res
,
'上一个订单的销售顾问信息'
)
...
...
@@ -291,6 +309,12 @@ export default {
this
.
orderObj
.
customerName
=
chooseContent
.
customerName
this
.
orderObj
.
customerPhone
=
chooseContent
.
customerPhone
}
if
(
val
.
popupType
==
0
)
{
console
.
log
(
chooseContent
,
'chooseContent'
)
this
.
orderObj
.
employeeName
=
chooseContent
.
staffName
this
.
orderObj
.
userId
=
chooseContent
.
uuid
this
.
orderObj
.
referrerId
=
chooseContent
.
uuid
}
console
.
log
(
this
.
orderObj
)
},
checkRequired
()
{
...
...
@@ -378,45 +402,7 @@ export default {
console
.
log
(
this
.
orderObj
,
'提交参数'
)
let
{
default4SStoreInfo
}
=
this
.
userInfo
console
.
log
(
default4SStoreInfo
,
'4s店信息'
)
let
params
=
{
owner
:
{
ageRange
:
''
,
carBrand
:
''
,
carBrandId
:
''
,
carChildsBrandId
:
''
,
carChildsBrandName
:
''
,
carColor
:
''
,
carSeriesId
:
''
,
carSeriesName
:
''
,
carVin
:
''
,
certificateNo
:
''
,
city
:
''
,
companion
:
''
,
confirmStatus
:
false
,
owner
:
''
,
//客户姓名
ownerGender
:
''
,
phone
:
''
,
//客户手机号
price
:
''
,
salesType
:
0
,
saveStatus
:
false
,
seat
:
5
},
total
:
1
,
mode
:
1
,
check
:
true
,
insurancePrice
:
0
,
merchantId4s
:
default4SStoreInfo
.
merchantId
,
merchantName4s
:
default4SStoreInfo
.
merchantName
,
minEquityPrice
:
0
,
payType
:
1
,
defeatOrder
:
true
,
payee
:
0
,
paymentDocList
:
[],
quotedPriceUpdate
:
0
,
referrer
:
''
,
//推荐人,
referrerId
:
''
,
//
transactionNo
:
''
}
let
params
=
this
.
defaultMsg
params
.
owner
.
owner
=
this
.
orderObj
.
customerName
params
.
owner
.
phone
=
this
.
orderObj
.
customerPhone
params
.
owner
.
salesType
=
this
.
orderObj
.
salesType
...
...
@@ -424,7 +410,7 @@ export default {
params
.
referrerId
=
this
.
orderObj
.
userId
params
.
remark
=
this
.
orderObj
.
deafeatReason
params
.
defeatOrderTime
=
this
.
orderObj
.
createDate
+
' 00:00:00'
params
.
payee
=
0
console
.
log
(
params
,
'rucan'
)
uni
.
showLoading
({
title
:
'提交中...'
,
...
...
@@ -442,19 +428,171 @@ export default {
}
},
300
),
// 获取
销售顾问列表
async
getEmployeeLis
t
()
{
const
{
userInfo
,
orderObj
}
=
this
const
{
shopMerchantId
,
sceneType
,
merchantId
}
=
userInfo
,
data
=
await
uni
.
$api
.
popupApi
.
getEmployee
List
({
merchantId
:
orderObj
.
idKey
==
'sellerUserId'
?
merchantId
:
shopM
erchantId
,
s
ceneList
:
orderObj
.
idKey
==
'sellerUserId'
?
''
:
[
sceneType
]
// 获取
商品列表数据
getGoodsProduc
t
()
{
let
{
default4SStoreInfo
}
=
this
.
userInfo
uni
.
$api
.
equityApi
.
quotationGoods
List
({
merchantId
:
default4SStoreInfo
.
m
erchantId
,
s
uitCarPrice
:
''
})
if
(
data
&&
data
.
length
)
{
this
.
employeeList
=
data
// this.$set(this.orderObj, 'employeeName', data[0].staffName)
// this.orderObj.userId = data[0].uuid
.
then
(
data
=>
{
data
=
data
.
map
(
ele
=>
{
if
(
ele
.
goods
)
{
let
item
=
ele
.
goods
ele
.
goods
=
{
...
item
,
goodsId
:
item
.
merchantGoodsId
,
// goodsNameAlias: item.upgradeGoodsAlias,
goodsNameAlias
:
item
.
goodsAlias
||
item
.
goodsNameAlias
,
appreciation
:
item
?.
appreciation
,
goodsName
:
item
?.
upgradeGoodsName
,
quotationGoodsServiceItemsRelationDTOList
:
item
?.
upgradeGoodsServiceItemsList
,
titlePictureUrl
:
item
.
goodsInfo
?.
thumbUrl
}
}
if
(
ele
.
packageGoods
)
{
let
item
=
ele
.
packageGoods
item
.
goodsList
=
item
.
goodsList
.
map
(
ele
=>
{
// console.log(ele, '2222');
let
obj
=
{
packageId
:
item
.
packageCode
,
packageName
:
item
.
packageName
,
packageNameAlias
:
item
.
packageAlias
||
item
.
packageNameAlias
,
goodsId
:
ele
.
merchantGoodsId
||
ele
.
upgradeGoodsId
,
goodsName
:
ele
.
upgradeGoodsName
||
ele
.
goodsName
,
goodsNameAlias
:
ele
.
goodsAlias
||
ele
.
goodsNameAlias
,
// shopMinPrice: item.shopMinPrice,
goodsPrice
:
this
.
multipliedByHundred
(
ele
.
price
),
sellPrice
:
ele
.
sellPrice
}
return
obj
// ele.push(obj);
})
ele
.
packageGoods
.
sellPrice
=
item
.
goodsList
.
reduce
((
pre
,
item
)
=>
{
pre
=
NP
.
plus
(
pre
,
item
.
sellPrice
)
return
pre
},
0
)
}
return
ele
})
console
.
log
(
data
,
'data'
)
this
.
setDefailtInfo
(
data
)
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
},
// 处理默认隐藏信息
setDefailtInfo
(
data
)
{
let
vdQuotationGoodsList
=
[]
if
(
Array
.
isArray
(
data
))
{
let
item
=
data
[
0
]
if
(
item
.
goods
)
{
item
=
item
.
goods
const
obj
=
{
goodsId
:
item
.
merchantGoodsId
,
goodsName
:
item
.
goodsName
,
goodsNameAlias
:
item
.
goodsAlias
||
item
.
goodsNameAlias
,
// shopMinPrice: item.shopMinPrice,
goodsPrice
:
this
.
multipliedByHundred
(
item
.
sellPrice
)
}
// pre.push(obj);
item
=
obj
vdQuotationGoodsList
.
push
(
item
)
}
if
(
item
.
packageGoods
)
{
let
packageGoods
=
item
.
packageGoods
item
=
item
.
packageGoods
item
=
item
.
goodsList
.
map
(
ele
=>
{
console
.
log
(
ele
,
'2222'
)
let
obj
=
{
packageId
:
packageGoods
.
packageCode
,
packageName
:
packageGoods
.
packageName
,
packageNameAlias
:
packageGoods
.
packageAlias
||
pachageGoods
.
packageNameAlias
,
goodsId
:
ele
.
goodsId
,
goodsName
:
ele
.
goodsName
,
goodsNameAlias
:
ele
.
goodsNameAlias
,
// shopMinPrice: item.shopMinPrice,
goodsPrice
:
this
.
multipliedByHundred
(
ele
.
sellPrice
)
}
// pre.push(obj);
// item = obj
return
obj
})
// item.
vdQuotationGoodsList
=
item
}
// let item = {
// goodsId: firstItem.goodsId,
// goodsName: firstItem.goodsName,
// goodsNameAlias: firstItem.goodsNameAlias,
// goodsPrice: NP.times(100, firstItem.sellPrice),
// }
console
.
log
(
item
,
'firstItem'
)
}
let
{
default4SStoreInfo
}
=
this
.
userInfo
const
msg
=
{
total
:
1
,
mode
:
1
,
check
:
true
,
insurancePrice
:
0
,
merchantId4s
:
default4SStoreInfo
.
merchantId
,
merchantName4s
:
default4SStoreInfo
.
merchantName
,
minEquityPrice
:
0
,
payType
:
1
,
paymentDocList
:
[],
quotedPriceUpdate
:
0
,
referrer
:
''
,
//推荐人,
referrerId
:
''
,
//
transactionNo
:
''
,
vdQuotationGoodsList
,
owner
:
{
ageRange
:
''
,
carBrand
:
''
,
carBrandId
:
''
,
carChildsBrandId
:
''
,
carChildsBrandName
:
''
,
carColor
:
''
,
carSeriesId
:
''
,
carSeriesName
:
''
,
carVin
:
''
,
certificateNo
:
''
,
city
:
''
,
companion
:
''
,
confirmStatus
:
false
,
owner
:
''
,
//客户姓名
ownerGender
:
''
,
phone
:
''
,
//客户手机号
price
:
''
,
salesType
:
0
,
saveStatus
:
false
,
seat
:
5
},
defeatOrder
:
true
}
this
.
defaultMsg
=
msg
},
// 乘以100保留两位小数点
multipliedByHundred
:
str
=>
{
let
floatVal
=
parseFloat
(
str
)
if
(
isNaN
(
floatVal
))
{
return
0
}
floatVal
=
Math
.
round
(
str
*
10000
)
/
100
let
strVal
=
floatVal
.
toString
()
let
searchVal
=
strVal
.
indexOf
(
'.'
)
if
(
searchVal
<
0
)
{
searchVal
=
strVal
.
length
strVal
+=
'.'
}
while
(
strVal
.
length
<=
searchVal
+
2
)
{
strVal
+=
'0'
}
return
parseFloat
(
strVal
)
},
reasonClick
(
text
)
{
...
...
pages/equity/tool/components/OrderCard.vue
View file @
4f0c3ea
...
...
@@ -118,13 +118,24 @@
</view>
<NoticePopup
ref=
"notice"
title=
"提示"
text=
"是否撤销该笔客户工单,撤销后客户工单为「已撤销」状态,不再统计订单数和订单金额。"
type=
"warning"
></NoticePopup>
<ContractPopup
ref=
"contractPopupRef"
@
onConfirm=
"onConfirm"
></ContractPopup>
<PublishPopup
ref=
"defeatOrderPopup"
popupClass=
"defeatOrderPopup"
type=
"center"
:showClose=
"true"
:isMaskClick=
"false"
title=
"战败原因"
>
<template
#
content
>
<view
class=
"defeat-order-box modatcontent"
>
<textarea
class=
"defeat-textarea"
placeholder=
"请填写战败原因"
maxlength=
"15"
v-model=
"textareaValue"
/>
</view>
</
template
>
<
template
#
footer
>
<view
class=
"footer-box flex justify-center"
>
<view
class=
"cancle-btn btn"
@
click
.
stop=
"cancelSelection"
>
取消
</view>
<view
class=
"sure-btn btn"
@
click
.
stop=
"confirmSelection"
>
确认
</view>
</view>
</
template
>
</PublishPopup>
</view>
</template>
<
script
>
import
order_mixins
from
'../../order_mixins.js'
import
{
interceptionMixin
}
from
'@/mixin/index'
import
utils
from
'@/utils/utils'
import
{
checkDailyReport
,
showNextModal
}
from
'@/utils/modalUtils'
import
PublishPopup
from
'@/components/PublishPopup.vue'
import
NoticePopup
from
'@/components/NoticePopup.vue'
import
ContractPopup
from
'./ContractPopup.vue'
...
...
@@ -380,7 +391,8 @@ export default {
3
:
'去处理'
,
'-1'
:
'去报价'
,
5
:
'去处理'
}
},
textareaValue
:
''
}
},
mounted
()
{
...
...
@@ -419,6 +431,7 @@ export default {
break
case
'defeat'
:
// 处理战败
this
.
defeatOrder
()
break
case
'revoke'
:
// 处理撤销
...
...
@@ -468,7 +481,11 @@ export default {
},
//上传协议
uploadContract
()
{
this
.
$refs
.
contractPopupRef
.
open
({})
this
.
$refs
.
contractPopupRef
.
open
(
this
.
orderCardDetail
)
},
//战败
defeatOrder
()
{
this
.
$refs
.
defeatOrderPopup
.
open
(
this
.
orderCardDetail
)
},
showRefundAlert
(
type
)
{
const
text
=
type
==
'error'
?
'订单已发起退款,禁止标记为错误工单!如需标记错误请联系总部运营。'
:
'订单已发起退款,禁止撤销!如需撤销请联系总部运营。'
...
...
@@ -508,6 +525,31 @@ export default {
}
})
},
confirmSelection
()
{
if
(
this
.
textareaValue
)
{
uni
.
$api
.
equityApi
.
updateOrderStatus
({
id
:
this
.
orderCardDetail
.
id
,
orderStatus
:
-
1
,
remark
:
this
.
textareaValue
})
.
then
(
res
=>
{
uni
.
showToast
({
title
:
'提交成功'
,
icon
:
'none'
})
setTimeout
(()
=>
{
this
.
$emit
(
'refresh'
)
// _this.getList();
},
500
)
})
}
else
{
uni
.
showToast
({
title
:
'内容不能为空'
,
icon
:
'none'
})
}
},
onConfirm
(
val
)
{
console
.
log
(
val
)
let
urls
=
[]
...
...
@@ -568,16 +610,19 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
//
Popup
样式
::v-deep
.
record
OrderPopup
.uni-popup__wrapper
{
::v-deep
.
defeat
OrderPopup
.uni-popup__wrapper
{
position
:
relative
;
border-radius
:
toRpx
(
32
);
opacity
:
1
;
width
:
toRpx
(
848
);
height
:
toRpx
(
968
);
background
:
linear-gradient
(
180deg
,
#e6f0ff
0%
,
#ffffff
100%
);
background-color
:
#fff
!important
;
.popup-top-box
{
text-align
:
left
;
padding
:
toRpx
(
48
)
toRpx
(
64
);
border-radius
:
toRpx
(
32
)
toRpx
(
32
)
0
0
;
background
:
linear-gradient
(
180deg
,
#e6f0ff
0%
,
#ffffff
100%
);
&-title
{
color
:
#1a1a1a
;
font-size
:
toRpx
(
40
);
...
...
@@ -644,6 +689,17 @@ export default {
margin-left
:
toRpx
(
32
);
}
}
.defeat-textarea
{
height
:
toRpx
(
568
);
border-radius
:
toRpx
(
16
);
background
:
#f5f7fa
;
width
:
100%
;
padding
:
toRpx
(
24
);
box-sizing
:
border-box
;
.uni-input-wrapper
{
background
:
#f5f7fa
;
}
}
}
.order-card
{
padding
:
toRpx
(
36
)
toRpx
(
32
);
...
...
pages/equity/tool/components/OrderManagement.vue
View file @
4f0c3ea
...
...
@@ -119,6 +119,9 @@ export default {
mounted
()
{
uni
.
$track
.
add
({
eventCode
:
'app_order_management'
})
this
.
localUserInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
||
{}
if
(
!
this
.
localUserInfo
.
isSuper
&&
this
.
localUserInfo
.
loginRole
!=
3
&&
this
.
localUserInfo
?.
loginRole
!=
6
)
{
this
.
searchObj
.
transferIds
=
[
this
.
localUserInfo
.
uuid
]
}
this
.
search
()
},
methods
:
{
...
...
@@ -177,15 +180,12 @@ export default {
},
getStatByStatus
()
{
const
localUserInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
console
.
log
(
this
.
searchObj
)
console
.
log
(
this
.
searchObj
,
'this.searchObj'
)
let
params
=
{
customerName
:
this
.
customerName
,
merchantIds
:
[
localUserInfo
.
shopMerchantId
],
...
this
.
searchObj
}
if
(
!
localUserInfo
.
isSuper
&&
localUserInfo
.
loginRole
!=
3
&&
localUserInfo
?.
loginRole
!=
6
)
{
params
.
transferIds
=
[
localUserInfo
.
uuid
]
}
if
(
params
?.
zyPayStatus
==
'1'
)
params
.
orderStatus
=
7
uni
.
$api
.
equityApi
.
orderStatistics
(
params
)
...
...
@@ -252,9 +252,7 @@ export default {
merchantIds
:
[
localUserInfo
.
shopMerchantId
],
...
this
.
searchObj
}
if
(
!
localUserInfo
.
isSuper
&&
localUserInfo
.
loginRole
!=
3
&&
localUserInfo
?.
loginRole
!=
6
)
{
params
.
transferIds
=
[
localUserInfo
.
uuid
]
}
if
(
params
?.
zyPayStatus
==
'1'
)
params
.
orderStatus
=
7
// if (staffUuid) {
// params.transferIds = [staffUuid]
// } else {
...
...
pages/equity/tool/components/OrderPay.vue
View file @
4f0c3ea
...
...
@@ -143,6 +143,7 @@ export default {
closePopup
()
{
this
.
show
=
false
this
.
$refs
.
payPopup
.
closePopup
()
this
.
$emit
(
'closePopup'
)
}
}
...
...
pages/equity/tool/components/SkuGoods.vue
View file @
4f0c3ea
...
...
@@ -192,7 +192,6 @@ export default {
// 验证价格输入
validatePrice
(
event
,
item
,
index
,
cindex
)
{
let
value
=
event
.
detail
.
value
console
.
log
(
'value'
,
value
)
// 如果为空则设置为0
if
(
!
value
||
value
.
trim
()
===
''
)
{
value
=
'0'
...
...
@@ -223,7 +222,6 @@ export default {
// if (!item.multipleSpecificationsGoods) {
// // 普通商品的最小价格检查
// if (item.goods.validMinSellPrice === 'Y' && item.goods.minSellPrice && parseFloat(value) < parseFloat(item.goods.minSellPrice)) {
// console.log('最小值', item.goods.minSellPrice)
// uni.showToast({
// title: '单价不可低于商品最低价',
// icon: 'none'
...
...
@@ -233,7 +231,6 @@ export default {
// } else if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) {
// // 多规格商品的最小价格检查
// if (item.multipleSpecificationsGoods.goods.validMinSellPrice === 'Y' && item.multipleSpecificationsGoods.goods.minSellPrice && parseFloat(value) < parseFloat(item.multipleSpecificationsGoods.goods.minSellPrice)) {
// console.log('最小值', item.multipleSpecificationsGoods.goods.minSellPrice)
// uni.showToast({
// title: '单价不可低于商品最低价',
// icon: 'none'
...
...
@@ -246,7 +243,6 @@ export default {
//如果没有多规格商品,更新普通商品的价格
this
.
$set
(
this
.
list
[
index
].
goods
,
'sellPrice'
,
value
)
}
else
{
console
.
log
(
123
)
this
.
$set
(
this
.
list
[
index
].
packageGoods
.
goodsList
[
cindex
],
'sellPrice'
,
value
)
}
}
else
if
(
item
.
multipleSpecificationsGoods
&&
item
.
multipleSpecificationsGoods
.
goods
)
{
...
...
@@ -264,7 +260,6 @@ export default {
if
(
!
value
||
value
.
trim
()
===
''
||
parseInt
(
value
)
===
0
)
{
value
=
'1'
}
console
.
log
(
value
,
'1'
)
// 更新值
if
(
!
item
.
multipleSpecificationsGoods
)
{
this
.
$set
(
item
.
goods
,
'number'
,
value
)
...
...
@@ -272,7 +267,6 @@ export default {
// 强制更新多规格商品的数量
this
.
$set
(
item
.
multipleSpecificationsGoods
,
'number'
,
value
)
}
console
.
log
(
item
,
'2'
)
this
.
$emit
(
'changeTotalPrice'
)
},
// 增加数量
...
...
@@ -356,7 +350,7 @@ export default {
<
style
scoped
lang=
"scss"
>
.shop-list
{
padding
-right
:
toRpx
(
32
)
;
padding
:
0
toRpx
(
32
)
toRpx
(
32
)
0
;
.shop-item
{
display
:
flex
;
...
...
pages/equity/tool/contant.js
View file @
4f0c3ea
...
...
@@ -102,7 +102,7 @@ const FORM_LIST = [
value
:
'carBrandText'
,
type
:
'select'
,
key
:
'carBrand'
,
required
:
false
required
:
false
},
{
label
:
'车辆颜色'
,
...
...
@@ -115,7 +115,7 @@ const FORM_LIST = [
value
:
'carVin'
,
maxlength
:
'17'
,
type
:
'input'
,
required
:
false
required
:
false
},
{
label
:
'座位数'
,
...
...
@@ -129,7 +129,8 @@ const FORM_LIST = [
value
:
'price'
,
maxlength
:
'8'
,
type
:
'input'
,
required
:
true
required
:
true
,
inputType
:
'digit'
}
],
[
...
...
utils/utils.js
View file @
4f0c3ea
...
...
@@ -265,6 +265,28 @@ const filterValue = (val, unit = '') => {
return
`
${
val
}${
unit
}
`
}
/**
*
* 检测VIN码
*/
function
validateVIN
(
vin
)
{
if
(
vin
.
length
!==
17
)
return
false
;
const
weights
=
[
8
,
7
,
6
,
5
,
4
,
3
,
2
,
10
,
0
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
];
const
charMap
=
{
'A'
:
1
,
'B'
:
2
,
'C'
:
3
,
'D'
:
4
,
'E'
:
5
,
'F'
:
6
,
'G'
:
7
,
'H'
:
8
,
'J'
:
1
,
'K'
:
2
,
'L'
:
3
,
'M'
:
4
,
'N'
:
5
,
'P'
:
7
,
'R'
:
9
,
'S'
:
2
,
'T'
:
3
,
'U'
:
4
,
'V'
:
5
,
'W'
:
6
,
'X'
:
7
,
'Y'
:
8
,
'Z'
:
9
};
let
sum
=
0
;
for
(
let
i
=
0
;
i
<
17
;
i
++
)
{
const
char
=
vin
[
i
].
toUpperCase
();
const
value
=
charMap
[
char
]
||
parseInt
(
char
,
10
);
sum
+=
value
*
weights
[
i
];
}
const
checkDigit
=
(
sum
%
11
)
===
10
?
'X'
:
(
sum
%
11
).
toString
();
return
checkDigit
===
vin
[
8
];
}
export
default
{
compareVersions
,
convertDateTimeFormat
,
...
...
@@ -285,5 +307,6 @@ export default {
showNoAccess
,
setCopyData
,
refreshPageData
,
filterValue
filterValue
,
validateVIN
}
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