|
@@ -517,6 +517,34 @@ const handleUpdate = async (row?: StoreVO) => {
|
|
|
addressCascaderValue.value = res.data.areaCode.split(',');
|
|
addressCascaderValue.value = res.data.areaCode.split(',');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (res.data.site) {
|
|
|
|
|
+ const siteData = areaStationList.value.find((item: any) => String(item.id) === String(res.data.site));
|
|
|
|
|
+ if (siteData) {
|
|
|
|
|
+ const regionId = siteData.parentId;
|
|
|
|
|
+ form.value.regionId = regionId;
|
|
|
|
|
+
|
|
|
|
|
+ const path: any[] = [];
|
|
|
|
|
+ let currentId = regionId;
|
|
|
|
|
+ while (currentId && String(currentId) !== '0') {
|
|
|
|
|
+ path.unshift(currentId);
|
|
|
|
|
+ const currentArea = areaStationList.value.find((item: any) => String(item.id) === String(currentId));
|
|
|
|
|
+ if (currentArea) {
|
|
|
|
|
+ currentId = currentArea.parentId;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ regionValue.value = path;
|
|
|
|
|
+
|
|
|
|
|
+ siteOptions.value = areaStationList.value
|
|
|
|
|
+ .filter((item: any) => item.type === 2 && String(item.parentId) === String(regionId))
|
|
|
|
|
+ .map((item: any) => ({
|
|
|
|
|
+ value: item.id,
|
|
|
|
|
+ label: item.name
|
|
|
|
|
+ }));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
dialog.visible = true;
|
|
dialog.visible = true;
|
|
|
dialog.title = "修改门店管理";
|
|
dialog.title = "修改门店管理";
|