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
45142112
Commit
45142112
authored
Sep 22, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 智能营销对接商品选择器
parent
657f1885
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
24 deletions
+35
-24
form.js
src/views/ecm/form.js
+26
-19
form.vue
src/views/ecm/form.vue
+9
-5
No files found.
src/views/ecm/form.js
View file @
45142112
...
...
@@ -4,16 +4,16 @@ import { getEcmInfo, saveEcmInfo, getUseStoredFalg, getXsxsFalg, gicPaymentList
import
{
getCardManualSetting
}
from
'@/service/api/cardApi.js'
;
import
{
listTemplateVariables
}
from
'@/service/api/msgApi.js'
;
import
{
klflStrategy
}
from
'@/service/api/gameApi.js'
;
// 会员等级列表接口
import
xxSysp_mix
from
'@/mixins/selector.js'
;
// 商品选择器方法mixins
//
import xxSysp_mix from '@/mixins/selector.js'; // 商品选择器方法mixins
import
marketingEvent
from
'./marketing-event/index.vue'
;
import
{
formatDateTimeByType
,
deepClone
}
from
'@/utils/index.js'
;
import
{
formatDateTimeByType
/*deepClone*/
}
from
'@/utils/index.js'
;
import
{
isEmpty
,
numOfDecimal
}
from
'@/utils/strlen.js'
;
import
itemCard
from
'./partials/item-card.vue'
;
import
varDialog
from
'./partials/variables.vue'
;
import
Vue
from
'vue'
;
export
default
{
name
:
'ecm-manage'
,
mixins
:
[
xxSysp_mix
],
//
mixins: [xxSysp_mix],
data
()
{
return
{
onlineStatus
:
0
,
...
...
@@ -40,6 +40,7 @@ export default {
couponAutoGetFlag
:
0
,
// 1开启自动领取 0关闭
couponAutoGetStock
:
0
,
// 自动领取最大库存数
enterpriseId
:
''
,
goodsEnable
:
false
,
form
:
{
memberType
:
0
,
ecmPlanName
:
''
,
...
...
@@ -88,6 +89,7 @@ export default {
order_store_new
:
''
,
storedLowest
:
0
,
storedMax
:
0
,
goods_filter_id
:
''
,
// 商品选择器id
consum_type
:
1
,
gift_flag
:
0
,
consumer_store_type
:
0
,
...
...
@@ -436,7 +438,8 @@ export default {
const
commonScene
=
res
.
result
.
commonScene
;
const
consumTrigger
=
res
.
result
.
consumTrigger
;
this
.
enabledMessageState
=
res
.
result
.
enabledMessageState
||
0
;
this
.
xxSysp
.
goodsEnable
=
res
.
result
.
goodsEnable
||
false
;
// 是否支持商品选择器
// this.xxSysp.goodsEnable = res.result.goodsEnable || false; // 是否支持商品选择器
this
.
goodsEnable
=
res
.
result
.
goodsEnable
||
false
;
// 是否支持商品选择器
if
(
result
&&
!
this
.
isInit
)
{
this
.
onlineStatus
=
result
.
onlineStatus
;
this
.
creatorId
=
res
.
result
.
ecmDTO
.
creatorId
;
...
...
@@ -540,15 +543,16 @@ export default {
}
// 消费商品
if
(
res
.
result
.
goodsEnable
&&
consumTrigger
.
goods_filter_id
)
{
this
.
xxSysp
.
goodsFilterId
=
consumTrigger
.
goods_filter_id
||
''
;
this
.
form
.
goods_filter_id
=
consumTrigger
.
goods_filter_id
||
''
;
// this.xxSysp.goodsFilterId = consumTrigger.goods_filter_id || '';
this
.
consumeChecked
.
good
=
!!
consumTrigger
.
goods_filter_id
||
false
;
if
(
res
.
result
.
goodsSearchDetail
.
detail
)
{
const
goodsSearchDetail
=
JSON
.
parse
(
res
.
result
.
goodsSearchDetail
.
detail
);
this
.
xxSysp
.
conditionList
=
goodsSearchDetail
.
conditionList
;
// ref selector此时放在modal里并没有渲染,之后赋值
this
.
xxSysp
.
conditionList_copy
=
deepClone
(
goodsSearchDetail
.
conditionList
);
// 备份数据
this
.
xxSysp
.
filterAbbrInfo
=
goodsSearchDetail
.
filterAbbrInfo
||
[];
this
.
xxSysp
.
filterLogicalOperator
=
goodsSearchDetail
.
filterLogicalOperator
||
[];
}
//
if (res.result.goodsSearchDetail.detail) {
//
const goodsSearchDetail = JSON.parse(res.result.goodsSearchDetail.detail);
//
this.xxSysp.conditionList = goodsSearchDetail.conditionList; // ref selector此时放在modal里并没有渲染,之后赋值
//
this.xxSysp.conditionList_copy = deepClone(goodsSearchDetail.conditionList); // 备份数据
//
this.xxSysp.filterAbbrInfo = goodsSearchDetail.filterAbbrInfo || [];
//
this.xxSysp.filterLogicalOperator = goodsSearchDetail.filterLogicalOperator || [];
//
}
this
.
form
.
gift_flag
=
consumTrigger
.
gift_flag
;
}
...
...
@@ -836,7 +840,8 @@ export default {
}
}
// 校验勾选
if
(
this
.
consumeChecked
.
good
&&
!
this
.
xxSysp
.
goodsFilterId
)
{
if
(
this
.
consumeChecked
.
good
&&
!
this
.
form
.
goods_filter_id
)
{
// if (this.consumeChecked.good && !this.xxSysp.goodsFilterId) {
this
.
$tips
({
type
:
'warning'
,
message
:
'请选择指定消费商品'
});
return
;
}
...
...
@@ -998,12 +1003,14 @@ export default {
order_store
:
this
.
consumeChecked
.
store
?
(
this
.
form
.
consumerStoreType
===
0
?
this
.
form
.
order_store
:
this
.
form
.
order_store_new
)
:
''
};
// 勾选消费商品
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
});
if
(
this
.
consumeChecked
.
good
&&
this
.
form
.
goods_filter_id
)
{
// if (this.consumeChecked.good && this.xxSysp.goodsFilterId) {
consumeObj
.
goods_filter_id
=
this
.
form
.
goods_filter_id
;
// 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
;
}
...
...
src/views/ecm/form.vue
View file @
45142112
...
...
@@ -171,14 +171,15 @@
</div>
</div>
</el-form-item>
<el-form-item
v-if=
"xxSysp.goodsEnable"
>
<el-form-item
v-if=
"goodsEnable"
>
<!-- <el-form-item v-if="xxSysp.goodsEnable"> -->
<div
class=
"no_label_form_label"
>
<el-checkbox
class=
"el-form-item__label align-left"
:disabled=
"!isAdd"
v-model=
"consumeChecked.good"
>
消费商品
</el-checkbox>
<div>
<span
class=
"fz14 gray"
v-show=
"!consumeChecked.good && form.consum_type == 1"
>
所有消费商品
</span>
<div
class=
"fz14 gray"
v-show=
"!consumeChecked.good && form.consum_type !== 1"
>
勾选后,满足条件的订单中在所选商品范围内的商品金额才会进行统计
</div>
<div
class=
"sysp__content clearfix"
v-show=
"consumeChecked.good"
>
<div
class=
"fl"
v-if=
"xxSysp.filterAbbrInfo.length && !Array.isArray(xxSysp.filterAbbrInfo[0])"
>
<
!-- <
div class="fl" v-if="xxSysp.filterAbbrInfo.length && !Array.isArray(xxSysp.filterAbbrInfo[0])">
<template v-for="(item, idx) in xxSysp.filterAbbrInfo">
{{ item.optName }}
<span :key="idx" class="item">{{ item.text }}</span>
...
...
@@ -197,7 +198,10 @@
<el-button v-if="xxSysp.filterAbbrInfo.length > xxSysp.max" type="text" @click="xxSysp.isExpand = !xxSysp.isExpand">{{ xxSysp.isExpand ? '收起' : '展开' }}<i class="el-icon-arrow-down" :class="{ 'is-expand': xxSysp.isExpand }"></i></el-button>
</div>
<el-button type="primary" @click="handleXxSyspClick" class="fl mt5" size="mini">{{ !isAdd ? '查看' : '编辑' }}</el-button>
<el-button
v-show=
"xxSysp.filterAbbrInfo.length && isAdd"
@
click=
"handleXxSyspReset"
class=
"fl mt5"
size=
"mini"
>
清空
</el-button>
<el-button v-show="xxSysp.filterAbbrInfo.length && isAdd" @click="handleXxSyspReset" class="fl mt5" size="mini">清空</el-button> -->
<dm-goods-selector
ref=
"goodsSelector"
mode=
"dialog"
scene-code=
"productEcm"
:projectName=
"projectName"
:disabled=
"!isAdd"
:widget-id
.
sync=
"form.goods_filter_id"
>
<el-button
slot=
"trigger"
type=
"primary"
@
click=
"$refs.goodsSelector.showGoodsSelector()"
class=
"fl mt5"
size=
"mini"
>
编辑
</el-button>
</dm-goods-selector>
</div>
<div
v-show=
"consumeChecked.good"
>
<span
style=
"margin-left: 38px;"
>
是否剔除“赠品”类型商品
</span>
...
...
@@ -643,13 +647,13 @@
</el-form>
<!-- 消费商品dialog -->
<el-dialog
title=
"适用商品"
:visible
.
sync=
"xxSysp.visible"
width=
"690px"
>
<
!-- <
el-dialog title="适用商品" :visible.sync="xxSysp.visible" width="690px">
<vue-gic-goods-selector ref="selector" :projectName="projectName"></vue-gic-goods-selector>
<div slot="footer" class="dialog-footer">
<el-button @click="xxSysp.visible = false">{{ !isAdd ? '关闭' : '取消' }}</el-button>
<el-button v-if="isAdd" type="primary" @click="xxSyspConfirm">确定</el-button>
</div>
</el-dialog>
</el-dialog>
-->
</div>
</template>
<
script
>
...
...
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