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
2bff20bf
Commit
2bff20bf
authored
Jan 21, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 消费触发配置
parent
1c649d65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
58 deletions
+39
-58
form.js
src/views/ecm/form.js
+39
-56
index.vue
src/views/ecm/marketing-event/index.vue
+0
-2
No files found.
src/views/ecm/form.js
View file @
2bff20bf
...
...
@@ -886,34 +886,13 @@ export default {
// 全部则不传该字段
// 单笔订单触发 或 累计消费订单触发
if
(
this
.
form
.
effectType
==
0
)
{
if
(
this
.
form
.
effectAction
===
'consume'
&&
this
.
form
.
consum_type
==
1
)
{
if
(
this
.
form
.
effectAction
===
'consume'
)
{
// 门店
let
consumeObj
=
{
store_mode
:
this
.
consumeChecked
.
store
?
1
:
0
,
consumerStoreType
:
this
.
form
.
consumerStoreType
,
order_store
:
this
.
consumeChecked
.
store
?
(
this
.
form
.
consumerStoreType
===
0
?
this
.
form
.
order_store
:
this
.
form
.
order_store_new
)
:
''
};
consumeObj
.
consum_type
=
1
;
// 勾选消费金额 --不填代表没有上下限,不传该字段
if
(
this
.
consumeChecked
.
cost
)
{
if
(
this
.
form
.
lowest_cost
)
{
consumeObj
[
'lowest_cost'
]
=
this
.
form
.
lowest_cost
;
}
if
(
this
.
form
.
max_cost
)
{
consumeObj
[
'max_cost'
]
=
this
.
form
.
max_cost
;
}
}
// 勾选消费件数
if
(
this
.
consumeChecked
.
count
)
{
if
(
this
.
form
.
lowest_cost_count
)
{
consumeObj
[
'lowest_cost_count'
]
=
this
.
form
.
lowest_cost_count
;
}
if
(
this
.
form
.
max_cost_count
)
{
consumeObj
[
'max_cost_count'
]
=
this
.
form
.
max_cost_count
;
}
}
// 勾选消费商品
if
(
this
.
consumeChecked
.
good
&&
this
.
xxSysp
.
goodsFilterId
)
{
consumeObj
.
goods_filter_id
=
this
.
xxSysp
.
goodsFilterId
;
...
...
@@ -922,38 +901,45 @@ export default {
filterAbbrInfo
:
this
.
xxSysp
.
filterAbbrInfo
});
}
// 处理适用商品折扣 未勾选不传这个对象
if
(
this
.
discount_limit
.
flag
)
{
const
discount_limit
=
{
...
this
.
discount_limit
};
delete
discount_limit
.
flag
;
consumeObj
.
discount_limit
=
JSON
.
stringify
(
discount_limit
);
}
// 支付方式
if
(
this
.
consumeChecked
.
payment
)
{
params
.
gic_payment_list
=
JSON
.
stringify
(
this
.
allList
.
filter
(
i
=>
this
.
checkList
.
includes
(
i
.
payCode
)));
params
.
gic_payment_flag
=
this
.
paymentFlag
;
if
(
this
.
form
.
consum_type
==
1
)
{
consumeObj
.
consum_type
=
1
;
// 勾选消费金额 --不填代表没有上下限,不传该字段
if
(
this
.
consumeChecked
.
cost
)
{
if
(
this
.
form
.
lowest_cost
)
{
consumeObj
[
'lowest_cost'
]
=
this
.
form
.
lowest_cost
;
}
if
(
this
.
form
.
max_cost
)
{
consumeObj
[
'max_cost'
]
=
this
.
form
.
max_cost
;
}
}
// 勾选消费件数
if
(
this
.
consumeChecked
.
count
)
{
if
(
this
.
form
.
lowest_cost_count
)
{
consumeObj
[
'lowest_cost_count'
]
=
this
.
form
.
lowest_cost_count
;
}
if
(
this
.
form
.
max_cost_count
)
{
consumeObj
[
'max_cost_count'
]
=
this
.
form
.
max_cost_count
;
}
}
// 处理适用商品折扣 未勾选不传这个对象
if
(
this
.
discount_limit
.
flag
)
{
const
discount_limit
=
{
...
this
.
discount_limit
};
delete
discount_limit
.
flag
;
consumeObj
.
discount_limit
=
JSON
.
stringify
(
discount_limit
);
}
// 支付方式
if
(
this
.
consumeChecked
.
payment
)
{
params
.
gic_payment_list
=
JSON
.
stringify
(
this
.
allList
.
filter
(
i
=>
this
.
checkList
.
includes
(
i
.
payCode
)));
params
.
gic_payment_flag
=
this
.
paymentFlag
;
}
else
{
params
.
gic_payment_flag
=
0
;
}
}
else
{
params
.
gic_payment_flag
=
0
;
}
// 消费
params
=
Object
.
assign
(
params
,
consumeObj
);
// 合并消费触发数据
}
else
if
(
this
.
form
.
effectAction
===
'consume'
&&
this
.
form
.
consum_type
==
2
)
{
// 门店
let
consumeObj
=
{
store_mode
:
this
.
consumeChecked
.
store
?
1
:
0
,
consumerStoreType
:
this
.
form
.
consumerStoreType
,
order_store
:
this
.
consumeChecked
.
store
?
(
this
.
form
.
consumerStoreType
===
0
?
this
.
form
.
order_store
:
this
.
form
.
order_store_new
)
:
''
};
consumeObj
.
consum_type
=
2
;
consumeObj
[
'lowest_cost'
]
=
this
.
form
.
lowest_cost
;
// 勾选消费商品
if
(
this
.
consumeChecked
.
good
&&
this
.
xxSysp
.
goodsFilterId
)
{
consumeObj
.
goods_filter_id
=
this
.
xxSysp
.
goodsFilterId
;
consumeObj
.
goodsSearchDetail
=
JSON
.
stringify
({
conditionList
:
this
.
isEdit
?
this
.
xxSysp
.
conditionList_copy
:
this
.
xxSysp
.
conditionList
,
// 编辑保存备份数据
filterAbbrInfo
:
this
.
xxSysp
.
filterAbbrInfo
});
consumeObj
.
gift_flag
=
this
.
form
.
gift_flag
;
consumeObj
.
consum_type
=
2
;
consumeObj
[
'lowest_cost'
]
=
this
.
form
.
lowest_cost
;
if
(
this
.
consumeChecked
.
good
&&
this
.
xxSysp
.
goodsFilterId
)
{
consumeObj
.
gift_flag
=
this
.
form
.
gift_flag
;
}
}
params
=
Object
.
assign
(
params
,
consumeObj
);
// 合并消费触发数据
}
...
...
@@ -1087,9 +1073,6 @@ export default {
// console.log(this.gradeList )
});
}
if
(
!
isInit
)
{
this
.
form
.
consum_type
=
1
;
}
},
// 消费触发
handleLowestCost
()
{
...
...
src/views/ecm/marketing-event/index.vue
View file @
2bff20bf
...
...
@@ -264,8 +264,6 @@ export default {
}
},
consumType
(
val
)
{
console
.
log
(
'-------consumType'
);
console
.
log
(
val
);
this
.
list
.
forEach
(
el
=>
{
this
.
delItem
(
el
);
});
...
...
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