From 6b8f073df16ed45ec9e710abe18d1f4ffde30540 Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期五, 19 十二月 2025 08:49:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cwxt_master' into cwxt_master
---
ui/admin-ui3/src/views/tms/tmsConsignor/index.vue | 819 +++++++++++++++++++++++++++++++--------------------------
1 files changed, 445 insertions(+), 374 deletions(-)
diff --git a/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue b/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue
index 6ed4a74..cec133c 100644
--- a/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsConsignor/index.vue
@@ -60,12 +60,13 @@
updateTmsConsignor
} from "@/api/tms/tmsConsignor";
import useCurrentInstance from "@/utils/useCurrentInstance";
-import {computed, reactive, ref, toRefs,watch,onMounted} from "vue";
+import {computed, reactive, ref, toRefs,watch,nextTick} from "vue";
import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
import {usePagePlus} from "@/hooks/usePagePlus";
import {hasPermission} from "@/utils/permissionUtils";
import {getTmsCustomerInfo, listTmsCustomerInfo} from "@/api/tms/tmsCustomerInfo";
-import {getArea, getCity, getProvince, getStreet} from "@/api/tms/tmsRegion";
+import {getArea, getCity, getProvince, getStreet,getAddressCode} from "@/api/tms/tmsRegion";
+import {mapRegeo} from "@/api/common";
const {proxy} = useCurrentInstance();
const crudRef = ref();
@@ -95,35 +96,435 @@
rowKey: 'id',
labelWidth: 150,
searchLabelWidth: 120,
+ group: [
+ {
+ label: '鍩虹淇℃伅',
+ prop: 'jcxx',
+ column:{
+ consignorCode: {
+ label: '瑁呭嵏璐х偣缂栫爜',minWidth: 150,
+ addDisplay: false, disabled: true,
+ editDisplay: true,
+ viewDisplay: true,
+ hide: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "瑁呭嵏璐х偣缂栫爜涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ consignorName: {
+ label: '瑁呭嵏璐х偣鍚嶇О',minWidth: 150,
+ addDisplay: true,
+ editDisplay: true,
+ viewDisplay: true,
+ hide: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "瑁呭嵏璐х偣鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ customerName:{
+ label: '鎵�灞炲鎴�',minWidth: 150,
+ display: false,
+ hide: false,
+ search: false,
+ },
+ customerId: {
+ label: '鎵�灞炲鎴�',minWidth: 150,
+ addDisplay: true,
+ editDisplay: true,suffixIcon:'search',
+ viewDisplay: true,
+ hide: true,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "鎵�灞炲鎴蜂笉鑳戒负绌�", trigger: "change"
+ }
+ ],
+ type: 'table',dataType: 'string',
+ children:{
+ border: true,
+ searchMenuSpan: 5,
+ column:{
+ customerType: {
+ label: '瀹㈡埛绫诲瀷', minWidth: 120,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
+ search: true,
+ },
+ customerShortName: {
+ label: '瀹㈡埛绠�绉�', minWidth: 130,
+ search: true,
+ },
+ customerCode: {
+ label: '瀹㈡埛缂栧彿',minWidth: 120,
+ search: true,
+ },
+ contactName: {
+ label: '鑱旂郴浜哄鍚�',minWidth: 120,
+ },
+ signCompanyName: {
+ label: '绛剧害鍏徃', minWidth: 150,
+ },
+ },
+
+ },
+ props:{
+ label: 'customerShortName',
+ value: 'id'
+ },
+ onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback:any) => {
+ if (value){
+ let id = value;
+ if (Array.isArray(value)){
+ id = value[0]
+ }
+ getTmsCustomerInfo(id).then(res=>{
+ return callback(res.data||{})
+ })
+ }else{
+ listTmsCustomerInfo({pageSize:page.pageSize,pageNum:page.currentPage,...data}).then(res=>{
+ return callback({
+ total: res.total,
+ data: res.rows||[],
+ })
+ })
+ }
+
+ },
+ change: (val: any) => {
+ const table = crudRef.value?.getPropRef?.('customerId')?.$refs?.temp;
+ if (!table) return;
+ let active = table.active;
+ if (Array.isArray(active)) active = active[0];
+ if (active) {
+ Object.assign(form.value, {
+ customerId: active.id,
+ customerSysCode: active.customerCode,
+ customerName: active.customerShortName,
+ });
+ }
+ },
+
+ },
+ customerSysCode: {
+ label: '瀹㈡埛缂栫爜',minWidth: 150,
+ addDisplay: true,
+ editDisplay: true,
+ viewDisplay: true,
+ hide: false,
+ search: true,
+ disabled: true,
+ rules: [
+ {
+ required: true,
+ message: "瀹㈡埛缂栫爜涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ consignorType: {
+ label: '瑁呭嵏璐х偣绫诲瀷',minWidth: 150,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type',
+ addDisplay: true,
+ editDisplay: true,
+ viewDisplay: true,
+ hide: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "瑁呭嵏璐х偣绫诲瀷涓嶈兘涓虹┖", trigger: "change"
+ }
+ ],
+ },
+ }
+ },
+ {
+ label: '鑱旂郴浜轰俊鎭�',
+ prop: 'lxrxx',
+ column:{
+ contactName: {
+ label: '鑱旂郴浜哄鍚�',minWidth: 150,
+ addDisplay: true,
+ editDisplay: true,
+ viewDisplay: true,
+ hide: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "鑱旂郴浜哄鍚嶄笉鑳戒负绌�", trigger: "blur"
+ }
+ ],
+ },
+ contactPhone: {
+ label: '鑱旂郴浜虹數璇�',minWidth: 150,
+ addDisplay: true,
+ editDisplay: true,
+ viewDisplay: true,
+ hide: true,
+ search: false,
+ },
+ contactEmail: {
+ label: '鑱旂郴浜洪偖绠�',minWidth: 150,
+ addDisplay: true,
+ editDisplay: true,
+ viewDisplay: true,
+ hide: true,
+ search: false,
+ },
+ }
+ },
+ {
+ label: '鍦板潃淇℃伅',
+ prop: 'dzxx',
+ column:{
+
+ mapLocationDetail: {
+ label: '鍦板浘浣嶇疆',minWidth: 150,
+ addDisplay: true,
+ editDisplay: true,span:24,
+ viewDisplay: true,
+ 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;
+ //
+ // }
+ // }
+ 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: '璋冨害鍗曡繍杈撳湴',
+ addDisplay: true,minWidth: 150,
+ editDisplay: true,
+ viewDisplay: true,
+ hide: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "璋冨害鍗曡繍杈撳湴涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ electronicFenceRange: {
+ label: '鐢靛瓙鍥存爮鑼冨洿',
+ addDisplay: true,minWidth: 150,
+ editDisplay: true,
+ viewDisplay: true,append:'绫�',
+ hide: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "鐢靛瓙鍥存爮鑼冨洿涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ // region: {
+ // label: '琛屾斂鍖哄煙',minWidth: 150,type:'cascader',
+ // addDisplay: true,
+ // editDisplay: true,checkStrictly:true,
+ // viewDisplay: true,span: 24,checkOnClickNode:true,
+ // hide: true,
+ // search: false,
+ // lazy: true,
+ // props: {
+ // label: 'name',
+ // value: 'code'
+ // },
+ // rules: [
+ // {
+ // required: true,
+ // message: "琛屾斂鍖哄煙涓嶈兘涓虹┖", trigger: "blur"
+ // }
+ // ],
+ // change:({value=[]}:{value:any})=>{
+ // if (value && value.length>0){
+ // console.log( value)
+ // form.value.provinceId = value[0];
+ // form.value.cityId = value[1];
+ // form.value.districtId = value[2];
+ // form.value.streetId = value[3];
+ // const cascader = crudRef.value?.getPropRef?.('region')?.$refs?.temp;
+ // console.log('cascader.getCheckedNodes()',cascader)
+ // nextTick(()=>{
+ // crudRef.value.getPropRef('region').$refs.temp.$forceUpdate()
+ // })
+ // if (cascader.getCheckedNodes() && cascader.getCheckedNodes().length >0){
+ // form.value.regionLabel= cascader.getCheckedNodes()[0].text!;
+ // }
+ // }
+ // },
+ // lazyLoad (node:any, resolve:any) {
+ // const stopLevel = 3;
+ // const level = node.level;
+ // const data = node.data || {};
+ // const code = data.code;
+ // let list:any = [];
+ // const callback = () => {
+ //
+ // resolve((list || []).map((ele:any) => ({
+ // ...ele,
+ // leaf: level >= stopLevel
+ // })));
+ // };
+ // console.log( level)
+ // if (level === 0) {
+ // getProvince().then(res => {
+ // list = res.data || [];
+ // callback();
+ // });
+ // } else if (level === 1) {
+ // getCity(code).then(res => {
+ // list = res.data ||[];
+ // callback();
+ // });
+ // } else if (level === 2) {
+ // getArea(code).then(res => {
+ // list = res.data || [];
+ // callback();
+ // });
+ // }else if (level === 3) {
+ // getStreet(code).then(res => {
+ // list = res.data || [];
+ // callback();
+ // });
+ // } else {
+ // callback();
+ // }
+ // }
+ // },
+ }
+ },
+ {
+ label: '鍏朵粬淇℃伅',
+ prop: 'qtyxx',
+ column:{
+ status: {
+ label: '鐘舵��',
+ type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable',dataType: 'string',
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: true,minWidth: 150,
+ hide: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "鐘舵�佷笉鑳戒负绌�", trigger: "blur"
+ }
+ ],
+ },
+ createBy: {
+ label: '鍒涘缓浜�',
+ addDisplay: false,
+ editDisplay: false,minWidth: 150,
+ viewDisplay: true,
+ hide: true,
+ search: false,
+ },
+ createTime: {
+ label: '鍒涘缓鏃堕棿',
+ addDisplay: false,
+ editDisplay: false,minWidth: 150,
+ viewDisplay: true,
+ hide: true,
+ search: false,
+ rules: [
+ {
+ required: true,
+ message: "鍒涘缓鏃堕棿涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ updateBy: {
+ label: '鏇存柊浜�',
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: true,minWidth: 150,
+ hide: false,
+ search: true,
+ },
+ updateTime: {
+ label: '鏇存柊鏃堕棿',
+ addDisplay: false,
+ editDisplay: false,minWidth: 180,
+ viewDisplay: true,
+ hide: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "鏇存柊鏃堕棿涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ remark: {
+ label: '澶囨敞',minWidth: 150,
+ type: 'textarea', minRows: 3, maxRows: 5,
+ addDisplay: true,
+ editDisplay: true,span:24,
+ viewDisplay: true,
+ hide: true,
+ search: false,
+ },
+ }
+ }
+ ],
column: {
consignorCode: {
- label: '鏀跺彂璐т汉缂栫爜',minWidth: 150,
- addDisplay: true,
- editDisplay: true,
- viewDisplay: true,
+ label: '瑁呭嵏璐х偣缂栫爜',minWidth: 150,
+ display: false,
hide: false,
search: true,
- rules: [
- {
- required: true,
- message: "鏀跺彂璐т汉缂栫爜涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
},
consignorName: {
- label: '鏀跺彂璐т汉鍚嶇О',minWidth: 150,
- addDisplay: true,
- editDisplay: true,
- viewDisplay: true,
+ label: '瑁呭嵏璐х偣鍚嶇О',minWidth: 150,
+ display: false,
hide: false,
search: true,
- rules: [
- {
- required: true,
- message: "鏀跺彂璐т汉鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
},
customerName:{
label: '鎵�灞炲鎴�',minWidth: 150,
@@ -131,364 +532,48 @@
hide: false,
search: false,
},
- customerId: {
- label: '鎵�灞炲鎴�',minWidth: 150,
- addDisplay: true,
- editDisplay: true,suffixIcon:'search',
- viewDisplay: true,
- hide: true,
- search: true,
- rules: [
- {
- required: true,
- message: "鎵�灞炲鎴蜂笉鑳戒负绌�", trigger: "change"
- }
- ],
- type: 'table',
- children:{
- border: true,
- searchMenuSpan: 5,
- column:{
- customerType: {
- label: '瀹㈡埛绫诲瀷', minWidth: 120,
- type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
- search: true,
- },
- customerShortName: {
- label: '瀹㈡埛绠�绉�', minWidth: 130,
- search: true,
- },
- customerCode: {
- label: '瀹㈡埛缂栧彿',minWidth: 120,
- search: true,
- },
- contactName: {
- label: '鑱旂郴浜哄鍚�',minWidth: 120,
- },
- signCompany: {
- label: '绛剧害鍏徃', minWidth: 150,
- },
- },
-
- },
- props:{
- label: 'customerShortName',
- value: 'id'
- },
- onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback:any) => {
- if (value){
- let id = value;
- if (Array.isArray(value)){
- id = value[0]
- }
- getTmsCustomerInfo(id).then(res=>{
- return callback(res.data||{})
- })
- }else{
- listTmsCustomerInfo({pageSize:page.pageSize,pageNum:page.currentPage,...data}).then(res=>{
- return callback({
- total: res.total,
- data: res.rows||[],
- })
- })
- }
-
- }
- },
customerSysCode: {
label: '瀹㈡埛缂栫爜',minWidth: 150,
- addDisplay: true,
- editDisplay: true,
- viewDisplay: true,
+ display: false,
hide: false,
search: true,
disabled: true,
- rules: [
- {
- required: true,
- message: "瀹㈡埛缂栫爜涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
},
consignorType: {
- label: '鏀跺彂璐т汉绫诲瀷',minWidth: 150,
+ label: '瑁呭嵏璐х偣绫诲瀷',minWidth: 150,
type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type',
- addDisplay: true,
- editDisplay: true,
- viewDisplay: true,
+ display: false,
hide: false,
search: true,
- rules: [
- {
- required: true,
- message: "鏀跺彂璐т汉绫诲瀷涓嶈兘涓虹┖", trigger: "change"
- }
- ],
},
contactName: {
label: '鑱旂郴浜哄鍚�',minWidth: 150,
- addDisplay: true,
- editDisplay: true,
- viewDisplay: true,
+ display: false,
hide: false,
search: true,
- rules: [
- {
- required: true,
- message: "鑱旂郴浜哄鍚嶄笉鑳戒负绌�", trigger: "blur"
- }
- ],
- },
- contactPhone: {
- label: '鑱旂郴浜虹數璇�',minWidth: 150,
- addDisplay: true,
- editDisplay: true,
- viewDisplay: true,
- hide: true,
- search: false,
- },
- contactEmail: {
- label: '鑱旂郴浜洪偖绠�',minWidth: 150,
- addDisplay: true,
- editDisplay: true,
- viewDisplay: true,
- hide: true,
- search: false,
- },
- // countryId: {
- // label: '鍥藉',minWidth: 150,type:'select',
- // addDisplay: true,
- // editDisplay: true,
- // viewDisplay: false,
- // hide: true,
- // search: false,
- // rules: [
- // {
- // required: true,
- // message: "鍥藉涓嶈兘涓虹┖", trigger: "blur"
- // }
- // ],
- // },
- region: {
- label: '琛屾斂鍖哄煙',minWidth: 150,type:'cascader',
- addDisplay: true,
- editDisplay: true,
- viewDisplay: true,span: 24,
- hide: true,
- search: false,
- lazy: true,
- props: {
- label: 'name',
- value: 'code'
- },
- rules: [
- {
- required: true,
- message: "鐪佷唤涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
- change:({value=[]}:{value:any})=>{
- if (value && value.length>0){
- form.value.provinceId = value[0];
- form.value.cityId = value[1];
- form.value.districtId = value[2];
- form.value.streetId = value[3];
- }
- },
- lazyLoad (node:any, resolve:any) {
- const stopLevel = 3;
- const level = node.level;
- const data = node.data || {};
- const code = data.code;
- let list:any = [];
- const callback = () => {
- resolve((list || []).map((ele:any) => ({
- ...ele,
- leaf: level >= stopLevel
- })));
- };
-
- if (level === 0) {
- getProvince().then(res => {
- list = res.data || [];
- callback();
- });
- } else if (level === 1) {
- getCity(code).then(res => {
- list = res.data ||[];
- callback();
- });
- } else if (level === 2) {
- getArea(code).then(res => {
- list = res.data || [];
- callback();
- });
- }else if (level === 3) {
- getStreet(code).then(res => {
- list = res.data || [];
- callback();
- });
- } else {
- callback();
- }
- }
- },
- // provinceId: {
- // label: '鐪佷唤',minWidth: 150,type:'select',
- // addDisplay: true,
- // editDisplay: true,
- // viewDisplay: false,
- // hide: true,
- // search: false,
- // rules: [
- // {
- // required: true,
- // message: "鐪佷唤涓嶈兘涓虹┖", trigger: "blur"
- // }
- // ],
- // },
- // cityId: {
- // label: '甯�',minWidth: 150,type:'select',
- // addDisplay: true,
- // editDisplay: true,
- // viewDisplay: false,
- // hide: true,
- // search: false,
- // rules: [
- // {
- // required: true,
- // message: "甯備笉鑳戒负绌�", trigger: "blur"
- // }
- // ],
- // },
- // districtId: {
- // label: '鍖�',minWidth: 150,type:'select',
- // addDisplay: true,
- // editDisplay: true,
- // viewDisplay: false,
- // hide: true,
- // search: false,
- // rules: [
- // {
- // required: true,
- // message: "鍖轰笉鑳戒负绌�", trigger: "blur"
- // }
- // ],
- // },
- // streetId: {
- // label: '琛楅亾',minWidth: 150,type:'select',
- // addDisplay: true,
- // editDisplay: true,
- // viewDisplay: false,
- // hide: true,
- // search: false,
- // rules: [
- // {
- // required: true,
- // message: "琛楅亾涓嶈兘涓虹┖", trigger: "blur"
- // }
- // ],
- // },
- // addressDetail: {
- // label: '璇︾粏鍦板潃',minWidth: 150,
- // type: 'textarea', minRows: 3, maxRows: 5,
- // addDisplay: true,span:24,
- // editDisplay: true,
- // viewDisplay: false,
- // hide: true,
- // search: false,
- // },
-
- mapLocationDetail: {
- label: '鍦板浘浣嶇疆',minWidth: 150,
- addDisplay: true,
- editDisplay: true,span:24,
- viewDisplay: true,
- hide: true,
- search: false,
- type: 'map',
},
dispatchTransportArea: {
- label: '璋冨害鍗曡繍杈撳湴',
- addDisplay: true,minWidth: 150,
- editDisplay: true,
- viewDisplay: true,
+ label: '璋冨害鍗曡繍杈撳湴', display: false,minWidth: 150,
hide: false,
search: true,
- rules: [
- {
- required: true,
- message: "璋冨害鍗曡繍杈撳湴涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
},
status: {
label: '鐘舵��',
type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable',dataType: 'string',
- addDisplay: false,
- editDisplay: false,
- viewDisplay: true,minWidth: 150,
+ display: false,minWidth: 150,
hide: false,
search: true,
- rules: [
- {
- required: true,
- message: "鐘舵�佷笉鑳戒负绌�", trigger: "blur"
- }
- ],
- },
- createBy: {
- label: '鍒涘缓浜�',
- addDisplay: false,
- editDisplay: false,minWidth: 150,
- viewDisplay: true,
- hide: true,
- search: false,
- },
- createTime: {
- label: '鍒涘缓鏃堕棿',
- addDisplay: false,
- editDisplay: false,minWidth: 150,
- viewDisplay: true,
- hide: true,
- search: false,
- rules: [
- {
- required: true,
- message: "鍒涘缓鏃堕棿涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
},
updateBy: {
- label: '鏇存柊浜�',
- addDisplay: false,
- editDisplay: false,
- viewDisplay: true,minWidth: 150,
+ label: '鏇存柊浜�', display: false,minWidth: 150,
hide: false,
search: true,
},
updateTime: {
label: '鏇存柊鏃堕棿',
- addDisplay: false,
- editDisplay: false,minWidth: 180,
- viewDisplay: true,
+ display: false,minWidth: 180,
hide: false,
search: true,
- rules: [
- {
- required: true,
- message: "鏇存柊鏃堕棿涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
- },
- remark: {
- label: '澶囨敞',minWidth: 150,
- type: 'textarea', minRows: 3, maxRows: 5,
- addDisplay: true,
- editDisplay: true,span:24,
- viewDisplay: true,
- hide: true,
- search: false,
},
}
})
@@ -530,22 +615,29 @@
},
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]
}
},
- handleEndOpenFunc:()=>{
- form.value.region = [form.value.provinceId, form.value.cityId,
- form.value.districtId, form.value.streetId];
- if (form.value.mapLocation && form.value.addressDetail){
- form.value.mapLocationDetail = [...form.value.mapLocation.split(','), form.value.addressDetail];
+ handleEndOpenFunc: ()=>{
+ if (form.value.mapLocation && form.value.addressDetail) {
+ form.value.mapLocationDetail = [...form.value.mapLocation.split(',').map(item=> Number(item)), form.value.addressDetail];
+ crudRef.value.getPropRef('mapLocationDetail').$refs.temp.text = form.value.mapLocationDetail;
+
}
+ // nextTick(()=>{
+ // crudRef.value.getPropRef('region').$refs.temp.$forceUpdate()
+ // })
+ console.log( )
+ // crudRef.value.getPropRef('region').$refs.temp.setCheckedKeys(form.value.region);
+
+
},
handleBeforeOpenFunc:(type:string)=>{
if (type=='add'){
@@ -553,27 +645,6 @@
}
}
})
-onMounted(() => {
- watch(() => form.value.customerId, () => {
-
- if (!form.value.customerId){
- return;
- }
- const table = crudRef.value?.getPropRef?.('customerId')?.$refs?.temp;
- if (!table) return;
-
- let active = table.active;
- if (Array.isArray(active)) active = active[0];
-
- if (active) {
- Object.assign(form.value, {
- customerId: active.id,
- customerSysCode: active.customerCode,
- customerName: active.customerShortName,
- });
- }
- });
-});
</script>
--
Gitblit v1.8.0