Commit e7802e2a authored by chenqikuai's avatar chenqikuai

fix: 修复新增管理员时的bug

parent f32f5f61
......@@ -215,13 +215,12 @@ export default Vue.extend({
};
if (this.modalMode === eAddManagerModalMode.create) {
} else if (this.modalMode === eAddManagerModalMode.edit) {
delete rules.name
delete rules.tel
delete rules.name;
delete rules.tel;
}
console.log(rules);
return rules;
},
levelOptions() {
......@@ -488,6 +487,18 @@ export default Vue.extend({
}
});
},
async handleOutLetName(newV: string) {
if (newV !== "") {
const ret = await AddressService.getInstance().getOutlet({
outlet_name: newV,
});
if (ret.code === 200) {
this.form.location = ret.data.location;
}
} else {
this.form.location = "";
}
},
},
watch: {
show(newV) {
......@@ -505,16 +516,9 @@ export default Vue.extend({
if (newV[3].value !== undefined) {
this.outletName =
newV[3].options.find((i) => i.ID === newV[3].value)?.Name || "";
this.handleOutLetName(this.outletName);
} else {
this.form.location = "";
}
},
async outletName(newV, oldV) {
const ret = await AddressService.getInstance().getOutlet({
outlet_name: newV,
});
if (ret.code === 200) {
this.form.location = ret.data.location;
this.outletName = "";
}
},
},
......
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