Commit 026a095b by crushh

update: 优化

parent 37777e4b
......@@ -918,6 +918,7 @@ export default {
conditionList: this.isEdit ? this.xxSysp.conditionList_copy : this.xxSysp.conditionList, // 编辑保存备份数据
filterAbbrInfo: this.xxSysp.filterAbbrInfo
});
consumeObj.gift_flag = this.form.gift_flag;
}
if (this.form.consum_type == 1) {
consumeObj.consum_type = 1;
......@@ -955,9 +956,6 @@ export default {
} else {
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); // 合并消费触发数据
}
......@@ -1091,6 +1089,9 @@ export default {
// console.log(this.gradeList )
});
}
if (isInit !== true) {
this.resetConsumType();
}
},
// 消费触发
handleLowestCost() {
......@@ -1280,8 +1281,11 @@ export default {
this.analyseConfig.crowd_send = 4;
this.analyseConfig.crowd_no_send = 1;
}
this.resetConsumType();
},
resetConsumType() {
//切换时效或触发行为 重置 累计消费的配置
if (this.form.consum_type == 2) {
// 累计消费时 切换时效 重置
this.form.consum_type = 1;
this.form.beginDate = '';
this.form.endDate = '';
......
......@@ -177,7 +177,7 @@
<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>
</div>
<div v-show="consumeChecked.good && form.consum_type == 2">
<div v-show="consumeChecked.good">
<span style="margin-left: 38px;">赠品是否支持触发</span>
<el-radio-group :disabled="!isAdd" v-model="form.gift_flag">
<el-radio :label="1" style="width: auto;">支持</el-radio>
......@@ -418,7 +418,7 @@
</div>
</h3>
<!-- 只有实时才是单图文 -->
<marketing-event :effectType="form.effectType" :readOnly="isInfo || onlineStatus == 2 || (form.consum_type == 2 && isEdit)" :show-delete-tooltip="isEdit && analyseConfig.open_flag == 1" show-out-coupon-icon ref="marketingEvent" @has-card="hasCard" v-if="ecmPlanId" :singleFlag="form.effectType === 0" :integralMultiple="form.effectAction === 'consume'" :ecmPlanId="ecmPlanId" :isSupportVar="form.effectType === 0" :code="code" :enabledMessageState="enabledMessageState" :cardLimitType="-1" :use-stored="useStoredFlag && ['consume', 'stored'].includes(form.effectAction) && form.effectType == 0 && form.consum_type == 1" :use-qfxx="form.effectType !== 0" :consumType="form.consum_type"> </marketing-event>
<marketing-event :effectType="form.effectType" :readOnly="isInfo || onlineStatus == 2 || (form.consum_type == 2 && isEdit)" :show-delete-tooltip="isEdit && analyseConfig.open_flag == 1" show-out-coupon-icon ref="marketingEvent" @has-card="hasCard" v-if="ecmPlanId" :singleFlag="form.effectType === 0" :integralMultiple="form.effectAction === 'consume' && form.consum_type != 2" :ecmPlanId="ecmPlanId" :isSupportVar="form.effectType === 0" :code="code" :enabledMessageState="enabledMessageState" :cardLimitType="-1" :use-stored="useStoredFlag && ['consume', 'stored'].includes(form.effectAction) && form.effectType == 0 && form.consum_type == 1" :use-qfxx="form.effectType !== 0" :consumType="form.consum_type"> </marketing-event>
<!-- 只有非实时&&选择卡券了展示提示 -->
<div v-if="currentCard.comName && form.effectType != 0 && couponAutoGetFlag" class="fz13 regular-font-color line-height2" style="margin-left:120px;margin-top:30px;">
* 用户在领取卡券后需要<b class="bold">同步至ERP</b>,如果关闭用户<b class="bold">手动领取</b>,卡券在<b class="bold">批量投放</b>时会需要将卡券信息批量同步至ERP。 <br />
......
......@@ -184,8 +184,14 @@ export default {
},
computed: {
showOptionList() {
if (this.consumType == 2 && this.effectType == 0) {
const arr = ['card', 'integral'];
if (this.effectType == 0 && this.consumType == 2) {
// 消费触发-累计 只有 积分和卡券事件 且积分事件只能添加一次
let arr = ['card', 'integral'];
if (this.list && this.list.length) {
if (this.list.map(item => item.comName).includes('item-integral')) {
arr = ['card'];
}
}
this.options.forEach(item => {
if (arr.includes(item.value)) {
item.show = true;
......@@ -268,45 +274,6 @@ export default {
this.delItem(el);
});
},
// useStored: {
// handler() {
// console.log('useStored');
// if (this.useStored) {
// // this.options = [ ...this.options, { name: '会员卡升级', value: 'grade', key: 9, img: require('./assets/img/grade.svg'), disabled: false }]; //eslint-disable-line
// this.options.forEach(item => {
// if (item.value == 'grade') {
// item.show = false;
// }
// });
// } else {
// // this.options = this.options.filter(item => item.value !== 'grade');
// this.options.forEach(item => {
// if (item.value == 'grade') {
// item.show = true;
// }
// });
// }
// }
// },
// useQywx: {
// handler() {
// console.log('qywx');
// if (this.useQywx) {
// this.options.forEach(item => {
// if (item.value == 'qywx') {
// item.show = false;
// }
// });
// } else {
// this.options.forEach(item => {
// if (item.value == 'qywx') {
// item.show = true;
// }
// });
// }
// },
// },
list() {
if (this.list.some(item => item.comName === 'item-grade')) {
this.options.forEach(item => {
......
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