|
|
@ -20,8 +20,8 @@ |
|
|
</Row> |
|
|
</Row> |
|
|
<Row :gutter="32"> |
|
|
<Row :gutter="32"> |
|
|
<Col span="12"> |
|
|
<Col span="12"> |
|
|
<FormItem label="所属区域" class="form-noheight"> |
|
|
<FormItem label="所属区域" prop="shopArea" class="form-noheight"> |
|
|
<shopArea-tree-choose @on-change="handleSelectShopAreaTree" |
|
|
<shopArea-tree-choose @on-change="handleSelectShopAreaTree" :root-id="shopAreaRootId" |
|
|
ref="shopAreaTree"></shopArea-tree-choose> |
|
|
ref="shopAreaTree"></shopArea-tree-choose> |
|
|
</FormItem> |
|
|
</FormItem> |
|
|
</Col> |
|
|
</Col> |
|
|
@ -289,11 +289,13 @@ |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
|
|
|
const userInfo = JSON.parse(this.getStore("userInfo") || "{}"); |
|
|
return { |
|
|
return { |
|
|
roleList: [], |
|
|
roleList: [], |
|
|
roleList2: [], |
|
|
roleList2: [], |
|
|
shopAreaList: [], |
|
|
shopAreaList: [], |
|
|
businessDistrictLevelList: [], |
|
|
businessDistrictLevelList: [], |
|
|
|
|
|
userDepartmentId: userInfo.departmentId || "", |
|
|
visible: this.value, |
|
|
visible: this.value, |
|
|
title: "", |
|
|
title: "", |
|
|
passColor: "", |
|
|
passColor: "", |
|
|
@ -368,6 +370,11 @@ |
|
|
}, |
|
|
}, |
|
|
trigger: "change" |
|
|
trigger: "change" |
|
|
}], |
|
|
}], |
|
|
|
|
|
shopArea: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: "请选择所属区域", |
|
|
|
|
|
trigger: "change" |
|
|
|
|
|
}], |
|
|
shopDeliveryLocation: [{ |
|
|
shopDeliveryLocation: [{ |
|
|
validator: (rule, value, callback) => { |
|
|
validator: (rule, value, callback) => { |
|
|
if (this.form.supportShopDelivery == 1 && !value) { |
|
|
if (this.form.supportShopDelivery == 1 && !value) { |
|
|
@ -422,6 +429,9 @@ |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
|
|
|
shopAreaRootId() { |
|
|
|
|
|
return this.form.regionId || this.userDepartmentId || ""; |
|
|
|
|
|
}, |
|
|
boundWorkerText() { |
|
|
boundWorkerText() { |
|
|
if (!this.form.workerId) return ""; |
|
|
if (!this.form.workerId) return ""; |
|
|
return `${this.form.workerName || ""} ${this.form.workerPhone || ""}`; |
|
|
return `${this.form.workerName || ""} ${this.form.workerPhone || ""}`; |
|
|
|