Commit fe0fd4c4 by 黑潮

update: 判断失效

parent eed1395e
......@@ -18,6 +18,7 @@ export default {
name: '智能营销新增',
component: () => import(/* webpackChunkName: "ecm" */ '../../views/ecm/form.vue'),
meta: {
type: 'copy',
path: '/ecm/list'
}
},
......
......@@ -118,7 +118,7 @@ export default {
isEdit: this.$route.meta.type === 'edit',
isAdd: this.$route.meta.type === 'add' || this.$route.meta.type === 'copy',
isInfo: this.$route.meta.type === 'info',
isCopy: this.$route.meta.copy === 'copy',
isCopy: this.$route.meta.type === 'copy',
isInit: this.$route.meta.type === 'add',
// 人群筛选器可传参数
sceneValue: 'member', // 场景值
......@@ -708,8 +708,12 @@ export default {
}
}
if (this.isCopy) {
if (this.form.memberType === 1 && this.form.memberGroupIds.some(el => 'effectiveStatus' in el && el.effectiveStatus === 0)) {
return this.$tips({ type: 'warning', message: '所选的会员分组中,有失效的会员分组,请先将失效分组删除后再保存。' });
if (this.form.memberType === 1) {
let loseMemberIds = this.defaltSelected.filter(el => 'effectiveStatus' in el && el.effectiveStatus === 0).map(el => el.memberTagGroupId);
let selectedIds = this.form.memberGroupIds.split(',');
if (loseMemberIds.some(el => selectedIds.includes(el))) {
return this.$tips({ type: 'warning', message: '所选的会员分组中,有失效的会员分组,请先将失效分组删除后再保存。' });
}
}
if (this.$refs.marketingEvent.hasDeleted) {
return this.$tips({ type: 'warning', message: '所选的营销事件中,存在已失效或被删除模板的营销事件,请先将失效的营销事件删除后再保存!' });
......
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