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 228633f7
authored
Jul 18, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
3df0be34
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
src/views/activityLink/components/MarketingGift.vue
src/views/activityLink/components/MarketingGift.vue
View file @
228633f
...
@@ -225,13 +225,9 @@ export default {
...
@@ -225,13 +225,9 @@ export default {
this
.
totalPrice
=
0
this
.
totalPrice
=
0
for
(
let
i
=
0
;
i
<
this
.
selectedCarList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
selectedCarList
.
length
;
i
++
)
{
if
(
scope
&&
scope
.
packageCode
==
this
.
selectedCarList
[
i
].
packageCode
)
{
if
(
scope
&&
scope
.
packageCode
==
this
.
selectedCarList
[
i
].
packageCode
)
{
this
.
selectedCarList
[
i
].
packageAmount
=
scope
.
packageAmount
this
.
selectedCarList
[
i
].
packageAmount
=
scope
.
packageAmount
||
0
}
}
if
(
!
this
.
selectedCarList
[
i
].
packageAmount
)
{
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
this
.
selectedCarList
[
i
].
packageAmount
||
0
)
this
.
$message
.
error
(
'输入用车权益价格'
)
return
}
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
this
.
selectedCarList
[
i
].
packageAmount
)
}
}
},
},
handleSaveGift
()
{
handleSaveGift
()
{
...
@@ -246,7 +242,7 @@ export default {
...
@@ -246,7 +242,7 @@ export default {
}
}
this
.
totalPrice
=
0
this
.
totalPrice
=
0
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
selectedCarList
[
i
].
packageAmount
)
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
selectedCarList
[
i
].
packageAmount
||
0
)
}
}
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
)
}))
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
=>
{
const
selectedGoodsList
=
[...
this
.
selectedGoodsList
,
...
this
.
selectedServiceList
].
map
(
item
=>
{
...
@@ -270,6 +266,9 @@ export default {
...
@@ -270,6 +266,9 @@ export default {
params
.
activityPrice
=
(
this
.
editForm
.
activityPrice
*
100
).
toFixed
(
0
)
params
.
activityPrice
=
(
this
.
editForm
.
activityPrice
*
100
).
toFixed
(
0
)
params
.
superMarketingCouponRelRequestList
=
selectedGoodsList
||
[]
params
.
superMarketingCouponRelRequestList
=
selectedGoodsList
||
[]
params
.
giftId
=
this
.
giftValue
params
.
giftId
=
this
.
giftValue
if
(
this
.
giftValue
)
{
this
.
handleSave
()
}
this
.
SET_STEP
(
3
)
this
.
SET_STEP
(
3
)
this
.
setProcess
({
this
.
setProcess
({
1
:
{
1
:
{
...
@@ -278,10 +277,15 @@ export default {
...
@@ -278,10 +277,15 @@ export default {
})
})
},
},
handleSave
()
{
handleSave
()
{
if
(
this
.
giftValue
)
{
const
giftList
=
this
.
giftList
.
find
(
item
=>
this
.
giftValue
==
item
.
id
)
this
.
handleConfirm
(
giftList
)
}
else
{
this
.
giftVisible
=
true
this
.
giftVisible
=
true
this
.
giftName
=
''
this
.
giftName
=
''
}
},
},
handleConfirm
()
{
handleConfirm
(
res
)
{
const
{
merchantId
,
selectedServiceList
,
selectedGoodsList
,
subscribe
,
giftName
}
=
this
const
{
merchantId
,
selectedServiceList
,
selectedGoodsList
,
subscribe
,
giftName
}
=
this
const
selectedCarList
=
this
.
selectedCarList
.
filter
(
item
=>
item
.
packageAmount
)
const
selectedCarList
=
this
.
selectedCarList
.
filter
(
item
=>
item
.
packageAmount
)
const
couponIds
=
[...
selectedServiceList
,
...
selectedGoodsList
].
map
(
item
=>
{
const
couponIds
=
[...
selectedServiceList
,
...
selectedGoodsList
].
map
(
item
=>
{
...
@@ -289,8 +293,9 @@ export default {
...
@@ -289,8 +293,9 @@ export default {
})
})
const
equities
=
{}
const
equities
=
{}
this
.
totalPrice
=
0
this
.
totalPrice
=
0
if
(
selectedCarList
.
length
==
0
)
{
console
.
log
(
selectedCarList
.
length
+
selectedServiceList
.
length
+
selectedGoodsList
.
length
)
this
.
$message
.
error
(
'输入用车权益价格'
)
if
(
selectedCarList
.
length
+
selectedServiceList
.
length
+
selectedGoodsList
.
length
==
0
)
{
this
.
$message
.
error
(
'权益服务、平台优惠、门店优惠券至少选一项'
)
return
return
}
}
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
...
@@ -305,6 +310,10 @@ export default {
...
@@ -305,6 +310,10 @@ export default {
couponIds
:
JSON
.
stringify
(
couponIds
),
couponIds
:
JSON
.
stringify
(
couponIds
),
equities
:
JSON
.
stringify
(
equities
)
equities
:
JSON
.
stringify
(
equities
)
}
}
if
(
res
&&
res
.
id
)
{
params
.
id
=
res
.
id
params
.
name
=
res
.
name
}
this
.
$apis
.
giftBag
.
packageAdd
(
params
).
then
(
res
=>
{
this
.
$apis
.
giftBag
.
packageAdd
(
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
giftVisible
=
false
this
.
giftVisible
=
false
...
@@ -462,7 +471,7 @@ export default {
...
@@ -462,7 +471,7 @@ export default {
this
.
isInit
=
false
this
.
isInit
=
false
this
.
selectedCarList
.
forEach
(
s
=>
{
this
.
selectedCarList
.
forEach
(
s
=>
{
if
(
p
.
packageCode
==
s
.
packageCode
)
{
if
(
p
.
packageCode
==
s
.
packageCode
)
{
p
.
packageAmount
=
s
.
packageAmount
p
.
packageAmount
=
s
.
packageAmount
||
0
}
}
})
})
this
.
calcCarValue
()
this
.
calcCarValue
()
...
...
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