From b2ca7af3db0d1e2baf37829c33a82cd43d690751 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期五, 26 十二月 2025 16:27:14 +0800
Subject: [PATCH] 新增字段
---
ui/admin-ui3/src/views/tms/tmsVehicle/index.vue | 263 +++++++++++++++++++++++++++++++++++-----------------
1 files changed, 177 insertions(+), 86 deletions(-)
diff --git a/ui/admin-ui3/src/views/tms/tmsVehicle/index.vue b/ui/admin-ui3/src/views/tms/tmsVehicle/index.vue
index 3636253..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,16 +113,112 @@
}
],
},
- carrierType:{
+ carrierType: {
label: '杞﹁締鏈嶅姟鍟嗙被鍨�',
display: true,
- type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/carrier_type',
+ type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/carrier_type', value: '0',
+ rules: [
+ {
+ required: true,
+ message: "杞﹁締鏈嶅姟鍟嗙被鍨嬩笉鑳戒负绌�", trigger: "blur"
+ }
+ ],
+ change: ({value}: any) => {
+ 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: '杞﹁締鏈嶅姟鍟�',
- addDisplay: true, minWidth: 150,
- editDisplay: true,
- viewDisplay: true,
+ minWidth: 150,
+ display: true,
hide: false,
search: true,
rules: [
@@ -130,7 +227,7 @@
message: "杞﹁締鏈嶅姟鍟嗕笉鑳戒负绌�", trigger: "change"
}
],
- type: 'table', suffixIcon: 'search',
+ type: 'table', suffixIcon: 'search',dataType: 'string',
children: {
border: true,
searchLabelWidth: 100,
@@ -169,45 +266,50 @@
},
},
- },
- 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,
- hide: false,
- search: true,
- rules: [
- {
- required: true,
- message: "杞﹁締绫诲瀷涓嶈兘涓虹┖", trigger: "change"
- }
- ],
+ vehicleType: {
+ label: '杞﹁締绫诲瀷',
+ addDisplay: true, minWidth: 150,
+ editDisplay: true,
+ viewDisplay: true,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type',
+
},
internalCode: {
label: '杞﹁締鍐呴儴缂栫爜',
@@ -263,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',
@@ -294,7 +402,7 @@
],
},
isTrailer: {
- label: '鏄惁鎸傝溅', minWidth: 150, dataType: 'string',
+ label: '鏄惁鎸傝溅', minWidth: 150, dataType: 'string',value: '1',
type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is',
addDisplay: true,
editDisplay: true,
@@ -308,6 +416,7 @@
}
],
},
+
}
},
{
@@ -321,12 +430,12 @@
viewDisplay: true,
hide: false,
search: false,
- rules: [
- {
- required: true,
- message: "涓婚┚椹跺憳涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
+ // rules: [
+ // {
+ // required: true,
+ // message: "涓婚┚椹跺憳涓嶈兘涓虹┖", trigger: "blur"
+ // }
+ // ],
},
mainDriverPhone: {
label: '涓婚┚椹跺憳鑱旂郴鏂瑰紡',
@@ -356,7 +465,7 @@
},
{
label: '瀹炴椂淇℃伅',
- prop: 'ssxx',addDisplay: false,editDisplay: false,
+ prop: 'ssxx', addDisplay: false, editDisplay: false,
column: {
hasTask: {
label: '鏄惁鏈変换鍔�',
@@ -389,7 +498,7 @@
},
}
},
- {
+ {
label: '杞﹁締璇︾粏淇℃伅',
prop: 'clxqxx',
column: {
@@ -427,7 +536,7 @@
},
emptyLoadFuel: {
label: '绌鸿浇娌硅��',
- addDisplay: true,append:'L/Km',
+ addDisplay: true, append: 'L/Km',
editDisplay: true,
viewDisplay: true, minWidth: 150,
hide: true,
@@ -435,7 +544,7 @@
},
fullLoadFuel: {
label: '閲嶈浇娌硅��',
- addDisplay: true,append:'L/Km',
+ addDisplay: true, append: 'L/Km',
editDisplay: true, minWidth: 150,
viewDisplay: true,
hide: true,
@@ -452,7 +561,7 @@
purchasePrice: {
label: '杞﹁締璐疆浠�', minWidth: 150,
addDisplay: true,
- editDisplay: true,append:'涓囧厓',
+ editDisplay: true, append: '涓囧厓',
viewDisplay: true,
hide: true,
search: false,
@@ -492,7 +601,7 @@
actualLength: {
label: '瀹為檯闀�',
addDisplay: true,
- editDisplay: true,append:'mm',
+ editDisplay: true, append: 'mm',
viewDisplay: true,
hide: true,
search: false,
@@ -500,7 +609,7 @@
actualWidth: {
label: '瀹為檯瀹�',
addDisplay: true,
- editDisplay: true,append:'mm',
+ editDisplay: true, append: 'mm',
viewDisplay: true,
hide: true,
search: false,
@@ -508,7 +617,7 @@
actualHeight: {
label: '瀹為檯楂�',
addDisplay: true,
- editDisplay: true,append:'mm',
+ editDisplay: true, append: 'mm',
viewDisplay: true,
hide: true,
search: false,
@@ -516,7 +625,7 @@
loadVolume: {
label: '瑁呰浇浣撶Н',
addDisplay: true,
- editDisplay: true,append:'m鲁',
+ editDisplay: true, append: 'm鲁',
viewDisplay: true,
hide: true,
search: false,
@@ -524,7 +633,7 @@
loadWeight: {
label: '瑁呰浇閲嶉噺',
addDisplay: true,
- editDisplay: true,append:'Kg',
+ editDisplay: true, append: 'Kg',
viewDisplay: true,
hide: true,
search: false,
@@ -552,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',
@@ -619,7 +728,7 @@
},
serviceProviderName: {
label: '杞﹁締鏈嶅姟鍟�',
- minWidth: 150,
+ minWidth: 150,
display: false,
hide: false,
search: true,
@@ -629,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,
@@ -651,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: [
@@ -687,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: [
@@ -704,7 +814,7 @@
search: false,
},
updateTime: {
- label: '鏇存柊鏃堕棿',minWidth: 180,
+ label: '鏇存柊鏃堕棿', minWidth: 180,
display: false,
hide: false,
search: false,
@@ -748,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