Huanyi 1 месяц назад
Родитель
Сommit
da61d333bd

+ 5 - 5
src/views/service/list/index.vue

@@ -89,11 +89,11 @@
             </el-radio>
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="所属品牌" prop="tenantId">
-          <PageSelect v-model="form.tenantId" :options="brandOptions" :total="brandTotal" :pageSize="10"
-            placeholder="请选择所属品牌" @page-change="handleBrandPageChange"
-            @visible-change="handleBrandSelectVisibleChange" />
-        </el-form-item>
+<!--        <el-form-item label="所属品牌" prop="tenantId">-->
+<!--          <PageSelect v-model="form.tenantId" :options="brandOptions" :total="brandTotal" :pageSize="10"-->
+<!--            placeholder="请选择所属品牌" @page-change="handleBrandPageChange"-->
+<!--            @visible-change="handleBrandSelectVisibleChange" />-->
+<!--        </el-form-item>-->
         <el-form-item label="排序权重" prop="sort">
           <el-input v-model="form.sort" placeholder="请输入排序权重" />
         </el-form-item>

+ 28 - 0
src/views/system/store/index.vue

@@ -517,6 +517,34 @@ const handleUpdate = async (row?: StoreVO) => {
       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.title = "修改门店管理";

+ 3 - 1
src/views/system/tenantCategories/index.vue

@@ -251,7 +251,9 @@ const handleUpdate = async (row?: TenantCategoriesVO) => {
   reset();
   const _id = row?.id || ids.value[0];
   const res = await getTenantCategories(_id);
-  Object.assign(form.value, res.data);
+  Object.keys(initFormData).forEach((key) => {
+    form.value[key] = res.data[key];
+  });
   dialog.visible = true;
   dialog.title = '修改商户分类';
 };

+ 1 - 1
vite.config.ts

@@ -24,7 +24,7 @@ export default defineConfig(({ mode, command }) => {
       // open: true,
       proxy: {
         [env.VITE_APP_BASE_API]: {
-          target: 'http://localhost:8080',
+          target: 'http://192.168.1.118:8080',
           changeOrigin: true,
           ws: true,
           rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')