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 d82a9838
authored
Jun 14, 2022
by
张权
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
数据迁移优化
1 parent
07b704a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
19 deletions
src/views/beforeSale/editEquity.vue
src/views/ghPreSale/editEquity.vue
src/views/beforeSale/editEquity.vue
View file @
d82a983
...
...
@@ -607,6 +607,10 @@ export default {
{
confId
:
5
,
confName
:
'个人(军官)'
},
{
confId
:
7
,
confName
:
'外国人'
}
],
cardTypeList
:
[
...
...
@@ -629,6 +633,10 @@ export default {
{
confId
:
5
,
confName
:
'军官证'
},
{
confId
:
7
,
confName
:
'护照'
}
],
servicePeriodList
:
[
...
...
@@ -768,14 +776,46 @@ export default {
// 卡号获取期限
getDateList
(
seqNo
,
pack
,
attr
)
{
this
.
$apis
.
beforeSale
.
dateBycarNo
({
seqNo
}).
then
(
res
=>
{
this
.
productModal
[
pack
.
idName
][
'service_period'
]
=
`
${
res
.
servicePeriod
}
`
pack
.
groupAttributeList
.
map
(
el
=>
{
if
(
el
.
attributeName
==
'service_period'
)
{
this
.
commonPart
(
res
.
servicePeriod
,
pack
,
el
)
el
.
disabled
=
true
return
el
if
(
res
!=
null
)
{
let
tip
=
false
if
(
pack
.
packageCode
==
'PC0007'
||
pack
.
packageCode
==
'PC0005'
)
{
this
.
productList
.
map
(
el
=>
{
if
(
el
.
packageCode
==
pack
.
packageCode
)
{
el
.
groupAttributeList
.
map
(
ele
=>
{
ele
.
attributeList
.
map
(
item
=>
{
if
(
item
.
attributeDesc
==
'服务期限'
)
{
// if (item?.optionList?.length < 4) {
// item.optionList.push({ value: '4', label: '4年' })
// item.optionList.push({ value: '5', label: '5年' })
// } else if (item?.optionList?.length == 4) {
// item.optionList.push({ value: '5', label: '5年' })
// }
const
Target
=
item
.
optionList
.
find
(
item
=>
{
return
item
.
value
==
`
${
res
.
servicePeriod
}
`
})
if
(
!
Target
)
{
tip
=
true
}
console
.
log
(
Target
,
78978979
)
}
})
})
}
})
}
})
if
(
tip
)
{
this
.
productModal
[
pack
.
idName
][
'service_period'
]
=
''
return
this
.
$message
.
error
(
'该卡号服务年限暂未配置,请联系运营平台人员'
)
}
this
.
productModal
[
pack
.
idName
][
'service_period'
]
=
`
${
res
.
servicePeriod
}
`
pack
.
groupAttributeList
.
map
(
el
=>
{
if
(
el
.
attributeName
==
'service_period'
)
{
this
.
commonPart
(
res
.
servicePeriod
,
pack
,
el
)
el
.
disabled
=
true
return
el
}
})
}
})
},
// 切换套餐---赋默认值
...
...
@@ -1046,7 +1086,15 @@ export default {
item
.
groupAttributeList
.
map
(
ele
=>
{
ele
.
attributeList
.
map
(
e
=>
{
if
((
item
.
idName
==
'stolen'
||
item
.
idName
==
'car'
)
&&
e
.
attributeDesc
==
'服务期限'
)
{
e
.
optionList
=
this
.
baseData
.
servicePeriodList
let
serviceArr1
=
{
value
:
'4'
,
label
:
'4年'
}
let
serviceArr2
=
{
value
:
'5'
,
label
:
'5年'
}
if
(
item
.
servicePeriod
&&
item
.
servicePeriod
.
indexOf
(
'5'
)
>
-
1
)
{
e
.
optionList
=
[...
this
.
baseData
.
servicePeriodList
,
serviceArr1
,
serviceArr2
]
}
else
if
(
item
.
servicePeriod
&&
item
.
servicePeriod
.
indexOf
(
'4'
)
>
-
1
)
{
e
.
optionList
=
[...
this
.
baseData
.
servicePeriodList
,
serviceArr1
]
}
else
{
e
.
optionList
=
this
.
baseData
.
servicePeriodList
}
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'1'
}
else
if
(
e
.
attributeDesc
==
'购车类型'
)
{
e
.
optionList
=
this
.
baseData
.
buyCarTypeList
...
...
src/views/ghPreSale/editEquity.vue
View file @
d82a983
...
...
@@ -85,8 +85,8 @@
<!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> -->
<div
class=
"footer operate-btn"
>
<el-button
size=
"small"
class=
"reset-btn"
v-show=
"routeInfo.addOrEdit == '1'"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
size=
"small"
v-show=
"!['3', '5'].includes(routeInfo.addOrEdit)"
class=
"plain"
@
click=
"handleDraft"
>
草稿
</el-button>
<el-button
size=
"small"
v-show=
"routeInfo.addOrEdit != '5'"
type=
"primary"
@
click=
"handleConfirm"
>
{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}
</el-button>
<el-button
size=
"small"
v-show=
"!['3', '5'].includes(routeInfo.addOrEdit)"
class=
"plain"
@
click=
"handleDraft
(2)
"
>
草稿
</el-button>
<el-button
size=
"small"
v-show=
"routeInfo.addOrEdit != '5'"
type=
"primary"
@
click=
"handleConfirm
(1)
"
>
{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}
</el-button>
<el-button
v-if=
"routeInfo.addOrEdit != 5"
size=
"small"
@
click=
"handleCancel"
>
返回
</el-button>
<el-button
v-else
size=
"small"
type=
"primary"
@
click=
"handleCancel"
>
返回
</el-button>
</div>
...
...
@@ -598,6 +598,9 @@ export default {
if
(
!
this
.
routeInfo
.
isSuper
)
{
this
.
successDisable
=
this
.
routeInfo
.
addOrEdit
==
'3'
}
if
(
!
this
.
routeInfo
.
isSuper
||
this
.
routeInfo
.
addOrEdit
==
1
){
this
.
$set
(
this
.
editRuleOther
,
'actualSalesPersonId'
,{
required
:
true
,
message
:
'请输入实际销售人'
,
trigger
:
'change'
})
}
this
.
getOptionsList
(
'editFormDataCar'
,
false
)
this
.
getOptionsList
(
'editFormDataUser'
,
false
)
this
.
getOptionsList
(
'editFormDataOther'
,
false
)
...
...
@@ -1009,7 +1012,7 @@ export default {
}
return
params
},
handleDraft
()
{
handleDraft
(
commitType
)
{
if
(
this
.
submit
)
{
return
true
}
...
...
@@ -1026,18 +1029,24 @@ export default {
}
else
{
params
.
contractNo
=
''
}
this
.
updateEquity
(
params
)
this
.
updateEquity
(
params
,
commitType
)
},
updateEquity
(
params
)
{
updateEquity
(
params
,
commitType
)
{
let
text
=
''
,
time
=
0
;
if
(
commitType
==
1
){
text
=
'订单待审核中,请等待1-2分钟后刷新页面。若一直待审核,请主动联系erp项目组。'
time
=
5000
}
else
{
text
=
'正在Loding...'
}
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'订单待审核中,请等待1-2分钟后刷新页面。若一直待审核,请主动联系erp项目组。'
,
text
:
text
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.5)'
,
customClass
:
'loadingClass'
})
this
.
$apis
.
ghBeforeSale
.
updateEquityApi
(
params
).
then
(
res
=>
{
this
.
submit
=
false
if
(
res
.
errId
==
'A1307'
)
{
loading
.
close
()
...
...
@@ -1054,12 +1063,12 @@ export default {
// name: 'beforeSale',
params
:
res
})
},
5000
)
},
time
)
}
})
},
handleConfirm
()
{
handleConfirm
(
commitType
)
{
if
(
this
.
submit
)
{
return
true
}
...
...
@@ -1095,7 +1104,7 @@ export default {
}
this
.
$apis
.
ghBeforeSale
.
checkOrderApi
({
vin
:
this
.
editForm
.
vehicle
.
vin
,
contractNo
:
this
.
routeInfo
.
contractNo
||
''
}).
then
(
res
=>
{
if
(
res
.
code
==
'0'
)
{
this
.
updateEquity
(
params
)
this
.
updateEquity
(
params
,
commitType
)
}
else
{
this
.
submit
=
false
this
.
$confirm
(
res
.
message
,
'提示'
,
{
...
...
@@ -1105,7 +1114,7 @@ export default {
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
this
.
submit
=
true
this
.
updateEquity
(
params
)
this
.
updateEquity
(
params
,
commitType
)
}
}
})
...
...
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