Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
17dd7a43
Commit
17dd7a43
authored
Jun 07, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
b44a5390
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
15 deletions
+52
-15
form.js
src/views/ecm/form.js
+36
-7
form.vue
src/views/ecm/form.vue
+16
-8
No files found.
src/views/ecm/form.js
View file @
17dd7a43
...
...
@@ -88,7 +88,10 @@ export default {
storedLowest
:
0
,
storedMax
:
0
,
consum_type
:
1
,
gift_flag
:
0
gift_flag
:
0
,
consumer_store_type
:
0
,
store_filter_id
:
''
,
store_filter_id_new
:
''
},
template
:
{
headerColor
:
'#173177'
,
...
...
@@ -176,6 +179,7 @@ export default {
payment
:
false
},
storedChecked
:
false
,
storedShopChecked
:
false
,
discount_limit
:
{
type
:
1
,
count
:
undefined
,
flag
:
false
},
// 适用商品折扣
useStoredFlag
:
0
,
//显示储值触发和会员卡升级事件
analyseConfig
:
{
...
...
@@ -584,9 +588,17 @@ export default {
if
(
this
.
form
.
effectAction
===
'stored'
&&
result
.
effectTriggerJson
)
{
let
cost
=
JSON
.
parse
(
result
.
effectTriggerJson
)
||
{};
this
.
storedChecked
=
true
;
this
.
form
.
storedLowest
=
cost
.
lowest_cost
;
this
.
form
.
storedMax
=
cost
.
max_cost
;
this
.
storedChecked
=
cost
.
hasOwnProperty
(
'lowest_cost'
)
||
cost
.
hasOwnProperty
(
'max_cost'
);
if
(
this
.
storedChecked
)
{
this
.
form
.
storedLowest
=
cost
.
lowest_cost
;
this
.
form
.
storedMax
=
cost
.
max_cost
;
}
this
.
storedShopChecked
=
cost
.
hasOwnProperty
(
'consumer_store_type'
);
if
(
this
.
storedShopChecked
)
{
this
.
form
.
consumer_store_type
=
cost
.
consumer_store_type
;
cost
.
consumer_store_type
==
0
?
(
this
.
form
.
store_filter_id
=
cost
.
store_filter_id
)
:
(
this
.
form
.
store_filter_id_new
=
cost
.
store_filter_id
);
}
}
}
if
(
!
this
.
form
.
templateUseEnable
)
return
;
...
...
@@ -806,7 +818,7 @@ export default {
// 如果是消费触发
if
(
this
.
form
.
effectAction
===
'consume'
)
{
// 这里判断部分门店是否为空
if
(
this
.
consumeChecked
.
store
&&
this
.
consumeChecked
.
store
)
{
if
(
this
.
consumeChecked
.
store
)
{
let
data
=
this
.
form
.
consumerStoreType
===
1
?
await
this
.
$refs
.
newStoreCard
.
getList
()
:
await
this
.
$refs
.
storeCard
.
getRightList
();
if
(
!
data
.
length
)
{
this
.
$tips
({
type
:
'warning'
,
message
:
'门店不能为空'
});
...
...
@@ -870,6 +882,14 @@ export default {
this
.
$tips
({
type
:
'warning'
,
message
:
'储值金额区间值填写错误'
});
return
;
}
// 这里判断部分门店是否为空
if
(
this
.
storedShopChecked
)
{
let
data
=
this
.
form
.
consumer_store_type
===
1
?
await
this
.
$refs
.
newStoreCard2
.
getList
()
:
await
this
.
$refs
.
storeCard2
.
getRightList
();
if
(
!
data
.
length
)
{
this
.
$tips
({
type
:
'warning'
,
message
:
'门店不能为空'
});
return
;
}
}
}
// 会员卡升降级
// if (this.form.effectAction === 'degrade' || this.form.effectAction === 'upgrade') {
...
...
@@ -1005,8 +1025,17 @@ export default {
params
=
Object
.
assign
(
params
,
consumeObj
);
// 合并消费触发数据
}
if
(
this
.
form
.
effectAction
===
'stored'
&&
this
.
storedChecked
)
{
params
.
effectTriggerJson
=
JSON
.
stringify
({
lowest_cost
:
this
.
form
.
storedLowest
||
undefined
,
max_cost
:
this
.
form
.
storedMax
||
undefined
});
if
(
this
.
form
.
effectAction
===
'stored'
)
{
let
storedObj
=
{};
if
(
this
.
storedChecked
)
{
storedObj
.
lowest_cost
=
this
.
form
.
storedLowest
||
undefined
;
storedObj
.
max_cost
=
this
.
form
.
storedMax
||
undefined
;
}
if
(
this
.
storedShopChecked
)
{
storedObj
.
consumer_store_type
=
this
.
form
.
consumer_store_type
;
storedObj
.
store_filter_id
=
this
.
form
.
consumer_store_type
===
0
?
this
.
form
.
store_filter_id
:
this
.
form
.
store_filter_id_new
;
}
Object
.
keys
(
storedObj
).
length
?
(
params
.
effectTriggerJson
=
JSON
.
stringify
(
storedObj
))
:
''
;
}
}
params
.
marketingActivityId
=
this
.
form
.
marketingActivityId
||
''
;
// 否 String 营销场景
...
...
src/views/ecm/form.vue
View file @
17dd7a43
...
...
@@ -297,6 +297,22 @@
</div>
</div>
</el-form-item>
<el-form-item>
<div
class=
"no_label_form_label"
>
<el-checkbox
class=
"el-form-item__label align-left"
:disabled=
"!isAdd"
v-model=
"storedShopChecked"
>
储值门店
</el-checkbox>
<div>
<span
class=
"fz14 gray"
v-show=
"!storedShopChecked"
>
所有储值门店
</span>
</div>
<div
v-show=
"storedShopChecked"
>
<el-radio-group
:disabled=
"!isAdd"
v-model=
"form.consumer_store_type"
>
<el-radio
:label=
"0"
>
固定门店
</el-radio>
<el-radio
:label=
"1"
>
按门店条件
</el-radio>
</el-radio-group>
<vue-gic-store-card
style=
"margin:20px 0 0 35px"
v-if=
"form.consumer_store_type === 0"
v-bind=
"storeParams"
:readonly=
"!isAdd"
ref=
"storeCard2"
:uuid
.
sync=
"form.store_filter_id"
></vue-gic-store-card>
<dm-store-selector
style=
"margin:20px 0 0 35px"
v-if=
"form.consumer_store_type === 1"
ref=
"newStoreCard2"
:readonly=
"!isAdd"
:uuid
.
sync=
"form.store_filter_id_new"
></dm-store-selector>
</div>
</div>
</el-form-item>
</section>
<!-- 营销次数配置 重复 -->
<section
class=
"dm-form__wrap"
v-if=
"form.effectType == 1"
>
...
...
@@ -325,14 +341,6 @@
<span
class=
"vertical-middle"
v-if=
"form.marketingTimesType !== -1"
><el-input-number
:disabled=
"!isAdd"
controls-position=
"right"
class=
"w150"
:min=
"1"
v-model=
"form.marketingTimes"
></el-input-number>
次
</span>
<span
class=
"pl20 fz13 gray"
>
* 该营销计划{{ marketingTimesTips }}
</span>
</el-form-item>
<!-- <div v-else>
<div class="ecm-title">消费触发配置</div>
<div class="ecm-content">
<el-radio :label="1">每天触发一次</el-radio>
<el-radio :label="-1">每天叠加触发</el-radio>
</div>
</div> -->
<el-form-item
label=
"营销次数配置"
prop=
"marketingTimesType"
v-else
>
<div
class=
"ecm-content"
style=
"margin:8px 0 0 0;"
>
<el-radio
:disabled=
"!isAdd"
:label=
"1"
v-model=
"form.marketingTimesType"
>
每天触发一次
<span
class=
"gray fz13 ml58"
>
客户当天累计消费金额满足所配置的消费金额就会触发,只触发一次
</span></el-radio>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment