Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
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 a3dc1e00
authored
Jun 20, 2022
by
张权
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
数据迁移第一轮bug修复
1 parent
961b1abd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
43 deletions
src/views/beforeSale/editEquity.vue
src/views/config/addConfig.vue
src/views/beforeSale/editEquity.vue
View file @
a3dc1e0
...
@@ -228,7 +228,10 @@ export default {
...
@@ -228,7 +228,10 @@ export default {
size
:
'small'
,
size
:
'small'
,
submit
:
false
,
submit
:
false
,
isBlock
:
true
,
isBlock
:
true
,
serviceObj
:
{
PC0005
:
''
,
PC0007
:
''
},
footerLeft
:
'0'
,
footerLeft
:
'0'
,
footerWidth
:
'0'
,
footerWidth
:
'0'
,
editCarChildRef
:
'editChildRef'
,
editCarChildRef
:
'editChildRef'
,
...
@@ -389,13 +392,15 @@ export default {
...
@@ -389,13 +392,15 @@ export default {
{
{
required
:
true
,
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
return
value
?
callback
()
:
callback
(
new
Error
(
'请输入
'
+
(
this
.
editForm
.
cardType
==
'1'
?
'身份证'
:
'统一社会信息代码'
)
))
return
value
?
callback
()
:
callback
(
new
Error
(
'请输入
证件号码'
))
},
},
trigger
:
'change'
trigger
:
'change'
},
},
{
{
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
return
/
[
a-zA-Z0-9
]{18}
/
.
test
(
value
)
?
callback
()
:
callback
(
new
Error
(
'请输入18位数字或字母'
))
let
reg
=
this
.
editForm
.
cardType
==
1
||
this
.
editForm
.
cardType
==
2
?
/
[
a-zA-Z0-9
]{18}
/
.
test
(
value
)
:
/
\S\s{0,18}
/
.
test
(
value
)
let
tip
=
this
.
editForm
.
cardType
==
1
||
this
.
editForm
.
cardType
==
2
?
'请输入18位数字或字母'
:
'请输入证件号码'
return
reg
?
callback
()
:
callback
(
new
Error
(
tip
))
},
},
trigger
:
'change'
trigger
:
'change'
}
}
...
@@ -426,6 +431,7 @@ export default {
...
@@ -426,6 +431,7 @@ export default {
this
.
editForm
.
cardType
=
value
this
.
editForm
.
cardType
=
value
var
idx
=
this
.
editFormDataUser
.
findIndex
(
item
=>
item
.
name
==
'cardNo'
)
var
idx
=
this
.
editFormDataUser
.
findIndex
(
item
=>
item
.
name
==
'cardNo'
)
this
.
editFormDataUser
[
idx
].
label
=
this
.
baseData
.
cardTypeList
.
find
(
item
=>
item
.
confId
==
value
).
confName
this
.
editFormDataUser
[
idx
].
label
=
this
.
baseData
.
cardTypeList
.
find
(
item
=>
item
.
confId
==
value
).
confName
this
.
$refs
.
editFormRefUser
.
$refs
.
editChildRefUser
.
validateField
(
'cardNo'
)
}
}
},
},
{
{
...
@@ -790,13 +796,21 @@ export default {
...
@@ -790,13 +796,21 @@ export default {
// } else if (item?.optionList?.length == 4) {
// } else if (item?.optionList?.length == 4) {
// item.optionList.push({ value: '5', label: '5年' })
// item.optionList.push({ value: '5', label: '5年' })
// }
// }
let
optionObj
=
{
'4'
:
{
value
:
'4'
,
label
:
'4年'
},
'5'
:
{
value
:
'5'
,
label
:
'5年'
}
}
if
(
res
.
servicePeriod
==
'4'
||
res
.
servicePeriod
==
'5'
)
{
const
Target
=
item
.
optionList
.
find
(
item
=>
{
const
Target
=
item
.
optionList
.
find
(
item
=>
{
return
item
.
value
==
`
${
res
.
servicePeriod
}
`
return
item
.
value
==
`
${
res
.
servicePeriod
}
`
})
})
if
(
!
Target
)
{
if
(
this
.
serviceObj
[
el
.
packageCode
].
indexOf
(
res
.
servicePeriod
)
==
-
1
)
{
tip
=
true
tip
=
true
}
}
console
.
log
(
Target
,
78978979
)
if
(
!
Target
)
{
item
.
optionList
.
push
(
optionObj
[
res
.
servicePeriod
+
''
])
}
}
}
}
})
})
})
})
...
@@ -805,9 +819,10 @@ export default {
...
@@ -805,9 +819,10 @@ export default {
}
}
if
(
tip
)
{
if
(
tip
)
{
this
.
productModal
[
pack
.
idName
][
'service_period'
]
=
''
this
.
productModal
[
pack
.
idName
][
'service_period'
]
=
''
return
this
.
$message
.
error
(
'该卡号服务年限暂未配置,请联系运营平台人员'
)
this
.
$message
.
error
(
'该卡号服务年限暂未配置,请联系运营平台人员'
)
}
}
else
{
this
.
productModal
[
pack
.
idName
][
'service_period'
]
=
`
${
res
.
servicePeriod
}
`
this
.
productModal
[
pack
.
idName
][
'service_period'
]
=
`
${
res
.
servicePeriod
}
`
}
pack
.
groupAttributeList
.
map
(
el
=>
{
pack
.
groupAttributeList
.
map
(
el
=>
{
if
(
el
.
attributeName
==
'service_period'
)
{
if
(
el
.
attributeName
==
'service_period'
)
{
this
.
commonPart
(
res
.
servicePeriod
,
pack
,
el
)
this
.
commonPart
(
res
.
servicePeriod
,
pack
,
el
)
...
@@ -1089,19 +1104,25 @@ export default {
...
@@ -1089,19 +1104,25 @@ export default {
if
((
item
.
idName
==
'stolen'
||
item
.
idName
==
'car'
)
&&
e
.
attributeDesc
==
'服务期限'
)
{
if
((
item
.
idName
==
'stolen'
||
item
.
idName
==
'car'
)
&&
e
.
attributeDesc
==
'服务期限'
)
{
let
serviceArr1
=
{
value
:
'4'
,
label
:
'4年'
}
let
serviceArr1
=
{
value
:
'4'
,
label
:
'4年'
}
let
serviceArr2
=
{
value
:
'5'
,
label
:
'5年'
}
let
serviceArr2
=
{
value
:
'5'
,
label
:
'5年'
}
let
arr
=
[...
this
.
baseData
.
servicePeriodList
]
if
(
item
.
servicePeriod
&&
item
.
servicePeriod
.
indexOf
(
'4'
)
>
-
1
)
{
arr
.
push
(
serviceArr1
)
}
if
(
item
.
servicePeriod
&&
item
.
servicePeriod
.
indexOf
(
'5'
)
>
-
1
)
{
if
(
item
.
servicePeriod
&&
item
.
servicePeriod
.
indexOf
(
'5'
)
>
-
1
)
{
e
.
optionList
=
[...
this
.
baseData
.
servicePeriodList
,
serviceArr1
,
serviceArr2
]
arr
.
push
(
serviceArr2
)
}
else
if
(
item
.
servicePeriod
&&
item
.
servicePeriod
.
indexOf
(
'4'
)
>
-
1
)
{
e
.
optionList
=
[...
this
.
baseData
.
servicePeriodList
,
serviceArr1
]
}
else
{
e
.
optionList
=
this
.
baseData
.
servicePeriodList
}
}
e
.
optionList
=
[...
arr
]
this
.
serviceObj
[
item
.
packageCode
]
=
item
.
servicePeriod
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'1'
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'1'
}
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'
)
&&
e
.
attributeDesc
==
'服务期限'
)
{
if
(
item
.
idName
==
'tire'
||
item
.
idName
==
'crash'
)
{
e
.
optionList
=
this
.
baseData
.
servicePeriodList
}
else
{
e
.
optionList
=
this
.
baseData
.
servicePeriodList2
e
.
optionList
=
this
.
baseData
.
servicePeriodList2
}
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'1'
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'1'
e
.
disabled
=
true
e
.
disabled
=
true
}
else
if
(
e
.
attributeDesc
==
'生效日期'
)
{
}
else
if
(
e
.
attributeDesc
==
'生效日期'
)
{
...
...
src/views/config/addConfig.vue
View file @
a3dc1e0
...
@@ -28,8 +28,12 @@
...
@@ -28,8 +28,12 @@
</el-checkbox-group>
</el-checkbox-group>
<div>
服务期限
</div>
<div>
服务期限
</div>
<div
style=
"margin-left: 20px;"
>
<div
style=
"margin-left: 20px;"
>
<el-checkbox
@
change=
"setLimitTime('robberyServer', 'fiveYear', $event)"
v-model=
"robberyServer.fourYear"
>
4年
</el-checkbox>
<!--
<el-checkbox
@
change=
"setLimitTime('robberyServer', 'fiveYear', $event)"
v-model=
"robberyServer.fourYear"
>
4年
</el-checkbox>
<el-checkbox
@
change=
"setLimitTime('robberyServer', 'fourYear', $event)"
v-model=
"robberyServer.fiveYear"
>
5年
</el-checkbox>
<el-checkbox
@
change=
"setLimitTime('robberyServer', 'fourYear', $event)"
v-model=
"robberyServer.fiveYear"
>
5年
</el-checkbox>
-->
<el-checkbox-group
v-model=
"robberyServerList"
@
change=
"changeRobbery"
>
<el-checkbox
label=
"4"
>
4年
</el-checkbox>
<el-checkbox
label=
"5"
>
5年
</el-checkbox>
</el-checkbox-group>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -44,8 +48,12 @@
...
@@ -44,8 +48,12 @@
</el-radio-group>
</el-radio-group>
<div>
服务期限
</div>
<div>
服务期限
</div>
<div
style=
"margin-left: 20px;"
>
<div
style=
"margin-left: 20px;"
>
<el-checkbox
@
change=
"setLimitTime('vehicleServer', 'fiveYear', $event)"
v-model=
"vehicleServer.fourYear"
>
4年
</el-checkbox>
<!--
<el-checkbox
@
change=
"setLimitTime('vehicleServer', 'fiveYear', $event)"
v-model=
"vehicleServer.fourYear"
>
4年
</el-checkbox>
<el-checkbox
@
change=
"setLimitTime('vehicleServer', 'fourYear', $event)"
v-model=
"vehicleServer.fiveYear"
>
5年
</el-checkbox>
<el-checkbox
@
change=
"setLimitTime('vehicleServer', 'fourYear', $event)"
v-model=
"vehicleServer.fiveYear"
>
5年
</el-checkbox>
-->
<el-checkbox-group
@
change=
"changeVehicle"
v-model=
"vehicleServerList"
>
<el-checkbox
label=
"4"
>
4年
</el-checkbox>
<el-checkbox
label=
"5"
>
5年
</el-checkbox>
</el-checkbox-group>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -122,14 +130,8 @@ export default {
...
@@ -122,14 +130,8 @@ export default {
name
:
''
,
name
:
''
,
data
()
{
data
()
{
return
{
return
{
robberyServer
:{
robberyServerList
:[],
fourYear
:
false
,
vehicleServerList
:[],
fiveYear
:
false
,
},
vehicleServer
:{
fourYear
:
false
,
fiveYear
:
false
,
},
configTitle
:
''
,
configTitle
:
''
,
selectedTable
:
false
,
selectedTable
:
false
,
tableData
:
[],
tableData
:
[],
...
@@ -306,10 +308,11 @@ export default {
...
@@ -306,10 +308,11 @@ export default {
if
(
arrs
[
i
].
cardName
==
'card'
)
{
if
(
arrs
[
i
].
cardName
==
'card'
)
{
this
.
againstTheft
=
[
'盗抢卡输入'
]
this
.
againstTheft
=
[
'盗抢卡输入'
]
}
}
if
(
arrs
[
i
].
servicePeriod
.
indexOf
(
'4'
)
>-
1
){
this
.
robberyServerList
.
push
(
'4'
)
}
if
(
arrs
[
i
].
servicePeriod
.
indexOf
(
'5'
)
>-
1
){
if
(
arrs
[
i
].
servicePeriod
.
indexOf
(
'5'
)
>-
1
){
this
.
robberyServer
.
fiveYear
=
true
this
.
robberyServerList
.
push
(
'5'
)
}
else
if
(
arrs
[
i
].
servicePeriod
.
indexOf
(
'4'
)
>-
1
){
this
.
robberyServer
.
fourYear
=
true
}
}
}
}
if
(
arrs
[
i
].
packageCode
==
'PC0007'
)
{
if
(
arrs
[
i
].
packageCode
==
'PC0007'
)
{
...
@@ -318,10 +321,11 @@ export default {
...
@@ -318,10 +321,11 @@ export default {
this
.
againstVehicle
=
[
'全损卡输入'
]
this
.
againstVehicle
=
[
'全损卡输入'
]
}
}
this
.
vehicleRadio
=
arrs
[
i
].
templateFlag
+
''
this
.
vehicleRadio
=
arrs
[
i
].
templateFlag
+
''
if
(
arrs
[
i
].
servicePeriod
.
indexOf
(
'4'
)
>-
1
){
this
.
vehicleServerList
.
push
(
'4'
)
}
if
(
arrs
[
i
].
servicePeriod
.
indexOf
(
'5'
)
>-
1
){
if
(
arrs
[
i
].
servicePeriod
.
indexOf
(
'5'
)
>-
1
){
this
.
vehicleServer
.
fiveYear
=
true
this
.
vehicleServerList
.
push
(
'5'
)
}
else
if
(
arrs
[
i
].
servicePeriod
.
indexOf
(
'4'
)
>-
1
){
this
.
vehicleServer
.
fourYear
=
true
}
}
}
}
if
(
arrs
[
i
].
packageCode
==
'PC0006'
)
{
if
(
arrs
[
i
].
packageCode
==
'PC0006'
)
{
...
@@ -350,18 +354,9 @@ export default {
...
@@ -350,18 +354,9 @@ export default {
}
}
})
})
},
},
getServerTime
(
obj
){
let
{
fourYear
,
fiveYear
}
=
obj
let
str
=
'1,2,3'
if
(
fourYear
){
str
=
'1,2,3,4'
}
if
(
fiveYear
)
{
str
=
'1,2,3,4,5'
}
return
str
},
onSubmit
()
{
onSubmit
()
{
// robberyServerList:[],
// vehicleServerList:[],
// 判断组装params
// 判断组装params
let
params
=
[]
let
params
=
[]
if
(
this
.
theftAll
==
true
)
{
if
(
this
.
theftAll
==
true
)
{
...
@@ -370,7 +365,7 @@ export default {
...
@@ -370,7 +365,7 @@ export default {
if
(
this
.
againstTheft
.
length
>
0
)
{
if
(
this
.
againstTheft
.
length
>
0
)
{
theftObj
.
cardName
=
'card'
theftObj
.
cardName
=
'card'
}
}
theftObj
.
servicePeriod
=
this
.
getServerTime
(
this
.
robberyServer
)
theftObj
.
servicePeriod
=
`1,2,3
${
this
.
robberyServerList
.
length
?
','
+
this
.
robberyServerList
.
join
(
','
):
''
}
`
params
.
push
(
theftObj
)
params
.
push
(
theftObj
)
console
.
log
(
params
,
'params'
)
console
.
log
(
params
,
'params'
)
}
}
...
@@ -381,7 +376,7 @@ export default {
...
@@ -381,7 +376,7 @@ export default {
vehicleObj
.
cardName
=
'card'
vehicleObj
.
cardName
=
'card'
}
}
vehicleObj
.
templateFlag
=
+
this
.
vehicleRadio
vehicleObj
.
templateFlag
=
+
this
.
vehicleRadio
vehicleObj
.
servicePeriod
=
this
.
getServerTime
(
this
.
vehicleServer
)
vehicleObj
.
servicePeriod
=
`1,2,3
${
this
.
vehicleServerList
.
length
?
','
+
this
.
vehicleServerList
.
join
(
','
):
''
}
`
params
.
push
(
vehicleObj
)
params
.
push
(
vehicleObj
)
}
}
if
(
this
.
tyreAll
==
true
)
{
if
(
this
.
tyreAll
==
true
)
{
...
@@ -477,11 +472,17 @@ export default {
...
@@ -477,11 +472,17 @@ export default {
if
(
this
.
vehicleAll
==
false
)
{
if
(
this
.
vehicleAll
==
false
)
{
this
.
againstVehicle
=
[]
this
.
againstVehicle
=
[]
this
.
vehicleRadio
=
''
this
.
vehicleRadio
=
''
this
.
vehicleServerList
=
[]
}
else
{
}
else
{
this
.
againstVehicle
=
[
'模板一新版'
]
this
.
againstVehicle
=
[
'模板一新版'
]
this
.
vehicleRadio
=
'1'
this
.
vehicleRadio
=
'1'
}
}
},
},
changeVehicle
(){
if
(
this
.
vehicleServerList
.
length
>
0
){
this
.
vehicleAll
=
true
}
},
changeAgainstVehicle
()
{
changeAgainstVehicle
()
{
if
(
this
.
againstVehicle
.
length
>
0
)
{
if
(
this
.
againstVehicle
.
length
>
0
)
{
this
.
vehicleAll
=
true
this
.
vehicleAll
=
true
...
@@ -497,6 +498,12 @@ export default {
...
@@ -497,6 +498,12 @@ export default {
handleTheftAllChange
()
{
handleTheftAllChange
()
{
if
(
this
.
theftAll
==
false
)
{
if
(
this
.
theftAll
==
false
)
{
this
.
againstTheft
=
[]
this
.
againstTheft
=
[]
this
.
robberyServerList
=
[]
}
},
changeRobbery
(){
if
(
this
.
robberyServerList
.
length
>
0
){
this
.
theftAll
=
true
}
}
},
},
handleTyreAllChange
()
{
handleTyreAllChange
()
{
...
...
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