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 f15002c8
authored
Nov 16, 2022
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v3.1.2版本开发
1 parent
d0d4a7a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
16 deletions
src/views/config/addConfig.vue
src/views/config/addConfig.vue
View file @
f15002c
...
...
@@ -90,6 +90,9 @@
<el-form-item>
<el-checkbox
v-model=
"carefree"
>
优享版
</el-checkbox>
</el-form-item>
<el-form-item
v-for=
"item in newPackageList"
:key=
"item.packageCode"
>
<el-checkbox
v-model=
"item.isChecked"
>
{{
item
.
packageName
}}
</el-checkbox>
</el-form-item>
</
template
>
</el-form>
<!-- 弹窗 -->
...
...
@@ -123,6 +126,7 @@ const theftOptions = ['盗抢卡输入']
const
vehicleOptions
=
[
'全损卡输入'
]
const
tyreOptions
=
[
'轮胎卡输入'
]
const
collisionOptions
=
[
'碰撞卡输入'
]
let
oldPackageList
=
[
'PC0005'
,
'PC0006'
,
'PC0007'
,
'PC0008'
,
'PC0009'
,
'PC0010'
,
'PC0011'
]
export
default
{
name
:
''
,
data
()
{
...
...
@@ -179,7 +183,8 @@ export default {
collisions
:
collisionOptions
,
collisionTerminate
:
false
,
costPrice
:
false
,
//选择门店成本
showGh
:
false
showGh
:
false
,
newPackageList
:
[]
}
},
...
...
@@ -197,6 +202,15 @@ export default {
this
.
getConfig
(
merchantId
)
this
.
configTitle
=
'修改'
}
else
{
this
.
$apis
.
openconfig
.
getConfig
({}).
then
(
res
=>
{
let
arrs
=
res
?.
packageConfigs
||
[]
this
.
newPackageList
=
arrs
.
filter
(
item
=>
{
if
(
!
oldPackageList
.
includes
(
item
.
packageCode
)){
item
.
isChecked
=
!!
item
.
isChecked
return
item
}
})
})
this
.
configTitle
=
'开通'
this
.
add
=
true
this
.
theftAll
=
true
...
...
@@ -292,49 +306,55 @@ export default {
merchantId
}
if
(
this
.
showGh
){
para
.
channel
=
2
para
.
channel
=
2
}
this
.
$apis
.
openconfig
.
getConfig
(
para
).
then
(
res
=>
{
res
=
res
||
{}
this
.
costPrice
=
res
.
openCostPrice
==
1
this
.
storeSelParams
=
res
this
.
id
=
res
.
id
this
.
checkPosition
=
res
.
checkPosition
==
0
let
arrs
=
[]
arrs
=
res
.
packageConfigs
let
arrs
=
res
.
packageConfigs
||
[]
this
.
newPackageList
=
arrs
.
filter
(
item
=>
{
if
(
!
oldPackageList
.
includes
(
item
.
packageCode
)){
item
.
isChecked
=
!!
item
.
isChecked
return
item
}
})
for
(
var
i
=
0
;
i
<
arrs
.
length
;
i
++
)
{
if
(
arrs
[
i
].
packageCode
==
'PC0005'
)
{
this
.
theftAll
=
true
this
.
theftAll
=
!!
arrs
[
i
]?.
isChecked
if
(
arrs
[
i
].
cardName
==
'card'
)
{
this
.
againstTheft
=
[
'盗抢卡输入'
]
}
if
(
arrs
[
i
].
servicePeriod
.
indexOf
(
'4'
)
>-
1
){
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
.
robberyServerList
.
push
(
'5'
)
}
}
if
(
arrs
[
i
].
packageCode
==
'PC0007'
)
{
this
.
vehicleAll
=
true
this
.
vehicleAll
=
!!
arrs
[
i
]?.
isChecked
if
(
arrs
[
i
].
cardName
==
'card'
)
{
this
.
againstVehicle
=
[
'全损卡输入'
]
}
this
.
vehicleRadio
=
arrs
[
i
]
.
templateFlag
+
''
if
(
arrs
[
i
].
servicePeriod
.
indexOf
(
'4'
)
>-
1
){
this
.
vehicleRadio
=
arrs
[
i
]
?.
templateFlag
?
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
.
vehicleServerList
.
push
(
'5'
)
}
}
if
(
arrs
[
i
].
packageCode
==
'PC0006'
)
{
this
.
tyreAll
=
true
this
.
tyreAll
=
!!
arrs
[
i
]?.
isChecked
if
(
arrs
[
i
].
cardName
==
'card'
)
{
this
.
againstTyre
=
[
'轮胎卡输入'
]
}
}
if
(
arrs
[
i
].
packageCode
==
'PC0008'
)
{
this
.
collisionAll
=
true
this
.
collisionAll
=
!!
arrs
[
i
]?.
isChecked
if
(
arrs
[
i
].
cardName
==
'card'
)
{
this
.
againstCollision
=
[
'碰撞卡输入'
]
}
...
...
@@ -342,13 +362,13 @@ export default {
console
.
log
(
arrs
[
i
].
templateFlag
,
'collisionRadio1'
)
}
if
(
arrs
[
i
].
packageCode
==
'PC0011'
)
{
this
.
carefree
=
true
this
.
carefree
=
!!
arrs
[
i
]?.
isChecked
}
if
(
arrs
[
i
].
packageCode
==
'PC0009'
)
{
this
.
honorable
=
true
this
.
honorable
=
!!
arrs
[
i
]?.
isChecked
}
if
(
arrs
[
i
].
packageCode
==
'PC0010'
)
{
this
.
first
=
true
this
.
first
=
!!
arrs
[
i
]?.
isChecked
}
}
})
...
...
@@ -415,6 +435,12 @@ export default {
firstObj
.
servicePeriod
=
'1'
params
.
push
(
firstObj
)
}
this
.
newPackageList
.
forEach
(
item
=>
{
if
(
item
.
isChecked
){
let
{
packageCode
,
packageServicePeriod
}
=
item
params
.
push
({
packageCode
,
servicePeriod
:
packageServicePeriod
})
}
})
let
targetParams
=
{
openCostPrice
:
this
.
costPrice
?
1
:
0
,
createDetailRequests
:
params
...
...
@@ -425,9 +451,17 @@ export default {
delete
targetParams
.
openCostPrice
targetParams
.
checkPosition
=
this
.
checkPosition
?
0
:
1
}
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'loading...'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.5)'
,
customClass
:
'loadingClass'
})
if
(
this
.
add
==
true
)
{
targetParams
.
merchantIds
=
this
.
merchantIds
this
.
$apis
.
openconfig
.
addConfig
(
targetParams
).
then
(
res
=>
{
loading
.
close
()
if
(
res
.
code
==
'32'
)
{
this
.
$message
.
error
(
'请选择商户'
)
}
else
if
(
res
.
code
==
'0'
)
{
...
...
@@ -437,6 +471,7 @@ export default {
}
else
{
targetParams
.
id
=
this
.
id
this
.
$apis
.
openconfig
.
modifyConfig
(
targetParams
).
then
(
res
=>
{
loading
.
close
()
if
(
res
.
code
==
'32'
)
{
this
.
$message
.
error
(
'请正确勾选信息'
)
}
else
if
(
res
.
code
==
'0'
)
{
...
...
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