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 6ecbc84d
authored
Aug 11, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
9372b332
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
32 deletions
src/views/activityLink/components/MarketingGift.vue
src/views/activityLink/components/MarketingGift.vue
View file @
6ecbc84
...
...
@@ -189,7 +189,7 @@ export default {
return
}
this
.
init
()
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(
async
()
=>
{
if
(
info
.
serviceMerchantPackageConfigDTOS
)
this
.
selectedCarList
=
info
.
serviceMerchantPackageConfigDTOS
let
activityCoupon
=
info
.
activityCouponBaseInfoDTOS
||
info
.
couponList
||
info
.
couponItemList
...
...
@@ -206,15 +206,15 @@ export default {
}
this
.
giftValue
=
info
.
giftId
||
''
if
(
this
.
giftValue
&&
info
.
ghExclusiveFlag
==
2
)
{
this
.
getModel
()
await
this
.
getModel
()
}
else
{
this
.
getList
()
}
setTimeout
(()
=>
{
if
(
this
.
routerInfo
.
addOrEdit
==
'edit'
)
{
this
.
handleSaveGift
(
false
)
}
},
0
)
this
.
getList
()
})
},
deep
:
true
...
...
@@ -659,7 +659,7 @@ export default {
this
.
loading
=
true
this
.
$apis
.
marketing
.
servicePage
(
params
).
then
(
res
=>
{
this
.
loading
=
false
this
.
selectedCarList
=
[]
if
(
!
isChecked
)
this
.
selectedCarList
=
[]
this
.
$refs
[
'carRef'
].
$refs
[
'listMutiTable'
].
clearSelection
()
this
.
carList
=
res
.
list
||
[]
this
.
carList
.
forEach
(
p
=>
{
...
...
@@ -667,6 +667,7 @@ export default {
if
(
isChecked
)
{
this
.
selectedCarList
.
forEach
(
s
=>
{
if
(
p
.
packageCode
==
s
.
packageCode
)
{
s
.
packageName
=
p
.
packageName
||
p
.
serviceName
p
.
packageAmount
=
s
.
packageAmount
||
0
}
})
...
...
@@ -685,36 +686,42 @@ export default {
this
.
getCarMoreList
()
return
}
this
.
$apis
.
giftBag
.
packageDetail
({
id
:
this
.
giftValue
}).
then
(
res
=>
{
this
.
$nextTick
(
async
()
=>
{
this
.
selectedCarList
=
res
.
serviceMerchantPackageConfigDTOS
||
[]
return
new
Promise
(
resolve
=>
{
this
.
$apis
.
giftBag
.
packageDetail
({
id
:
this
.
giftValue
}).
then
(
res
=>
{
this
.
$nextTick
(
async
()
=>
{
this
.
selectedCarList
=
res
.
serviceMerchantPackageConfigDTOS
||
[]
let
activityCoupon
=
res
.
couponList
||
[]
let
activityCoupon
=
res
.
couponList
||
[]
activityCoupon
.
forEach
(
item
=>
{
item
.
id
=
item
.
couponId
item
.
denomination
=
item
.
couponAnticipatedCost
})
this
.
selectedGoodsList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
==
8
)
this
.
selectedServiceList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
!=
8
)
if
(
res
.
name
==
'自定义套餐'
)
{
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
)
activityCoupon
.
forEach
(
item
=>
{
item
.
id
=
item
.
couponId
item
.
denomination
=
item
.
couponAnticipatedCost
})
this
.
selectedGoodsList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
==
8
)
this
.
selectedServiceList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
!=
8
)
if
(
res
.
name
==
'自定义套餐'
)
{
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
)
console
.
log
(
this
.
selectedCarList
,
this
.
carList
,
7777777777
)
this
.
selectedPreExisting
(
this
.
selectedCarList
,
this
.
carList
,
'packageCode'
,
this
.
$refs
[
'carRef'
])
resolve
()
}
catch
(
e
)
{
console
.
log
(
e
)
resolve
()
}
}
else
{
this
.
getList
()
resolve
()
}
}
else
{
this
.
getList
()
}
})
})
})
},
...
...
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