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 {
...
@@ -607,6 +607,10 @@ export default {
{
{
confId
:
5
,
confId
:
5
,
confName
:
'个人(军官)'
confName
:
'个人(军官)'
},
{
confId
:
7
,
confName
:
'外国人'
}
}
],
],
cardTypeList
:
[
cardTypeList
:
[
...
@@ -629,6 +633,10 @@ export default {
...
@@ -629,6 +633,10 @@ export default {
{
{
confId
:
5
,
confId
:
5
,
confName
:
'军官证'
confName
:
'军官证'
},
{
confId
:
7
,
confName
:
'护照'
}
}
],
],
servicePeriodList
:
[
servicePeriodList
:
[
...
@@ -768,14 +776,46 @@ export default {
...
@@ -768,14 +776,46 @@ export default {
// 卡号获取期限
// 卡号获取期限
getDateList
(
seqNo
,
pack
,
attr
)
{
getDateList
(
seqNo
,
pack
,
attr
)
{
this
.
$apis
.
beforeSale
.
dateBycarNo
({
seqNo
}).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
dateBycarNo
({
seqNo
}).
then
(
res
=>
{
this
.
productModal
[
pack
.
idName
][
'service_period'
]
=
`
${
res
.
servicePeriod
}
`
if
(
res
!=
null
)
{
pack
.
groupAttributeList
.
map
(
el
=>
{
let
tip
=
false
if
(
el
.
attributeName
==
'service_period'
)
{
if
(
pack
.
packageCode
==
'PC0007'
||
pack
.
packageCode
==
'PC0005'
)
{
this
.
commonPart
(
res
.
servicePeriod
,
pack
,
el
)
this
.
productList
.
map
(
el
=>
{
el
.
disabled
=
true
if
(
el
.
packageCode
==
pack
.
packageCode
)
{
return
el
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 {
...
@@ -1046,7 +1086,15 @@ export default {
item
.
groupAttributeList
.
map
(
ele
=>
{
item
.
groupAttributeList
.
map
(
ele
=>
{
ele
.
attributeList
.
map
(
e
=>
{
ele
.
attributeList
.
map
(
e
=>
{
if
((
item
.
idName
==
'stolen'
||
item
.
idName
==
'car'
)
&&
e
.
attributeDesc
==
'服务期限'
)
{
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'
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
...
...
src/views/ghPreSale/editEquity.vue
View file @
d82a983
...
@@ -85,8 +85,8 @@
...
@@ -85,8 +85,8 @@
<!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> -->
<!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> -->
<div
class=
"footer operate-btn"
>
<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"
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=
"!['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"
>
{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}
</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-if=
"routeInfo.addOrEdit != 5"
size=
"small"
@
click=
"handleCancel"
>
返回
</el-button>
<el-button
v-else
size=
"small"
type=
"primary"
@
click=
"handleCancel"
>
返回
</el-button>
<el-button
v-else
size=
"small"
type=
"primary"
@
click=
"handleCancel"
>
返回
</el-button>
</div>
</div>
...
@@ -598,6 +598,9 @@ export default {
...
@@ -598,6 +598,9 @@ export default {
if
(
!
this
.
routeInfo
.
isSuper
)
{
if
(
!
this
.
routeInfo
.
isSuper
)
{
this
.
successDisable
=
this
.
routeInfo
.
addOrEdit
==
'3'
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
(
'editFormDataCar'
,
false
)
this
.
getOptionsList
(
'editFormDataUser'
,
false
)
this
.
getOptionsList
(
'editFormDataUser'
,
false
)
this
.
getOptionsList
(
'editFormDataOther'
,
false
)
this
.
getOptionsList
(
'editFormDataOther'
,
false
)
...
@@ -1009,7 +1012,7 @@ export default {
...
@@ -1009,7 +1012,7 @@ export default {
}
}
return
params
return
params
},
},
handleDraft
()
{
handleDraft
(
commitType
)
{
if
(
this
.
submit
)
{
if
(
this
.
submit
)
{
return
true
return
true
}
}
...
@@ -1026,18 +1029,24 @@ export default {
...
@@ -1026,18 +1029,24 @@ export default {
}
else
{
}
else
{
params
.
contractNo
=
''
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
({
const
loading
=
this
.
$loading
({
lock
:
true
,
lock
:
true
,
text
:
'订单待审核中,请等待1-2分钟后刷新页面。若一直待审核,请主动联系erp项目组。'
,
text
:
text
,
spinner
:
'el-icon-loading'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.5)'
,
background
:
'rgba(0, 0, 0, 0.5)'
,
customClass
:
'loadingClass'
customClass
:
'loadingClass'
})
})
this
.
$apis
.
ghBeforeSale
.
updateEquityApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
ghBeforeSale
.
updateEquityApi
(
params
).
then
(
res
=>
{
this
.
submit
=
false
this
.
submit
=
false
if
(
res
.
errId
==
'A1307'
)
{
if
(
res
.
errId
==
'A1307'
)
{
loading
.
close
()
loading
.
close
()
...
@@ -1054,12 +1063,12 @@ export default {
...
@@ -1054,12 +1063,12 @@ export default {
// name: 'beforeSale',
// name: 'beforeSale',
params
:
res
params
:
res
})
})
},
5000
)
},
time
)
}
}
})
})
},
},
handleConfirm
()
{
handleConfirm
(
commitType
)
{
if
(
this
.
submit
)
{
if
(
this
.
submit
)
{
return
true
return
true
}
}
...
@@ -1095,7 +1104,7 @@ export default {
...
@@ -1095,7 +1104,7 @@ export default {
}
}
this
.
$apis
.
ghBeforeSale
.
checkOrderApi
({
vin
:
this
.
editForm
.
vehicle
.
vin
,
contractNo
:
this
.
routeInfo
.
contractNo
||
''
}).
then
(
res
=>
{
this
.
$apis
.
ghBeforeSale
.
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
,
commitType
)
}
else
{
}
else
{
this
.
submit
=
false
this
.
submit
=
false
this
.
$confirm
(
res
.
message
,
'提示'
,
{
this
.
$confirm
(
res
.
message
,
'提示'
,
{
...
@@ -1105,7 +1114,7 @@ export default {
...
@@ -1105,7 +1114,7 @@ export default {
callback
:
action
=>
{
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
if
(
action
==
'confirm'
)
{
this
.
submit
=
true
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