Commit b0cdd9a9 by caoyanzhi

update: 会员卡设置

parent 92143f25
......@@ -98,6 +98,10 @@ export default {
enterpriseId: {
type: String,
default: ''
},
isExist: {
type: Boolean,
default: false
}
},
watch: {
......@@ -142,6 +146,20 @@ export default {
};
},
methods: {
checkOpenThird() {
// 未开通的商户,不提示
// 开通的商户才提示
// 点击已完成才进行下一步操作
return new Promise((resolve, reject) => {
if (!this.isExist || this.type != 1) {
return resolve();
}
this.$confirm('您已对接「天猫」、「抖音」渠道的会员等级,为确保每个渠道的会员等级对应关系一致,在调整会员等级顺序或者新增会员等级前请联系运营经理确认是否对应渠道的会员等级关系已维护完成!', '提示', {
cancelButtonText: '未完成',
confirmButtonText: '已完成'
}).then(resolve);
});
},
// 编辑集团
editCliqueLevel(index, row, obj, type) {
this.$emit('edit', row, type);
......@@ -167,13 +185,17 @@ export default {
});
},
addCard(type) {
if (this.tableData.length >= 20) return this.$message.warning('每个卡类型最多可创建20张会员卡')
this.$emit('add', type);
this.checkOpenThird().then(() => {
if (this.tableData.length >= 20) return this.$message.warning('每个卡类型最多可创建20张会员卡')
this.$emit('add', type);
});
},
editSort() {
if (!this.list.length) return this.$message.warning(`暂无${this.$options.filters.typeFilter(this.type)}!`);
this.isEditSort = true;
this.sortTable.option('sort', true);
this.checkOpenThird().then(() => {
if (!this.list.length) return this.$message.warning(`暂无${this.$options.filters.typeFilter(this.type)}!`);
this.isEditSort = true;
this.sortTable.option('sort', true);
});
},
cancelEditSort() {
this.isEditSort = false;
......
......@@ -276,8 +276,8 @@
</el-form-item>
</el-form>
<!-- type 1 常规卡 2 特殊卡 3 付费卡(集团不展示) -->
<member-card-table :tableData="generalCardList" type="1" :logoImg="logoImg" @add="onAdd" @edit="onEdit"/>
<member-card-table :tableData="specialCardList" type="2" :logoImg="logoImg" @add="onAdd" @edit="onEdit"/>
<member-card-table :isExist="isExist" :tableData="generalCardList" type="1" :logoImg="logoImg" @add="onAdd" @edit="onEdit"/>
<member-card-table :isExist="isExist" :tableData="specialCardList" type="2" :logoImg="logoImg" @add="onAdd" @edit="onEdit"/>
</div>
</div>
<!-- end -->
......@@ -314,6 +314,8 @@ export default {
}
],
projectName: 'gic-clique', //当前项目名
// 是否开通天猫、抖音等渠道
isExist: false,
firstRadio: 0,
......@@ -379,6 +381,12 @@ export default {
// this.selectReplayStyle()
},
methods: {
getOpenThird() {
getRequest('/api-admin/judge-enterprise-third-channel', {}).then(res => {
const { result } = res.data || {};
this.isExist = result.isExist;
});
},
// 服务门店变更逻辑
changeServiceSwitch(val) {
let typeValue = val ? 1 : 0;
......@@ -716,6 +724,7 @@ export default {
that.getMemberSetInfo();
that.getTempInfo();
that.getEnterprise();
this.getOpenThird();
}
};
</script>
......
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