From 011f2ef91351719dca12d36abef4d498b2eb86b8 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期一, 12 一月 2026 16:03:35 +0800
Subject: [PATCH] 修改发票新增

---
 ui/admin-ui3/src/views/tms/tmsVehicle/index.vue |  232 +++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 158 insertions(+), 74 deletions(-)

diff --git a/ui/admin-ui3/src/views/tms/tmsVehicle/index.vue b/ui/admin-ui3/src/views/tms/tmsVehicle/index.vue
index c5fab1b..ddb2605 100644
--- a/ui/admin-ui3/src/views/tms/tmsVehicle/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsVehicle/index.vue
@@ -66,6 +66,7 @@
 import {hasPermission} from "@/utils/permissionUtils";
 import {getTmsCustomerInfo, listTmsCustomerInfo} from "@/api/tms/tmsCustomerInfo";
 import {getTmsServiceProvider, listTmsServiceProvider} from "@/api/tms/tmsServiceProvider";
+import {getTmsSettlementEntity, listTmsSettlementEntity} from "@/api/tms/tmsSettlementEntity";
 
 const {proxy} = useCurrentInstance();
 const crudRef = ref();
@@ -112,10 +113,10 @@
             }
           ],
         },
-        carrierType:{
+        carrierType: {
           label: '杞﹁締鏈嶅姟鍟嗙被鍨�',
           display: true,
-          type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/carrier_type',value: '0',
+          type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/carrier_type', value: '0',
           rules: [
             {
               required: true,
@@ -123,13 +124,96 @@
             }
           ],
           change: ({value}: any) => {
-           option.value.group.forEach((item:any) =>{
-             if (item.prop == 'jbxx'){
-               item.column.serviceProviderId.display = value == 1
-             }
-           })
+            option.value.group.forEach((item: any) => {
+              if (item.prop == 'jbxx') {
+                item.column.serviceProviderId.display = value == 1
+                item.column.settlementId.display = value != 1
+              }
+            })
             console.log(value)
           }
+        },
+        settlementId: {
+          label: '鎵�灞炶繍钀ヤ富浣�',
+          minWidth: 150,
+          display: true,
+          hide: false,
+          search: true,
+          rules: [
+            {
+              required: true,
+              message: "鎵�灞炶繍钀ヤ富浣撲笉鑳戒负绌�", trigger: "change"
+            }
+          ],
+          type: 'table', suffixIcon: 'search',dataType: 'string',
+          children: {
+            border: true,
+            searchLabelWidth: 100,
+            searchMenuSpan: 5,
+            column: {
+              customerCode: {
+                label: '杩愯惀涓讳綋缂栧彿', minWidth: 130,
+                search: true,
+              },
+              customerShortName: {
+                label: '杩愯惀涓讳綋绠�绉�', minWidth: 120,
+                search: true,
+              },
+              customerFullName: {
+                label: '杩愯惀涓讳綋鍏ㄧО', minWidth: 120,
+                search: true,
+              },
+              contactName: {
+                label: '鑱旂郴浜哄鍚�',
+                display: false,
+                hide: false, minWidth: 150,
+                search: true,
+              },
+              operatingStatus: {
+                label: '缁忚惀鐘舵��',
+                type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/business_status',
+                display: false,
+                hide: false, minWidth: 150,
+                search: true,
+              },
+            },
+
+          },
+          props: {
+            label: 'customerFullName',
+            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]
+              }
+              getTmsSettlementEntity(id).then(res => {
+                return callback(res.data || {})
+              })
+            } else {
+              listTmsSettlementEntity({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?.('settlementId')?.$refs?.temp;
+            if (!table) return;
+            let active = table.active;
+            if (Array.isArray(active)) active = active[0];
+            if (active) {
+              Object.assign(form.value, {
+                settlementId: active.id,
+                settlementName: active.customerFullName,
+              });
+            }
+          },
         },
         serviceProviderId: {
           label: '杞﹁締鏈嶅姟鍟�',
@@ -143,7 +227,7 @@
               message: "杞﹁締鏈嶅姟鍟嗕笉鑳戒负绌�", trigger: "change"
             }
           ],
-          type: 'table', suffixIcon: 'search',
+          type: 'table', suffixIcon: 'search',dataType: 'string',
           children: {
             border: true,
             searchLabelWidth: 100,
@@ -182,38 +266,49 @@
               },
             },
 
-          },
-          props: {
-            label: 'serviceShortName',
-            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]
-              }
-              getTmsServiceProvider(id).then(res => {
-                return callback(res.data || {})
-              })
-            } else {
-              listTmsServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
-                return callback({
-                  total: res.total,
-                  data: res.rows || [],
+            },
+            props: {
+              label: 'serviceShortName',
+              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]
+                }
+                getTmsServiceProvider(id).then(res => {
+                  return callback(res.data || {})
                 })
-              })
+              } else {
+                listTmsServiceProvider({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?.('serviceProviderId')?.$refs?.temp;
+              if (!table) return;
+              let active = table.active;
+              if (Array.isArray(active)) active = active[0];
+              if (active) {
+                Object.assign(form.value, {
+                  serviceProviderId: active.id,
+                  serviceProviderName: active.serviceShortName,
+                });
+              }
             }
-
-          }
-
         },
-        vehicleType: {
-          label: '杞﹁締绫诲瀷',
-          addDisplay: true, minWidth: 150,
-          editDisplay: true,
-          viewDisplay: true,
-          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type',
+            vehicleType: {
+              label: '杞﹁締绫诲瀷',
+              addDisplay: true, minWidth: 150,
+              editDisplay: true,
+              viewDisplay: true,
+              type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type',
 
         },
         internalCode: {
@@ -270,6 +365,12 @@
           hide: true,
           search: false,
         },
+        carKeyNo: {
+          label: '杞﹁締閽ュ寵缂栧彿',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
         isBlacklist: {
           label: '鏄惁榛戝悕鍗�', value: '1', dataType: 'string',
           type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is',
@@ -315,6 +416,7 @@
             }
           ],
         },
