Commit fca00576 by caoyanzhi

update: 客户展示设置

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