Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-services
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5132e9f2
authored
Nov 25, 2022
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
玻璃&定制权益
1 parent
b3ea87d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
19 deletions
package.json
src/views/beforeSale/editEquity.vue
src/views/beforeSale/equityList.vue
package.json
View file @
5132e9f
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
"dayjs"
:
"^1.10.7"
,
"dayjs"
:
"^1.10.7"
,
"el-tree-transfer"
:
"^2.2.6"
,
"el-tree-transfer"
:
"^2.2.6"
,
"element-ui"
:
"^2.4.5"
,
"element-ui"
:
"^2.4.5"
,
"glsx-common"
:
"^
1.4.6
"
,
"glsx-common"
:
"^
2.0.4
"
,
"glsx-components"
:
"^1.5.2"
,
"glsx-components"
:
"^1.5.2"
,
"lodash"
:
"^4.17.21"
,
"lodash"
:
"^4.17.21"
,
"vue"
:
"^2.6.10"
,
"vue"
:
"^2.6.10"
,
...
...
src/views/beforeSale/editEquity.vue
View file @
5132e9f
...
@@ -49,7 +49,14 @@
...
@@ -49,7 +49,14 @@
<el-checkbox-group
v-model=
"curSelectPro"
:disabled=
"disabled"
>
<el-checkbox-group
v-model=
"curSelectPro"
:disabled=
"disabled"
>
<div
v-for=
"(item, index) in productList"
:key=
"index"
class=
"product_wrapper"
>
<div
v-for=
"(item, index) in productList"
:key=
"index"
class=
"product_wrapper"
>
<div
style=
"padding-left: 73px"
>
<div
style=
"padding-left: 73px"
>
<el-checkbox
@
change=
"changeCheckBox($event, item)"
:disabled=
"item.disabled"
:label=
"item.packageName"
></el-checkbox>
<!-- <el-checkbox @change="changeCheckBox($event, item, index)" :disabled="item.disabled" :label="errGlassName&&item.idName=='glass'?item.packageName+`(${errGlassName})`:item.packageName"> -->
<el-checkbox
@
change=
"changeCheckBox($event, item, index)"
:label=
"item.packageName"
:disabled=
"item.disabled"
>
<div
v-if=
"errGlassName && item.idName == 'glass'"
>
{{ item.packageName }}
<span
style=
"color: red; font-weight: normal"
>
({{ errGlassName }})
</span>
</div>
<div
v-else
>
{{ item.packageName }}
</div>
</el-checkbox>
</div>
</div>
<div
class=
"customer-form"
>
<div
class=
"customer-form"
>
<!-- 属性 -->
<!-- 属性 -->
...
@@ -502,7 +509,8 @@ export default {
...
@@ -502,7 +509,8 @@ export default {
crash
:
{},
crash
:
{},
stolen
:
{},
stolen
:
{},
tire
:
{},
tire
:
{},
vip
:
{}
vip
:
{},
glass
:
{}
},
},
// 其他信息
// 其他信息
editRuleOther
:
{
editRuleOther
:
{
...
@@ -705,13 +713,17 @@ export default {
...
@@ -705,13 +713,17 @@ export default {
pickerOptions
:
{},
pickerOptions
:
{},
pickerOptions2
:
{},
pickerOptions2
:
{},
hotline
:
''
,
hotline
:
''
,
compensationNameDisable
:
false
compensationNameDisable
:
false
,
errGlassName
:
''
}
}
},
},
watch
:
{
watch
:
{
'editForm.vehicle.invoicePrice'
(
newValue
,
oldValue
)
{
'editForm.vehicle.invoicePrice'
(
newValue
,
oldValue
)
{
this
.
editForm
.
vehicle
.
invoicePrice
=
limitPrice
(
newValue
,
oldValue
,
7
,
2
,
0
,
2000000
)
this
.
editForm
.
vehicle
.
invoicePrice
=
limitPrice
(
newValue
,
oldValue
,
7
,
2
,
0
,
2000000
)
if
(
this
.
currentVaildItem
)
{
this
.
vailGlassPackage
(
this
.
currentVaildItem
,
this
.
currentVaildIndex
)
}
},
},
'editForm.actualSalesPrice'
(
newValue
,
oldValue
)
{
'editForm.actualSalesPrice'
(
newValue
,
oldValue
)
{
this
.
editForm
.
actualSalesPrice
=
limitPrice
(
newValue
,
oldValue
,
7
,
2
)
this
.
editForm
.
actualSalesPrice
=
limitPrice
(
newValue
,
oldValue
,
7
,
2
)
...
@@ -819,8 +831,8 @@ export default {
...
@@ -819,8 +831,8 @@ export default {
// item.optionList.push({ value: '5', label: '5年' })
// item.optionList.push({ value: '5', label: '5年' })
// }
// }
let
optionObj
=
{
let
optionObj
=
{
'4'
:
{
value
:
'4'
,
label
:
'4年'
},
4
:
{
value
:
'4'
,
label
:
'4年'
},
'5'
:
{
value
:
'5'
,
label
:
'5年'
}
5
:
{
value
:
'5'
,
label
:
'5年'
}
}
}
if
(
res
.
servicePeriod
==
'4'
||
res
.
servicePeriod
==
'5'
)
{
if
(
res
.
servicePeriod
==
'4'
||
res
.
servicePeriod
==
'5'
)
{
const
Target
=
item
.
optionList
.
find
(
item
=>
{
const
Target
=
item
.
optionList
.
find
(
item
=>
{
...
@@ -855,8 +867,47 @@ export default {
...
@@ -855,8 +867,47 @@ export default {
}
}
})
})
},
},
// 轮胎玻璃验证车辆价格不能大于50w
vailGlassPackage
(
item
,
index
)
{
this
.
currentVaildItem
=
item
this
.
currentVaildIndex
=
index
let
glassNameFlag
=
this
.
curSelectPro
.
includes
(
this
.
vailGlassName
)
if
(
item
.
idName
==
'glass'
)
this
.
vailIndex
=
index
if
(
glassNameFlag
)
{
let
vaild
=
this
.
editForm
.
vehicle
.
invoicePrice
&&
Number
(
this
.
editForm
.
vehicle
.
invoicePrice
)
>
500000
if
(
vaild
)
{
this
.
productList
[
this
.
vailIndex
].
groupAttributeList
.
forEach
((
el
,
i
)
=>
{
if
(
el
.
groupName
==
'actual_sales_price'
)
this
.
vail_sale_price_index
=
i
})
this
.
$set
(
this
.
productList
[
this
.
vailIndex
],
'disabled'
,
true
)
this
.
$set
(
this
.
productList
[
this
.
vailIndex
].
groupAttributeList
[
this
.
vail_sale_price_index
],
'disabled'
,
true
)
this
.
errGlassName
=
'车辆价格超过50万,无法购买'
}
else
{
this
.
errGlassName
=
''
if
(
this
.
vailIndex
!=
undefined
)
this
.
$set
(
this
.
productList
[
this
.
vailIndex
],
'disabled'
,
false
)
if
(
this
.
vail_sale_price_index
)
this
.
$set
(
this
.
productList
[
this
.
vailIndex
].
groupAttributeList
[
this
.
vail_sale_price_index
],
'disabled'
,
false
)
}
}
else
{
if
(
this
.
vailIndex
)
this
.
$set
(
this
.
productList
[
this
.
vailIndex
],
'disabled'
,
false
)
if
(
this
.
vail_sale_price_index
)
this
.
$set
(
this
.
productList
[
this
.
vailIndex
].
groupAttributeList
[
this
.
vail_sale_price_index
],
'disabled'
,
false
)
}
},
// 轮胎玻璃提单参数处理
vaildGlassParams
(
para
){
const
index
=
this
.
checkCodeList
.
indexOf
(
this
.
vailGlassCode
)
if
(
index
!=-
1
&&
this
.
errGlassName
){
for
(
let
key
in
para
){
if
(
key
.
indexOf
(
`attributes[
${
index
}
]`
)
!=-
1
){
delete
para
[
key
]
}
}
return
para
}
return
para
},
// 切换套餐---赋默认值
// 切换套餐---赋默认值
changeCheckBox
(
e
,
item
)
{
changeCheckBox
(
e
,
item
,
index
)
{
this
.
vailGlassPackage
(
item
,
index
)
if
(
e
)
{
if
(
e
)
{
this
.
checkCodeList
.
push
(
item
.
packageCode
)
this
.
checkCodeList
.
push
(
item
.
packageCode
)
this
.
packageCodeList
.
push
(
item
.
packageCode
)
this
.
packageCodeList
.
push
(
item
.
packageCode
)
...
@@ -1073,7 +1124,6 @@ export default {
...
@@ -1073,7 +1124,6 @@ export default {
concactArr
.
forEach
(
item
=>
{
concactArr
.
forEach
(
item
=>
{
this
.
autoFormatProduct
=
Object
.
assign
(
this
.
autoFormatProduct
,
item
)
this
.
autoFormatProduct
=
Object
.
assign
(
this
.
autoFormatProduct
,
item
)
})
})
// console.log(this.autoFormatProduct, '定制权益')
}
}
},
},
// 处理传参价格问题
// 处理传参价格问题
...
@@ -1097,7 +1147,7 @@ export default {
...
@@ -1097,7 +1147,7 @@ export default {
})
})
},
},
// 获取产品的数据
// 获取产品的数据
to
Tes
tProductData
(
arr
)
{
to
Ge
tProductData
(
arr
)
{
arr
.
forEach
(
item
=>
{
arr
.
forEach
(
item
=>
{
if
(
item
.
packageName
.
includes
(
'整车全损'
))
{
if
(
item
.
packageName
.
includes
(
'整车全损'
))
{
item
.
idName
=
'car'
item
.
idName
=
'car'
...
@@ -1110,12 +1160,12 @@ export default {
...
@@ -1110,12 +1160,12 @@ export default {
this
.
getCase
(
item
.
planId
)
this
.
getCase
(
item
.
planId
)
}
else
if
(
item
.
packageName
.
includes
(
'盗抢'
))
{
}
else
if
(
item
.
packageName
.
includes
(
'盗抢'
))
{
item
.
idName
=
'stolen'
item
.
idName
=
'stolen'
}
else
if
(
item
.
packageName
.
includes
(
'尊享版'
))
{
}
else
if
(
item
.
packageType
==
1
)
{
item
.
idName
=
'vip'
}
else
if
(
item
.
packageName
.
includes
(
'舒享版'
))
{
item
.
idName
=
'vip'
}
else
if
(
item
.
packageName
.
includes
(
'优享版'
))
{
item
.
idName
=
'vip'
item
.
idName
=
'vip'
}
else
if
(
item
.
packageName
.
includes
(
'玻璃'
))
{
this
.
vailGlassName
=
item
.
packageName
// 备用
this
.
vailGlassCode
=
item
.
packageCode
item
.
idName
=
'glass'
}
}
item
.
disabled
=
false
item
.
disabled
=
false
item
.
serviceItems
=
item
.
serviceItemsList
.
length
?
item
.
serviceItemsList
.
map
(
k
=>
k
.
serviceName
).
join
(
','
)
:
''
item
.
serviceItems
=
item
.
serviceItemsList
.
length
?
item
.
serviceItemsList
.
map
(
k
=>
k
.
serviceName
).
join
(
','
)
:
''
...
@@ -1138,17 +1188,29 @@ export default {
...
@@ -1138,17 +1188,29 @@ export default {
}
else
if
(
e
.
attributeDesc
==
'购车类型'
)
{
}
else
if
(
e
.
attributeDesc
==
'购车类型'
)
{
e
.
optionList
=
this
.
baseData
.
buyCarTypeList
e
.
optionList
=
this
.
baseData
.
buyCarTypeList
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'0'
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'0'
}
else
if
((
item
.
idName
==
'tire'
||
item
.
idName
==
'crash'
||
item
.
idName
==
'vip'
)
&&
e
.
attributeDesc
==
'服务期限'
)
{
}
else
if
((
item
.
idName
==
'tire'
||
item
.
idName
==
'crash'
||
item
.
idName
==
'vip'
||
item
.
idName
==
'glass'
)
&&
e
.
attributeDesc
==
'服务期限'
)
{
if
(
item
.
idName
==
'tire'
||
item
.
idName
==
'crash'
)
{
if
(
item
.
idName
==
'tire'
||
item
.
idName
==
'crash'
)
{
e
.
optionList
=
this
.
baseData
.
servicePeriodList
e
.
optionList
=
this
.
baseData
.
servicePeriodList
}
else
{
}
else
{
e
.
optionList
=
this
.
baseData
.
servicePeriodList2
e
.
optionList
=
this
.
baseData
.
servicePeriodList2
}
}
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'1'
e
.
disabled
=
true
e
.
disabled
=
true
// v3.1.2--新版的定制权益-服务期限--改为1,2,3年---旧版的依然是一年
let
isOld
=
item
.
packageName
.
includes
(
'尊享版'
)
||
item
.
packageName
.
includes
(
'舒享版'
)
||
item
.
packageName
.
includes
(
'优享版'
)
if
(
item
.
idName
==
'vip'
&&
!
isOld
){
e
.
disabled
=
false
e
.
optionList
=
this
.
baseData
.
servicePeriodList
}
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'1'
}
else
if
(
e
.
attributeDesc
==
'生效日期'
)
{
}
else
if
(
e
.
attributeDesc
==
'生效日期'
)
{
let
nextDay
=
new
Date
().
getTime
()
+
24
*
60
*
60
*
1000
let
nextDay
=
new
Date
().
getTime
()
+
24
*
60
*
60
*
1000
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
utils
.
dateFormat
(
nextDay
)
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
utils
.
dateFormat
(
nextDay
)
if
(
item
.
idName
==
'glass'
)
{
let
tAdd2
=
new
Date
().
getTime
()
+
24
*
60
*
60
*
1000
*
2
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
utils
.
dateFormat
(
tAdd2
)
e
.
disabled
=
true
}
}
}
ele
.
tempobj
=
{
...
e
}
ele
.
tempobj
=
{
...
e
}
})
})
...
@@ -1273,7 +1335,7 @@ export default {
...
@@ -1273,7 +1335,7 @@ export default {
})
})
if
(
id
>
-
1
)
item
.
groupAttributeList
.
splice
(
id
+
1
,
0
,
obj
)
if
(
id
>
-
1
)
item
.
groupAttributeList
.
splice
(
id
+
1
,
0
,
obj
)
})
})
this
.
to
Tes
tProductData
(
res
)
this
.
to
Ge
tProductData
(
res
)
})
})
},
},
// 改建议价,实际销售价
// 改建议价,实际销售价
...
@@ -1654,6 +1716,7 @@ export default {
...
@@ -1654,6 +1716,7 @@ export default {
params
.
attributes
=
[]
params
.
attributes
=
[]
}
}
params
=
Object
.
assign
(
params
,
vaidObj
)
params
=
Object
.
assign
(
params
,
vaidObj
)
params
=
this
.
vaildGlassParams
(
params
)
this
.
updateEquity
(
params
)
this
.
updateEquity
(
params
)
},
},
updateEquity
(
params
)
{
updateEquity
(
params
)
{
...
@@ -1748,6 +1811,7 @@ export default {
...
@@ -1748,6 +1811,7 @@ export default {
...
params
,
...
params
,
...
vaidObj
...
vaidObj
}
}
params
=
this
.
vaildGlassParams
(
params
)
this
.
$apis
.
beforeSale
.
checkOrderApi
({
vin
:
this
.
editForm
.
vehicle
.
vin
,
contractNo
:
this
.
routeInfo
.
contractNo
||
''
}).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
checkOrderApi
({
vin
:
this
.
editForm
.
vehicle
.
vin
,
contractNo
:
this
.
routeInfo
.
contractNo
||
''
}).
then
(
res
=>
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
this
.
updateEquity
(
params
)
this
.
updateEquity
(
params
)
...
@@ -1801,7 +1865,8 @@ export default {
...
@@ -1801,7 +1865,8 @@ export default {
crash
:
{},
crash
:
{},
stolen
:
{},
stolen
:
{},
tire
:
{},
tire
:
{},
vip
:
{}
vip
:
{},
glass
:
{}
}
}
this
.
customProductList
=
[]
this
.
customProductList
=
[]
this
.
productList
=
[]
this
.
productList
=
[]
...
...
src/views/beforeSale/equityList.vue
View file @
5132e9f
...
@@ -329,7 +329,7 @@ export default {
...
@@ -329,7 +329,7 @@ export default {
label
:
'店面名称'
,
label
:
'店面名称'
,
line
:
1
,
line
:
1
,
prop
:
'merchantName'
,
prop
:
'merchantName'
,
width
:
'
16
0px'
,
width
:
'
20
0px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
merchantName
||
'-'
return
cellValue
.
merchantName
||
'-'
}
}
...
...
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