Commit 05afb26e by chenxin

fix:营销组_8月上_微盟卡券接口迭代/ECM支持商品

parent bc4dde45
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/main.effb1bb00d00d3843d040822ab1fa346.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.2111.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.80.js></script><script type=text/javascript src=/marketing/static/js/manifest.c96c97101b6ae48d3c28.js></script><script type=text/javascript src=/marketing/static/js/vendor.4f54dc53154967b3adc7.js></script><script type=text/javascript src=/marketing/static/js/main.949fc9b6a672743a453a.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/main.3a948e2ba194b0961eba47433f40d7d6.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.80.js></script><script type=text/javascript src=/marketing/static/js/manifest.e6373410b4241ec5b72c.js></script><script type=text/javascript src=/marketing/static/js/vendor.4f54dc53154967b3adc7.js></script><script type=text/javascript src=/marketing/static/js/main.949fc9b6a672743a453a.js></script></body></html>
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,o,c){for(var f,i,u,s=0,l=[];s<n.length;s++)i=n[s],t[i]&&l.push(t[i][0]),t[i]=0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(e[f]=o[f]);for(r&&r(n,o,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)u=a(a.s=c[s]);return u};var n={},t={11:0};function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,a){r=t[e]=[n,a]});r[2]=n;var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,a.nc&&c.setAttribute("nonce",a.nc),c.src=a.p+"static/js/"+({0:"game",1:"card",2:"wechat",3:"evaluation",4:"message",5:"ecm",6:"recharge",7:"msg",8:"calllog"}[e]||e)+"."+{0:"0ea5eee276916402d464",1:"f7f3ea5e96f5e3767070",2:"5aa3ca7e326ef2ff5b56",3:"650a38a154a63ff404db",4:"b240fe6b93138b5f102a",5:"f4d1cef68b60c8ea2bb2",6:"727cccae0b80bca129d5",7:"8b5caebf83a79ac810ca",8:"73199fa96bf2a53581b9"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,o.appendChild(c),n},a.m=e,a.c=n,a.d=function(e,r,n){a.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/marketing/",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,o,c){for(var f,i,u,s=0,l=[];s<n.length;s++)i=n[s],t[i]&&l.push(t[i][0]),t[i]=0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(e[f]=o[f]);for(r&&r(n,o,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)u=a(a.s=c[s]);return u};var n={},t={11:0};function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,a){r=t[e]=[n,a]});r[2]=n;var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,a.nc&&c.setAttribute("nonce",a.nc),c.src=a.p+"static/js/"+({0:"game",1:"card",2:"wechat",3:"evaluation",4:"message",5:"ecm",6:"recharge",7:"msg",8:"calllog"}[e]||e)+"."+{0:"0ea5eee276916402d464",1:"ecb22c8f14b58634e4aa",2:"5aa3ca7e326ef2ff5b56",3:"650a38a154a63ff404db",4:"b240fe6b93138b5f102a",5:"791b049387e19f045ebc",6:"727cccae0b80bca129d5",7:"8b5caebf83a79ac810ca",8:"73199fa96bf2a53581b9"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,o.appendChild(c),n},a.m=e,a.c=n,a.d=function(e,r,n){a.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/marketing/",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -19,7 +19,7 @@
<script src="//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js"></script>
<!-- 组件引用cdn -->
<script src="//web-1251519181.file.myqcloud.com/components/header.2.0.2111.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/header.2.0.20.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.02.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/store.2.0.01.js"></script>
......
......@@ -109,7 +109,9 @@ a:hover {
.pr30{
padding-right: 30px!important;
}
.ml25{
margin-left: 25px!important;
}
.ml30{
margin-left: 30px!important;
}
......
......@@ -205,4 +205,26 @@
.el-tag__close{
top: -8px;
}
}
// 商品选择器
.sysp__content {
width: calc(100% - 170px);
display: inline-block;
> div {
margin-right: 10px;
display: inline-block;
vertical-align: middle;
max-width: 80%;
}
.item {
display: inline-block;
// height: 12px;
padding: 5px 10px;
font-size: 12px;
color: #8d8d8d;
background-color: #f5f7fa;
border-radius: 5px;
line-height: 16px;
}
}
\ No newline at end of file
// 商品选择器方法
export default {
data() {
return {
// ----线下适用商品开始----
xxSysp: {
visible: false, // 适用商品选择器dialog
goodsEnable: false,
filterAbbrInfo: [], // 选择后回显的label数据
goodsFilterId: null,
conditionList: null, // 商品选择器的回显值
isResign: false // 编辑后赋值
}
// ----线下适用商品结束----
};
},
methods: {
// ------线下适用商品开始-------
// 清空线下适用商品 ,重置商品选择器
handleXxSyspReset() {
this.$refs.selector.conditions[0].goodsList = [];
this.xxSysp.filterAbbrInfo = [];
this.xxSysp.conditionList = null;
this.xxSysp.goodsFilterId = null;
},
// 编辑点击
handleXxSyspClick(visible = true) {
this.xxSysp.visible = visible;
// refs.selector放在modal里,初始化的时候并没有渲染
if (!this.xxSysp.isResign && this.isEdit) {
this.$nextTick(() => {
this.$refs.selector.conditions = this.xxSysp.conditionList;
this.xxSysp.isResign = true;
});
}
if (this.xxSysp.filterAbbrInfo.length !== 0) {
this.$refs.selector.changeComplexInfo(); // 强制展开
}
},
// 商品选择器反显label
xxSyspLabel(filterAbbrInfo) {
let _filterAbbrInfo = [];
// 设置显示label
filterAbbrInfo &&
filterAbbrInfo.forEach(y => {
_filterAbbrInfo = y.map(v => {
return {
optName: v.optName,
text: `${v.typeName}${v.belong}${v.childNames
.map(v => {
return `【${v}】`;
})
.join('')}`
};
});
});
return _filterAbbrInfo;
},
// 商品选择器确认
xxSyspConfirm() {
this.$refs.selector
.collectConditions()
.then(res => {
if (res == false) {
throw new Error('商品选择器条件不能为空!');
} else {
this.xxSysp.goodsFilterId = res.id; // 保存id
this.xxSysp.conditionList = res.conditionList; // 保存回显list
this.xxSysp.filterAbbrInfo = this.xxSyspLabel(res.filterAbbrInfo);
this.handleXxSyspClick(false); // 强制展开
this.xxSysp.visible = false;
}
})
.catch(err => {
this.$tips({ message: err.message, type: 'error' });
});
}
// ------线下适用商品开始-------
}
};
......@@ -4,6 +4,7 @@
import dmUploadImg from '@/components/upload/img';
import imgTextDrag from './partials/imgtext-drag';
import { formatDateTimeByType } from '@/utils/index.js';
import xxSysp_mix from '@/mixins/selector.js'; // 商品选择器方法
import { cardGetShelfs, getCardDetail, saveUpdateCard, copyCardDetailService, getCategoryList, getPropertyList, getPropertyValueList } from '@/service/api/cardApi.js';
import dmGoodsInput from '@/components/goods-input/index.vue';
const initForm = {
......@@ -48,6 +49,7 @@ const initForm = {
const sale_limit = { fee: 0, goods: '', flag: false, type: 0 }; //最低消费
const goods = { ok: '', no: '', flag: false };
export default {
mixins: [xxSysp_mix],
data() {
return {
requestProject: 'marketing',
......@@ -109,18 +111,8 @@ export default {
v3name: []
}
],
coupGoodsWeimobList: [],
coupGoodsWeimobList: []
// ----微盟适用商品结束----
// ----线下适用商品开始----
xxSysp: {
visible: false, // 适用商品选择器dialog
goodsEnable: false,
filterAbbrInfo: [], // 选择后回显的label数据
goodsFilterId: null,
conditionList: null, // 商品选择器的回显值
isResign: false // 编辑后赋值
}
// ----线下适用商品结束----
};
},
watch: {
......@@ -871,69 +863,8 @@ export default {
this.$tips({ type: 'warning', message: err.message });
return false;
});
},
// ------微盟适用商品结束-------
// ------线下适用商品开始-------
// 清空线下适用商品 ,重置商品选择器
handleXxSyspReset() {
this.$refs.selector.conditions[0].goodsList = [];
this.xxSysp.filterAbbrInfo = [];
this.xxSysp.conditionList = null;
this.xxSysp.goodsFilterId = null;
},
// 编辑点击
handleXxSyspClick(visible = true) {
this.xxSysp.visible = visible;
// refs.selector放在modal里,初始化的时候并没有渲染
if (!this.xxSysp.isResign && this.isEdit) {
this.$nextTick(() => {
this.$refs.selector.conditions = this.xxSysp.conditionList;
this.xxSysp.isResign = true;
});
}
if (this.xxSysp.filterAbbrInfo.length !== 0) {
this.$refs.selector.changeComplexInfo(); // 强制展开
}
},
xxSyspLabel(filterAbbrInfo) {
let _filterAbbrInfo = [];
// 设置显示label
filterAbbrInfo &&
filterAbbrInfo.forEach(y => {
_filterAbbrInfo = y.map(v => {
return {
optName: v.optName,
text: `${v.typeName}${v.belong}${v.childNames
.map(v => {
return `【${v}】`;
})
.join('')}`
};
});
});
return _filterAbbrInfo;
},
// 商品选择器确认
xxSyspConfirm() {
this.$refs.selector
.collectConditions()
.then(res => {
console.log(res);
if (res == false) {
throw new Error('商品选择器条件不能为空!');
} else {
this.xxSysp.goodsFilterId = res.id; // 保存id
this.xxSysp.conditionList = res.conditionList; // 保存回显list
this.xxSysp.filterAbbrInfo = this.xxSyspLabel(res.filterAbbrInfo);
this.handleXxSyspClick(false); // 强制展开
this.xxSysp.visible = false;
}
})
.catch(err => {
this.$tips({ message: err.message, type: 'error' });
});
}
// ------线下适用商品开始-------
// ------微盟适用商品结束-------
},
mounted() {
this.cardGetShelfs();
......
......@@ -237,27 +237,3 @@
import cardForm from './form.js';
export default cardForm;
</script>
<style lang="scss" scoped>
.sysp__content {
width: calc(100% - 170px);
display: flex;
> div {
margin-right: 10px;
display: inline-block;
vertical-align: middle;
max-width: 60%;
}
.item {
display: inline-block;
// height: 12px;
padding: 5px 10px;
font-size: 12px;
color: #8d8d8d;
background-color: #f5f7fa;
border-radius: 5px;
line-height: 16px;
}
}
</style>
......@@ -2,13 +2,16 @@ import { getEcmInfo, saveEcmInfo } from '@/service/api/ecmApi.js';
import { listTemplateVariables } from '@/service/api/msgApi.js';
import { sceneSettingList } from '@/service/api/commonApi.js';
import { klflStrategy } from '@/service/api/gameApi.js'; // 会员等级列表接口
import xxSysp_mix from '@/mixins/selector.js'; // 商品选择器方法mixins
import marketingEvent from './marketing-event/index.vue';
import { formatDateTimeByType } from '@/utils/index.js';
import { isEmpty, numOfDecimal } from '@/utils/strlen.js';
import itemCard from './partials/item-card.vue';
import varDialog from './partials/variables.vue';
export default {
name: 'ecm-manage',
mixins: [xxSysp_mix],
data() {
return {
ecmPlanId: '', // 必传,
......@@ -58,7 +61,7 @@ export default {
max_cost: '',
lowest_cost_count: '',
max_cost_count: '',
store_mode: 0,
// store_mode: 0,
order_store: ''
},
template: {
......@@ -110,7 +113,14 @@ export default {
effectiveStatus: 1, // 不传: 所有状态 1: 有效 0: 失效
templateOptions: [],
triggerCode: ''
triggerCode: '',
// 消费触发勾选checkbox
consumeChecked: {
store: false, // 门店
cost: false, // 消费金额
count: false, // 消费件数
good: false // 消费商品
}
};
},
components: {
......@@ -179,16 +189,6 @@ export default {
return tips;
}
},
created() {
// 设置面包屑
let breadcrumbName = '智能营销编辑';
if (this.isAdd) {
this.sceneSettingList();
breadcrumbName = '智能营销新增';
}
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '智能营销', path: '/ecm' }, { name: breadcrumbName, path: '' }]);
this.listTemplateVariables();
},
methods: {
/* ----------------核心方法--------------- */
// 获取变量列表
......@@ -221,6 +221,7 @@ 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; // 是否支持商品选择器
if (result && this.isEdit) {
this.ecmPlanId = this.form.ecmPlanId = result.ecmPlanId || '';
this.form.ecmPlanName = result.ecmPlanName;
......@@ -277,6 +278,29 @@ export default {
});
// 处理消费触发
if (consumTrigger) {
// 触发门店初始化
if (this.form.effectAction === 'consume' && consumTrigger.store_mode) {
this.$nextTick(_ => {
this.$refs.storeCard.init();
});
}
this.consumeChecked.store = Boolean(consumTrigger.store_mode) || false; /** 门店类型: 0: 所有门店, 1: 部分(包含部分门店, 部分分组等) **/
this.form.order_store = consumTrigger.order_store || ''; /** 消费门店key值 **/
// 消费商品
if (res.result.goodsEnable && 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.filterAbbrInfo = goodsSearchDetail.filterAbbrInfo || [];
}
}
// 消费金额&消费件数
this.consumeChecked.cost = consumTrigger['lowest_cost'] || consumTrigger['max_cost'] ? true : false;
this.consumeChecked.count = consumTrigger['lowest_cost_count'] || consumTrigger['max_cost_count'] ? true : false;
const _mapConsumeArr = ['lowest_cost', 'max_cost', 'lowest_cost_count', 'max_cost_count'];
_mapConsumeArr.map(v => {
// 为空为null代表无限制
......@@ -286,14 +310,6 @@ export default {
this.form[v] = consumTrigger[v];
}
});
this.form.store_mode = consumTrigger.store_mode || 0; /** 门店类型: 0: 所有门店, 1: 部分(包含部分门店, 部分分组等) **/
this.form.order_store = consumTrigger.order_store || ''; /** 消费门店key值 **/
}
// 触发门店初始化
if (this.form.effectAction === 'consume' && this.form.store_mode) {
this.$nextTick(_ => {
this.$refs.storeCard.init();
});
}
}
if (!this.form.templateUseEnable) return;
......@@ -431,14 +447,31 @@ export default {
return;
}
// 如果是消费触发
// if (this.form.effectAction === 'consume') {
// const errorLowestCost = this.handleLowestCost();
// const errorLowestCostCount = this.handleLowestCostCount();
// if (errorLowestCost !== '' || errorLowestCostCount !== '') {
// this.$tips({ type: 'warning', message: '消费触发配置错误' });
// return;
// }
// }
if (this.form.effectAction === 'consume') {
// 这里判断部分门店是否为空
if (this.consumeChecked.store && this.consumeChecked.store) {
let data = await this.$refs.storeCard.getRightList();
if (!data.length) {
this.$tips({ type: 'warning', message: '部分门店不能为空' });
return;
}
}
// 校验勾选
if (this.consumeChecked.good && !this.xxSysp.goodsFilterId) {
this.$tips({ type: 'warning', message: '请选择指定消费商品' });
return;
}
// 填一个就行
if (this.consumeChecked.cost && (!this.form.lowest_cost && !this.form.max_cost)) {
this.$tips({ type: 'warning', message: '请填写消费金额区间值' });
return;
}
// 填一个就行
if (this.consumeChecked.count && (!this.form.lowest_cost_count && !this.form.max_cost_count)) {
this.$tips({ type: 'warning', message: '请填写消费件数区间值' });
return;
}
}
let params = {
ecmPlanId: this.form.ecmPlanId || '',
......@@ -461,22 +494,44 @@ export default {
marketingTimesType: this.form.marketingTimesType,
marketingTimes: this.form.marketingTimes
};
// 如果是消费触发
// 不填代表没有上下限,不传该字段
// 如果是消费触发数据处理 - 保存
// 全部则不传该字段
if (this.form.effectAction === 'consume') {
const _mapConsumeArr = ['lowest_cost', 'max_cost', 'lowest_cost_count', 'max_cost_count'];
// 门店
let consumeObj = {
store_mode: this.form.store_mode,
order_store: this.form.order_store
store_mode: this.consumeChecked.store ? 1 : 0,
order_store: this.consumeChecked.store ? this.form.order_store : ''
};
_mapConsumeArr.map(v => {
// 保存的消费触发上下限数据,没有填写的字段不传
let val = this.form[v];
if (!isEmpty(val)) {
consumeObj[v] = val;
// 勾选消费金额 --不填代表没有上下限,不传该字段
if (this.consumeChecked.cost) {
if (this.form.lowest_cost) {
consumeObj['lowest_cost'] = this.form.lowest_cost;
}
});
params = Object.assign(params, consumeObj);
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;
consumeObj.goodsSearchDetail = JSON.stringify({
conditionList: this.xxSysp.conditionList,
filterAbbrInfo: this.xxSysp.filterAbbrInfo
});
}
params = Object.assign(params, consumeObj); // 合并消费触发数据
}
if (this.form.effectType) {
......@@ -524,16 +579,6 @@ export default {
};
params.marketingTemplate = JSON.stringify(marketingTemplate);
}
// 这里判断部分门店是否为空
if (this.form.store_mode) {
let data = await this.$refs.storeCard.getRightList();
if (!data.length) {
this.$tips({ type: 'warning', message: '部分门店不能为空' });
return;
}
}
this.$refs[formName].validate(valid => {
if (valid) {
this.saveEcmInfo(params);
......@@ -687,7 +732,7 @@ export default {
},
// 初始化门店左侧数据
initStoreCardLeft() {
if (this.form.store_mode) {
if (this.consumeChecked.store) {
if (this.isAdd) {
// 这里新增的情况下也要初始化 门店组件
this.$nextTick(_ => {
......@@ -765,5 +810,15 @@ export default {
return '未知时间';
}
}
},
created() {
// 设置面包屑
let breadcrumbName = '智能营销编辑';
if (this.isAdd) {
this.sceneSettingList();
breadcrumbName = '智能营销新增';
}
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '智能营销', path: '/ecm' }, { name: breadcrumbName, path: '' }]);
this.listTemplateVariables();
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment