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 | 90 +++++++++++++++++++++++++++------------------
1 files changed, 54 insertions(+), 36 deletions(-)
diff --git a/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue b/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue
index e5a3f73..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();
@@ -101,8 +102,8 @@
prop: 'jcxx',
column:{
consignorCode: {
- label: '鏀跺彂璐т汉缂栫爜',minWidth: 150,
- addDisplay: true,
+ label: '瑁呭嵏璐х偣缂栫爜',minWidth: 150,
+ addDisplay: false, disabled: true,
editDisplay: true,
viewDisplay: true,
hide: false,
@@ -110,12 +111,12 @@
rules: [
{
required: true,
- message: "鏀跺彂璐т汉缂栫爜涓嶈兘涓虹┖", trigger: "blur"
+ message: "瑁呭嵏璐х偣缂栫爜涓嶈兘涓虹┖", trigger: "blur"
}
],
},
consignorName: {
- label: '鏀跺彂璐т汉鍚嶇О',minWidth: 150,
+ label: '瑁呭嵏璐х偣鍚嶇О',minWidth: 150,
addDisplay: true,
editDisplay: true,
viewDisplay: true,
@@ -124,7 +125,7 @@
rules: [
{
required: true,
- message: "鏀跺彂璐т汉鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ message: "瑁呭嵏璐х偣鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
}
],
},
@@ -147,7 +148,7 @@
message: "鎵�灞炲鎴蜂笉鑳戒负绌�", trigger: "change"
}
],
- type: 'table',
+ type: 'table',dataType: 'string',
children:{
border: true,
searchMenuSpan: 5,
@@ -228,7 +229,7 @@
],
},
consignorType: {
- label: '鏀跺彂璐т汉绫诲瀷',minWidth: 150,
+ label: '瑁呭嵏璐х偣绫诲瀷',minWidth: 150,
type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type',
addDisplay: true,
editDisplay: true,
@@ -238,7 +239,7 @@
rules: [
{
required: true,
- message: "鏀跺彂璐т汉绫诲瀷涓嶈兘涓虹┖", trigger: "change"
+ message: "瑁呭嵏璐х偣绫诲瀷涓嶈兘涓虹┖", trigger: "change"
}
],
},
@@ -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: '璋冨害鍗曡繍杈撳湴',
@@ -497,13 +515,13 @@
column: {
consignorCode: {
- label: '鏀跺彂璐т汉缂栫爜',minWidth: 150,
+ label: '瑁呭嵏璐х偣缂栫爜',minWidth: 150,
display: false,
hide: false,
search: true,
},
consignorName: {
- label: '鏀跺彂璐т汉鍚嶇О',minWidth: 150,
+ label: '瑁呭嵏璐х偣鍚嶇О',minWidth: 150,
display: false,
hide: false,
search: true,
@@ -522,7 +540,7 @@
disabled: true,
},
consignorType: {
- label: '鏀跺彂璐т汉绫诲瀷',minWidth: 150,
+ label: '瑁呭嵏璐х偣绫诲瀷',minWidth: 150,
type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type',
display: false,
hide: false,
@@ -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