Commit b0cdd9a9 by caoyanzhi

update: 会员卡设置

parent 92143f25
...@@ -98,6 +98,10 @@ export default { ...@@ -98,6 +98,10 @@ export default {
enterpriseId: { enterpriseId: {
type: String, type: String,
default: '' default: ''
},
isExist: {
type: Boolean,
default: false
} }
}, },
watch: { watch: {
...@@ -142,6 +146,20 @@ export default { ...@@ -142,6 +146,20 @@ export default {
}; };
}, },
methods: { 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) { editCliqueLevel(index, row, obj, type) {
this.$emit('edit', row, type); this.$emit('edit', row, type);
...@@ -167,13 +185,17 @@ export default { ...@@ -167,13 +185,17 @@ export default {
}); });
}, },
addCard(type) { addCard(type) {
if (this.tableData.length >= 20) return this.$message.warning('每个卡类型最多可创建20张会员卡') this.checkOpenThird().then(() => {
this.$emit('add', type); if (this.tableData.length >= 20) return this.$message.warning('每个卡类型最多可创建20张会员卡')
this.$emit('add', type);
});
}, },
editSort() { editSort() {
if (!this.list.length) return this.$message.warning(`暂无${this.$options.filters.typeFilter(this.type)}!`); this.checkOpenThird().then(() => {
this.isEditSort = true; if (!this.list.length) return this.$message.warning(`暂无${this.$options.filters.typeFilter(this.type)}!`);
this.sortTable.option('sort', true); this.isEditSort = true;
this.sortTable.option('sort', true);
});
}, },
cancelEditSort() { cancelEditSort() {
this.isEditSort = false; this.isEditSort = false;
......
...@@ -276,8 +276,8 @@ ...@@ -276,8 +276,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- type 1 常规卡 2 特殊卡 3 付费卡(集团不展示) --> <!-- type 1 常规卡 2 特殊卡 3 付费卡(集团不展示) -->
<member-card-table :tableData="generalCardList" type="1" :logoImg="logoImg" @add="onAdd" @edit="onEdit"/> <member-card-table :isExist="isExist" :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="specialCardList" type="2" :logoImg="logoImg" @add="onAdd" @edit="onEdit"/>
</div> </div>
</div> </div>
<!-- end --> <!-- end -->
...@@ -314,6 +314,8 @@ export default { ...@@ -314,6 +314,8 @@ export default {
} }
], ],
projectName: 'gic-clique', //当前项目名 projectName: 'gic-clique', //当前项目名
// 是否开通天猫、抖音等渠道
isExist: false,
firstRadio: 0, firstRadio: 0,
...@@ -379,6 +381,12 @@ export default { ...@@ -379,6 +381,12 @@ export default {
// this.selectReplayStyle() // this.selectReplayStyle()
}, },
methods: { methods: {
getOpenThird() {
getRequest('/api-admin/judge-enterprise-third-channel', {}).then(res => {
const { result } = res.data || {};
this.isExist = result.isExist;
});
},
// 服务门店变更逻辑 // 服务门店变更逻辑
changeServiceSwitch(val) { changeServiceSwitch(val) {
let typeValue = val ? 1 : 0; let typeValue = val ? 1 : 0;
...@@ -716,6 +724,7 @@ export default { ...@@ -716,6 +724,7 @@ export default {
that.getMemberSetInfo(); that.getMemberSetInfo();
that.getTempInfo(); that.getTempInfo();
that.getEnterprise(); that.getEnterprise();
this.getOpenThird();
} }
}; };
</script> </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