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 a734e7fc
authored
Jul 17, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
521478eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
18 deletions
src/views/activityLink/components/MarketingGift.vue
src/views/activityLink/components/Process.vue
src/views/activityLink/components/MarketingGift.vue
View file @
a734e7f
...
...
@@ -222,18 +222,16 @@ export default {
handleSaveGift
()
{
if
(
!
this
.
editForm
.
activityPrice
)
{
this
.
$message
.
error
(
'输入活动价格'
)
return
}
if
(
this
.
selectedGoodsList
.
length
+
this
.
selectedServiceList
.
length
+
this
.
selectedCarList
.
length
==
0
)
{
const
selectedCarList
=
this
.
selectedCarList
.
filter
(
item
=>
item
.
packageAmount
)
if
(
this
.
selectedGoodsList
.
length
+
this
.
selectedServiceList
.
length
+
selectedCarList
.
length
==
0
)
{
this
.
$message
.
error
(
'权益服务、平台优惠、门店优惠券至少选一项'
)
return
}
this
.
totalPrice
=
0
for
(
let
i
=
0
;
i
<
this
.
selectedCarList
.
length
;
i
++
)
{
if
(
!
this
.
selectedCarList
[
i
].
packageAmount
)
{
this
.
$message
.
error
(
'输入用车权益价格'
)
return
}
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
this
.
selectedCarList
[
i
].
packageAmount
)
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
selectedCarList
[
i
].
packageAmount
)
}
this
.
setPackage
(
Object
.
assign
({},
{
selectedServiceList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedServiceList
),
selectedCarList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedCarList
),
selectedGoodsList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedGoodsList
)
}))
const
selectedGoodsList
=
[...
this
.
selectedGoodsList
,
...
this
.
selectedServiceList
].
map
(
item
=>
{
...
...
@@ -244,7 +242,7 @@ export default {
couponAnticipatedCost
:
item
.
denomination
}
})
const
serviceMerchantPackageConfigDTOS
=
this
.
selectedCarList
.
map
(
i
=>
{
const
serviceMerchantPackageConfigDTOS
=
selectedCarList
.
map
(
i
=>
{
return
{
packageCode
:
i
.
packageCode
,
packageAmount
:
i
.
packageAmount
...
...
@@ -252,11 +250,10 @@ export default {
})
const
params
=
{}
params
.
serviceMerchantPackageConfigDTOS
=
serviceMerchantPackageConfigDTOS
const
equityServices
=
this
.
selectedCarList
.
map
(
i
=>
i
.
packageCode
)
const
equityServices
=
selectedCarList
.
map
(
i
=>
i
.
packageCode
)
params
.
equityServices
=
equityServices
.
join
(
','
)
params
.
activityPrice
=
(
this
.
editForm
.
activityPrice
*
100
).
toFixed
(
0
)
params
.
superMarketingCouponRelRequestList
=
selectedGoodsList
||
[]
console
.
log
(
888
)
this
.
SET_STEP
(
3
)
this
.
setProcess
({
1
:
{
...
...
@@ -269,21 +266,21 @@ export default {
this
.
giftName
=
''
},
handleConfirm
()
{
const
{
merchantId
,
selectedServiceList
,
selectedGoodsList
,
selectedCarList
,
subscribe
,
giftName
}
=
this
const
{
merchantId
,
selectedServiceList
,
selectedGoodsList
,
subscribe
,
giftName
}
=
this
const
selectedCarList
=
this
.
selectedCarList
.
filter
(
item
=>
item
.
packageAmount
)
const
couponIds
=
[...
selectedServiceList
,
...
selectedGoodsList
].
map
(
item
=>
{
return
item
.
id
})
const
equities
=
{}
this
.
totalPrice
=
0
if
(
selectedCarList
.
length
==
0
)
{
this
.
$message
.
error
(
'输入用车权益价格'
)
return
}
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
if
(
!
selectedCarList
[
i
].
packageAmount
)
{
this
.
$message
.
error
(
'输入用车权益价格'
)
return
}
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
selectedCarList
[
i
].
packageAmount
)
equities
[
selectedCarList
[
i
].
packageCode
]
=
selectedCarList
[
i
].
packageAmount
}
console
.
log
(
equities
,
selectedCarList
)
let
params
=
{
merchantId
,
activitySubscribe
:
subscribe
,
...
...
src/views/activityLink/components/Process.vue
View file @
a734e7f
...
...
@@ -95,8 +95,8 @@ export default {
params
.
activityName
=
params
.
marketingTitle
params
=
{
...
params
,
...
this
.
addProperties
(
params
)
}
params
=
this
.
deleteKeys
(
params
,
[
'activityActionReport'
,
'couponList'
,
'superMarketingCouponRelRequestList'
])
params
.
startTime
=
params
.
starttime
params
.
endTime
=
params
.
endtime
params
.
startTime
=
params
.
starttime
.
replace
(
/
\/
/g
,
'-'
)
params
.
endTime
=
params
.
endtime
.
replace
(
/
\/
/g
,
'-'
)
}
if
(
params
.
codeId
)
delete
params
.
activityDetail
params
.
subscribe
=
this
.
subscribe
...
...
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