From 89fd2cf7202c321512c2ea699a3a220a7138ed44 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期四, 09 四月 2026 10:40:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cwxt_master' into cwxt_master

---
 ui/admin-ui3/src/views/tms/tmsConsignor/index.vue |   70 ++++++++++++++++++++++-------------
 1 files changed, 44 insertions(+), 26 deletions(-)

diff --git a/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue b/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue
index d64942b..cec133c 100644
--- a/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue
@@ -66,6 +66,7 @@
 import {hasPermission} from "@/utils/permissionUtils";
 import {getTmsCustomerInfo, listTmsCustomerInfo} from "@/api/tms/tmsCustomerInfo";
 import {getArea, getCity, getProvince, getStreet,getAddressCode} from "@/api/tms/tmsRegion";
+import {mapRegeo} from "@/api/common";
 
 const {proxy} = useCurrentInstance();
 const crudRef = ref();
@@ -147,7 +148,7 @@
               message: "鎵�灞炲鎴蜂笉鑳戒负绌�", trigger: "change"
             }
           ],
-          type: 'table',
+          type: 'table',dataType: 'string',
           children:{
             border: true,
             searchMenuSpan: 5,
@@ -293,27 +294,44 @@
           hide: true,
           search: false,
           type: 'map',
-          mapChange: async (params:any)=>{
-            if (params.info === "OK") {
-              console.log( params)
-              let { province, city, district, township } = params.regeocode.addressComponent || {};
-
-              const res = await getAddressCode({province, city, district, township});
-              const {provinceCode, cityCode, districtCode, townshipCode} = res.data || {};
-
-              form.value.regionLabel = province + " / " + city + " / " + district + " / " + township;
-
-              form.value.region = [provinceCode, cityCode, districtCode, townshipCode];
-              form.value.provinceId = provinceCode;
-              form.value.cityId = cityCode;
-              form.value.districtId = districtCode;
-              form.value.streetId = townshipCode;
-
-              form.value.dispatchTransportArea = params.regeocode.formattedAddress;
-
+          // mapChange: async (params:any)=>{
+          //   if (params.info === "OK") {
+          //     console.log( params)
+          //     let { province, city, district, township } = params.regeocode.addressComponent || {};
+          //
+          //     const res = await getAddressCode({province, city, district, township});
+          //     const {provinceCode, cityCode, districtCode, townshipCode} = res.data || {};
+          //
+          //     form.value.regionLabel = province + " / " + city + " / " + district + " / " + township;
+          //
+          //     form.value.region = [provinceCode, cityCode, districtCode, townshipCode];
+          //     form.value.provinceId = provinceCode;
+          //     form.value.cityId = cityCode;
+          //     form.value.districtId = districtCode;
+          //     form.value.streetId = townshipCode;
+          //
+          //     form.value.dispatchTransportArea = params.regeocode.formattedAddress;
+          //
+          //   }
+          // }
+          change: async ({value}:any)=>{
+            if (Array.isArray(value) && value.length === 3){
+              mapRegeo(value[1], value[0]).then(async res => {
+                let params = res.data || {};
+                if (params.info === "OK") {
+                  let {province, city, district, township} = params.regeocode.addressComponent || {};
+                  const res = await getAddressCode({province, city, district, township});
+                  const {provinceCode, cityCode, districtCode, townshipCode} = res.data || {};
+                  form.value.regionLabel = province + " / " + city + " / " + district + " / " + township;
+                  form.value.provinceId = provinceCode;
+                  form.value.cityId = cityCode;
+                  form.value.districtId = districtCode;
+                  form.value.streetId = townshipCode;
+                  form.value.dispatchTransportArea = params.regeocode.formatted_address || params.regeocode.formattedAddress;
+                }
+              });
             }
-          }
-
+          },
         },
         dispatchTransportArea: {
           label: '璋冨害鍗曡繍杈撳湴',
@@ -597,13 +615,13 @@
   },
   rowSaveBegin:(row:any)=>{
     if (row.mapLocationDetail){
-      row.mapLocation = row.mapLocationDetail[1]+','+row.mapLocationDetail[0];
+      row.mapLocation = row.mapLocationDetail[0]+','+row.mapLocationDetail[1];
       row.addressDetail = row.mapLocationDetail[2]
     }
   },
   rowUpdateBegin:(row:any)=>{
     if (row.mapLocationDetail){
-      row.mapLocation = row.mapLocationDetail[1]+','+row.mapLocationDetail[0];
+      row.mapLocation = row.mapLocationDetail[0]+','+row.mapLocationDetail[1];
       row.addressDetail = row.mapLocationDetail[2]
     }
   },
@@ -613,9 +631,9 @@
       crudRef.value.getPropRef('mapLocationDetail').$refs.temp.text = form.value.mapLocationDetail;
 
     }
-    nextTick(()=>{
-      crudRef.value.getPropRef('region').$refs.temp.$forceUpdate()
-    })
+    // nextTick(()=>{
+    //   crudRef.value.getPropRef('region').$refs.temp.$forceUpdate()
+    // })
     console.log( )
      // crudRef.value.getPropRef('region').$refs.temp.setCheckedKeys(form.value.region);
 

--
Gitblit v1.8.0