Commit fca00576 by caoyanzhi

update: 客户展示设置

parent 45a2fab9
......@@ -110,6 +110,12 @@ export default {
errMsg.errorMsg(res.data);
return;
}
this.$nextTick(() => {
this.rules.storeType.trigger = 'change';
});
// storeType = -1时为通用策略
// 通用策略不能修改门店类型
if (this.myCustomData.storeType.includes('-1')) return;
if (Array.isArray(result)) {
this.selectedTypes = result.reduce((types, el) => {
if (typeof el.storeType == 'string' && el.memberManageSettingId != this.myCustomData.memberManageSettingId) {
......@@ -120,14 +126,12 @@ export default {
return types;
}, []);
this.myCustomData.storeType = this.myCustomData.storeType.concat(this.selectedTypes);
this.$nextTick(() => {
this.rules.storeType.trigger = 'change';
});
}
});
},
onSave() {
this.loading = true;
this.onOptionsChange();
this.$refs.myCustomData.validate(vali => {
if (!vali) {
this.loading = false;
......@@ -167,6 +171,13 @@ export default {
showFreezeFlag,
isSeeAuthMember
});
// storeType = -1时为通用策略
// 通用策略不能修改门店类型
if (storeType == -'1') {
this.selectedTypes = this.storeTypes.map(el => el.value);
this.myCustomData.storeType = this.storeTypes.map(el => el.value);
this.myCustomData.storeType.push('-1');
}
this.$nextTick(() => {
this.rules.options.trigger = 'change';
});
......
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