Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-link
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 9372b332
authored
Aug 11, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
b4a0e5ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
17 deletions
src/views/activityLink/components/MarketingGift.vue
src/views/activityLink/components/MarketingGift.vue
View file @
9372b33
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<glsx-combi-form
class=
"edit-form-container"
:isBlock=
"true"
ref=
"editFormRef"
formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"edit-form-container"
:isBlock=
"true"
ref=
"editFormRef"
formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<div
slot=
"selectGiftBtn"
>
<div
slot=
"selectGiftBtn"
>
<el-radio
label=
""
v-model=
"giftValue"
v-if=
"!isGhPackage"
>
自定义礼包
</el-radio>
<el-radio
label=
""
v-model=
"giftValue"
v-if=
"!isGhPackage"
>
自定义礼包
</el-radio>
<el-radio
label=
""
v-model=
"giftValue"
v-
else
@
change=
"getModel"
>
自定义续保套餐
</el-radio>
<el-radio
label=
""
v-model=
"giftValue"
v-
if=
"isGhPackage && !isCustom"
@
change=
"getModel"
>
自定义续保套餐
</el-radio>
<div
class=
"gift-container"
>
<div
class=
"gift-container"
>
<el-radio-group
v-model=
"giftValue"
@
change=
"getModel"
>
<el-radio-group
v-model=
"giftValue"
@
change=
"getModel"
>
<el-radio
:label=
"item.id"
v-for=
"item in giftList"
:key=
"item.id"
>
{{
item
.
name
}}
(成本:
{{
item
.
totalEquityPrice
||
0
}}
)
</el-radio>
<el-radio
:label=
"item.id"
v-for=
"item in giftList"
:key=
"item.id"
>
{{
item
.
name
}}
(成本:
{{
item
.
totalEquityPrice
||
0
}}
)
</el-radio>
...
@@ -105,6 +105,7 @@ export default {
...
@@ -105,6 +105,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
isInit
:
this
.
$route
.
query
.
addOrEdit
==
'add'
,
isInit
:
this
.
$route
.
query
.
addOrEdit
==
'add'
,
isCustom
:
false
,
isGhPackage
:
false
,
isGhPackage
:
false
,
giftValue
:
''
,
giftValue
:
''
,
editForm
:
{
editForm
:
{
...
@@ -266,6 +267,9 @@ export default {
...
@@ -266,6 +267,9 @@ export default {
}
}
})
})
}
}
if
(
this
.
giftList
.
find
(
item
=>
item
.
name
==
'自定义套餐'
))
{
this
.
isCustom
=
true
}
})
})
},
},
calcCarValue
(
scope
)
{
calcCarValue
(
scope
)
{
...
@@ -645,20 +649,33 @@ export default {
...
@@ -645,20 +649,33 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
getCarMoreList
()
{
getCarMoreList
(
isChecked
)
{
var
params
=
{
return
new
Promise
(
resolve
=>
{
serviceStatus
:
1
,
var
params
=
{
pageNum
:
1
,
serviceStatus
:
1
,
pageSize
:
10000
pageNum
:
1
,
}
pageSize
:
10000
this
.
loading
=
true
}
this
.
$apis
.
marketing
.
servicePage
(
params
).
then
(
res
=>
{
this
.
loading
=
true
this
.
loading
=
false
this
.
$apis
.
marketing
.
servicePage
(
params
).
then
(
res
=>
{
this
.
selectedCarList
=
[]
this
.
loading
=
false
this
.
$refs
[
'carRef'
].
$refs
[
'listMutiTable'
].
clearSelection
()
this
.
selectedCarList
=
[]
this
.
carList
=
res
.
list
||
[]
this
.
$refs
[
'carRef'
].
$refs
[
'listMutiTable'
].
clearSelection
()
this
.
carList
.
forEach
(
item
=>
{
this
.
carList
=
res
.
list
||
[]
item
.
packageCode
=
item
.
serviceCode
this
.
carList
.
forEach
(
p
=>
{
p
.
packageCode
=
p
.
serviceCode
if
(
isChecked
)
{
this
.
selectedCarList
.
forEach
(
s
=>
{
if
(
p
.
packageCode
==
s
.
packageCode
)
{
p
.
packageAmount
=
s
.
packageAmount
||
0
}
})
}
})
if
(
isChecked
)
{
this
.
calcCarValue
()
}
resolve
()
})
})
})
})
},
},
...
@@ -669,7 +686,7 @@ export default {
...
@@ -669,7 +686,7 @@ export default {
return
return
}
}
this
.
$apis
.
giftBag
.
packageDetail
({
id
:
this
.
giftValue
}).
then
(
res
=>
{
this
.
$apis
.
giftBag
.
packageDetail
({
id
:
this
.
giftValue
}).
then
(
res
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(
async
()
=>
{
this
.
selectedCarList
=
res
.
serviceMerchantPackageConfigDTOS
||
[]
this
.
selectedCarList
=
res
.
serviceMerchantPackageConfigDTOS
||
[]
let
activityCoupon
=
res
.
couponList
||
[]
let
activityCoupon
=
res
.
couponList
||
[]
...
@@ -681,7 +698,20 @@ export default {
...
@@ -681,7 +698,20 @@ export default {
this
.
selectedGoodsList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
==
8
)
this
.
selectedGoodsList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
==
8
)
this
.
selectedServiceList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
!=
8
)
this
.
selectedServiceList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
!=
8
)
if
(
res
.
name
==
'自定义套餐'
)
{
if
(
res
.
name
==
'自定义套餐'
)
{
this
.
getCarMoreList
()
try
{
const
serviceItem
=
Object
.
entries
(
JSON
.
parse
(
res
.
serviceItem
))
this
.
selectedCarList
=
serviceItem
.
map
(
item
=>
{
return
{
packageCode
:
item
[
0
],
serviceCode
:
item
[
0
],
packageAmount
:
+
item
[
1
]
}
})
await
this
.
getCarMoreList
(
true
)
this
.
selectedPreExisting
(
this
.
selectedCarList
,
this
.
carList
,
'packageCode'
,
this
.
$refs
[
'carRef'
])
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
else
{
}
else
{
this
.
getList
()
this
.
getList
()
}
}
...
@@ -734,6 +764,9 @@ export default {
...
@@ -734,6 +764,9 @@ export default {
</
style
>
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.gift-container
{
margin-top
:
10px
;
}
.choseRow
{
.choseRow
{
display
:
flex
;
display
:
flex
;
height
:
auto
;
height
:
auto
;
...
...
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