+
       }
     },
     {
@@ -363,7 +465,7 @@
     },
     {
       label: '瀹炴椂淇℃伅',
-      prop: 'ssxx',addDisplay: false,editDisplay: false,
+      prop: 'ssxx', addDisplay: false, editDisplay: false,
       column: {
         hasTask: {
           label: '鏄惁鏈変换鍔�',
@@ -396,7 +498,7 @@
         },
       }
     },
-      {
+    {
       label: '杞﹁締璇︾粏淇℃伅',
       prop: 'clxqxx',
       column: {
@@ -434,7 +536,7 @@
         },
         emptyLoadFuel: {
           label: '绌鸿浇娌硅��',
-          addDisplay: true,append:'L/Km',
+          addDisplay: true, append: 'L/Km',
           editDisplay: true,
           viewDisplay: true, minWidth: 150,
           hide: true,
@@ -442,7 +544,7 @@
         },
         fullLoadFuel: {
           label: '閲嶈浇娌硅��',
-          addDisplay: true,append:'L/Km',
+          addDisplay: true, append: 'L/Km',
           editDisplay: true, minWidth: 150,
           viewDisplay: true,
           hide: true,
@@ -459,7 +561,7 @@
         purchasePrice: {
           label: '杞﹁締璐疆浠�', minWidth: 150,
           addDisplay: true,
-          editDisplay: true,append:'涓囧厓',
+          editDisplay: true, append: '涓囧厓',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -499,7 +601,7 @@
         actualLength: {
           label: '瀹為檯闀�',
           addDisplay: true,
-          editDisplay: true,append:'mm',
+          editDisplay: true, append: 'mm',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -507,7 +609,7 @@
         actualWidth: {
           label: '瀹為檯瀹�',
           addDisplay: true,
-          editDisplay: true,append:'mm',
+          editDisplay: true, append: 'mm',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -515,7 +617,7 @@
         actualHeight: {
           label: '瀹為檯楂�',
           addDisplay: true,
-          editDisplay: true,append:'mm',
+          editDisplay: true, append: 'mm',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -523,7 +625,7 @@
         loadVolume: {
           label: '瑁呰浇浣撶Н',
           addDisplay: true,
-          editDisplay: true,append:'m鲁',
+          editDisplay: true, append: 'm鲁',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -531,7 +633,7 @@
         loadWeight: {
           label: '瑁呰浇閲嶉噺',
           addDisplay: true,
-          editDisplay: true,append:'Kg',
+          editDisplay: true, append: 'Kg',
           viewDisplay: true,
           hide: true,
           search: false,
@@ -559,7 +661,7 @@
       prop: 'qtxx',
       column: {
         status: {
-          label: '鐘舵��',row:true,span:24,
+          label: '鐘舵��', row: true, span: 24,
           type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable',
           addDisplay: false,
           editDisplay: false, dataType: 'string',
@@ -626,7 +728,7 @@
     },
     serviceProviderName: {
       label: '杞﹁締鏈嶅姟鍟�',
-       minWidth: 150,
+      minWidth: 150,
       display: false,
       hide: false,
       search: true,
@@ -636,10 +738,11 @@
       display: false,
       hide: false,
       search: true,
+      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type',
 
     },
     internalCode: {
-      label: '杞﹁締鍐呴儴缂栫爜',minWidth: 150,
+      label: '杞﹁締鍐呴儴缂栫爜', minWidth: 150,
       display: false,
       hide: false,
       search: false,
@@ -658,16 +761,16 @@
       search: false,
     },
     licenseMo: {
-      label: '婢抽棬鐗岀収',minWidth: 150,
+      label: '婢抽棬鐗岀収', minWidth: 150,
       display: false,
       hide: false,
       search: false,
     },
     hasTask: {
       label: '鏄惁鏈変换鍔�',
-     type: 'select',
+      type: 'select',
       dataType: 'string',
-       minWidth: 150, dicUrl: '/system/dict/data/type/sys_number_is',
+      minWidth: 150, dicUrl: '/system/dict/data/type/sys_number_is',
       display: false,
       search: true,
       rules: [
@@ -694,7 +797,7 @@
       label: '鐘舵��',
       type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable',
       display: false, dataType: 'string',
-       minWidth: 150,
+      minWidth: 150,
       hide: false,
       search: true,
       rules: [
@@ -711,7 +814,7 @@
       search: false,
     },
     updateTime: {
-      label: '鏇存柊鏃堕棿',minWidth: 180,
+      label: '鏇存柊鏃堕棿', minWidth: 180,
       display: false,
       hide: false,
       search: false,
@@ -755,25 +858,6 @@
     selectionList.value = selection;
   }
 })
-onMounted(() => {
-  watch(() => form.value.serviceProviderId, () => {
 
-    if (!form.value.serviceProviderId){
-      return;
-    }
-    const table = crudRef.value?.getPropRef?.('serviceProviderId')?.$refs?.temp;
-    if (!table) return;
-
-    let active = table.active;
-    if (Array.isArray(active)) active = active[0];
-
-    if (active) {
-      Object.assign(form.value, {
-        serviceProviderId: active.id,
-        serviceProviderName: active.serviceShortName,
-      });
-    }
-  });
-});
 
 </script>

--
Gitblit v1.8.0