Commit ade414c9 by caoyanzhi

update: 门店选择器回显

parent 91c7d71b
......@@ -134,6 +134,7 @@ export default {
const that = this;
return {
requestProject: 'marketing',
gicCouponType: '', // gic定义的卡券类型(0:普通卡券, 1:e待洗, 2:好办卡券, 3:微盟外部券, 4:通用外部券
creatorId: '',
uuid: '',
canEdit: false,
......@@ -514,6 +515,7 @@ export default {
const card = res.result.card;
// 3、4为外部券,不显示保存按钮
this.storeMode = card.storeMode === 0 ? 0 : 1;
this.gicCouponType = card.gicCouponType;
this.form.cardApplyChannel = card.cardApplyChannel ? card.cardApplyChannel.split(',') : [];
this.form.auditingStatus = card.auditingStatus || '';
this.form.giveFlag = card.giveFlag;
......@@ -621,11 +623,38 @@ export default {
// 线下适用商品
if (card.goodsSearchDetail && card.goodsFilterId) {
this.xxSysp.goodsFilterId = card.goodsFilterId;
const goodsSearchDetail = JSON.parse(card.goodsSearchDetail);
const goodsSearchDetail = JSON.parse(card.goodsSearchDetail || '{}');
this.xxSysp.conditionList = this.xxSysp.conditionList_copy = goodsSearchDetail.conditionList; // ref selector此时放在modal里并没有渲染,之后赋值
this.xxSysp.conditionList = goodsSearchDetail.conditionList; // ref selector此时放在modal里并没有渲染,之后赋值
this.xxSysp.conditionList_copy = deepClone(goodsSearchDetail.conditionList); // 备份数据
this.xxSysp.filterAbbrInfo = goodsSearchDetail.filterAbbrInfo || [];
this.xxSysp.conditionList_copy = deepClone(goodsSearchDetail.conditionList || {}); // 备份数据
if (card.gicCouponType == 3 || card.gicCouponType == 4) {
const filterAbbrInfo = (goodsSearchDetail.filterAbbrInfo || []).map(el => {
return el.map((item, index) => {
if (index == 0) {
item.optName = null;
}
// intersect 或者,union 并且,diff 剔除
switch (item.optName) {
case 'intersect':
item.optName = '或者';
break;
case 'union':
item.optName = '并且';
break;
case 'diff':
item.optName = '剔除';
break;
default:
item.optName = null;
break;
}
return item;
});
});
this.xxSysp.filterAbbrInfo = this.xxSyspLabel(filterAbbrInfo);
} else {
this.xxSysp.filterAbbrInfo = goodsSearchDetail.filterAbbrInfo || [];
}
}
this.form.cardLimit = card.cardLimit;
......
......@@ -119,11 +119,13 @@
<span :key="idx" class="item">{{ item.text }}</span>
</template>
</div>
<template v-if="xxSysp.goodsEnable && (((isEdit || isInfo) && xxSysp.filterAbbrInfo.length) || isAdd || isCopy)">
<el-button type="primary" @click="handleXxSyspClick" class="fl mt5" size="mini">{{ isEdit || isInfo ? '查看' : '编辑' }}</el-button>
<el-button v-show="xxSysp.filterAbbrInfo.length && !isEdit && !isInfo" @click="handleXxSyspReset" class="fl mt5" size="mini">清空</el-button>
<template v-if="gicCouponType != 3 && gicCouponType != 4">
<template v-if="xxSysp.goodsEnable && (((isEdit || isInfo) && xxSysp.filterAbbrInfo.length) || isAdd || isCopy)">
<el-button type="primary" @click="handleXxSyspClick" class="fl mt5" size="mini">{{ isEdit || isInfo ? '查看' : '编辑' }}</el-button>
<el-button v-show="xxSysp.filterAbbrInfo.length && !isEdit && !isInfo" @click="handleXxSyspReset" class="fl mt5" size="mini">清空</el-button>
</template>
<p v-else class="fz14 gray">未选择</p>
</template>
<p v-else class="fz14 gray">未选择</p>
</div>
<div v-if="xxSysp.goodsEnable && (((isEdit || isInfo) && xxSysp.filterAbbrInfo.length) || isAdd || isCopy)" class="tips fz12 gray"><span class="w100 pr10 inline-block"></span>* 仅支持第三方api接口核销卡券时使用</div>
</div>
......
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