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/tmsDispatchOrder/index.vue | 353 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 329 insertions(+), 24 deletions(-)
diff --git a/ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue b/ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue
index 24c338f..1d36593 100644
--- a/ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue
@@ -69,6 +69,22 @@
>鎺ユ寕
</el-button>
+ <el-button
+ type="warning"
+ icon="Avatar"
+ :disabled="!( isCustoms == 0)"
+ @click="handleCustoms"
+ v-hasPermi="['tms:tmsDispatchOrder:customs']"
+ >濮旀墭鎶ュ叧淇℃伅
+ </el-button>
+ <el-button
+ type="primary"
+ icon="UserFilled"
+ :disabled="!( isLoad == 0)"
+ @click="handleLoading"
+ v-hasPermi="['tms:tmsDispatchOrder:loading']"
+ >濮旀墭鍗歌揣淇℃伅
+ </el-button>
</template>
<template #menu-before="{row}">
<el-link size="small" type="primary" @click="handleAddGoods(row)" class="link-btn"
@@ -110,26 +126,26 @@
</el-link>
</template>
- <template #shipperId-form>
+ <template #shipperId-form="{disabled}">
<div style="display:flex; align-items: center;justify-content: space-between">
<avue-input-table :props="consignorProps"
- :children="consignorOption"
+ :children="consignorOption" :disabled="disabled"
:on-load="onShipperLoad" suffixIcon="search"
v-model="form.shipperId" style="width: 80%"
@change="changeShipper"
placeholder="璇烽�夋嫨瑁呰揣鐐�"></avue-input-table>
- <el-button icon="plus" @click="handleAddShipper"></el-button>
+ <el-button icon="plus" :disabled="disabled" @click="handleAddShipper"></el-button>
</div>
</template>
- <template #receiverId-form>
+ <template #receiverId-form="{disabled}">
<div style="display:flex; align-items: center;justify-content: space-between">
<avue-input-table :props="consignorProps"
:children="consignorOption"
:on-load="onConsignorLoad" suffixIcon="search"
- v-model="form.receiverId"
+ v-model="form.receiverId" :disabled="disabled"
@change="changeReceiver" style="width: 80%"
placeholder="璇烽�夋嫨鍗歌揣鐐�"></avue-input-table>
- <el-button icon="plus" @click="handleAddReceiver"></el-button>
+ <el-button icon="plus" :disabled="disabled" @click="handleAddReceiver"></el-button>
</div>
</template>
@@ -201,6 +217,36 @@
</avue-form>
</div>
+
+ <div v-if="optionType == 'customs'">
+ <el-descriptions style="margin-bottom: 20px"
+ :column="2"
+ border
+ >
+ <el-descriptions-item label="璋冨害鍗曞彿">{{ form.dispatchNo }}</el-descriptions-item>
+ <el-descriptions-item label="瀹㈡埛">{{ form.customerName }}</el-descriptions-item>
+ <el-descriptions-item label="椤圭洰鍚嶇О">{{ form.projectName }}</el-descriptions-item>
+ <el-descriptions-item label="杩愯緭璺嚎">{{ form.transportLine }}</el-descriptions-item>
+ </el-descriptions>
+ <avue-form v-model="form" ref="boxFormRef" :option="boxFormOption">
+
+ </avue-form>
+ </div>
+
+ <div v-if="optionType == 'loading'">
+ <el-descriptions style="margin-bottom: 20px"
+ :column="2"
+ border
+ >
+ <el-descriptions-item label="璋冨害鍗曞彿">{{ form.dispatchNo }}</el-descriptions-item>
+ <el-descriptions-item label="瀹㈡埛">{{ form.customerName }}</el-descriptions-item>
+ <el-descriptions-item label="椤圭洰鍚嶇О">{{ form.projectName }}</el-descriptions-item>
+ <el-descriptions-item label="杩愯緭璺嚎">{{ form.transportLine }}</el-descriptions-item>
+ </el-descriptions>
+ <avue-form v-model="form" ref="boxFormRef" :option="boxFormOption">
+
+ </avue-form>
+ </div>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" :loading="pageF.isUploading" @click="submitForm2">
@@ -261,7 +307,7 @@
getTmsDispatchOrder,
listTmsDispatchOrder,
updateTmsDispatchOrder,
- confirmOrder, copyOrder, okOrder, initGenerate, generateTmsDispatchOrder, dropHook, connectHang
+ confirmOrder, copyOrder, okOrder, initGenerate, generateTmsDispatchOrder, dropHook, connectHang,customsOrder,loadingOrder,
} from "@/api/tms/tmsDispatchOrder";
import useCurrentInstance from "@/utils/useCurrentInstance";
import {computed, onMounted, reactive, ref, toRefs, watch, getCurrentInstance} from "vue";
@@ -333,12 +379,14 @@
goodsForm: <any>{},
open3: false,
actualForm: <any>{},
+ isCustoms:<any> -1,
+ isLoad: -1,
})
const {
queryParams, form, page, selectionList, open3,
boxTableData, optionType,
boxFormOption, boxForm, boxTableOption, title, open, open2,
- goodsTableData, goodsForm, actualForm, selectionList2
+ goodsTableData, goodsForm, actualForm, selectionList2,isCustoms,isLoad
} = toRefs(data);
const option = ref({
pageKey: 'TmsDispatchOrder',
@@ -362,13 +410,15 @@
message: "璇烽�夋嫨杩愯緭璺嚎", trigger: "change"
}
],
- type: 'table', suffixIcon: 'search',
+ type: 'table', suffixIcon: 'search',dataType: 'string',
change: (val: any) => {
+ console.log(val)
const table = crudRef.value?.getPropRef?.('quoteDetailId')?.$refs?.temp;
if (!table) return;
let active = table.active;
if (Array.isArray(active)) active = active[0];
if (active) {
+ console.log(active)
Object.assign(form.value, {
quoteDetailId: active.quoteDetailId,
transportLine: active.transportRoute,
@@ -657,8 +707,19 @@
}
],
},
+ isLoad: {
+ label: '濮旀墭瑁呭嵏',
+ display: true,
+ type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string',
+ rules: [
+ {
+ required: true,
+ message: "濮旀墭瑁呭嵏涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
isUrgent: {
- label: '鏄惁绱ф��',
+ label: '鏄惁绱ф��',value: '1',
display: true,
type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string',
rules: [
@@ -724,12 +785,29 @@
console.log(value)
option.value.group.forEach((item: any) => {
if (item.prop == 'pcxx') {
- item.column.vehicleProviderId.rules.forEach((cItem: any) => {
- cItem.required = value == 1;
- });
+ item.column.commissionModel.display = value != 1;
+ item.column.containerId.display = value != 1;
+ item.column.shelfId.display = value != 1;
+ item.column.vehicleProviderId.display = value == 1;
+ item.column.containerNo.display = value == 1;
+ item.column.shelfCode.display = value == 1;
+ // item.column.vehicleProviderId.rules.forEach((cItem: any) => {
+ // cItem.required = value == 1;
+ // });
}
})
+
},
+ },
+ commissionModel:{
+ label: '鎻愭垚妯″紡',
+ display: true, type: 'radio', dicUrl: '/system/dict/data/type/commission_model', dataType: 'string',
+ rules: [
+ {
+ required: true,
+ message: "鎻愭垚妯″紡涓嶈兘涓虹┖", trigger: "change"
+ }
+ ],
},
vehicleProviderId: {
label: '杞﹁締鏈嶅姟鍟�',
@@ -752,7 +830,7 @@
});
}
},
- type: 'table', suffixIcon: 'search',
+ type: 'table', suffixIcon: 'search',dataType: 'string',
children: {
border: true,
searchLabelWidth: 100,
@@ -876,7 +954,7 @@
listTmsDriver({
pageSize: page.pageSize,
pageNum: page.currentPage, ...data,
- carrierType: form.value.operationMode
+ carrierType: form.value.operationMode,vehicleProviderId:form.value.vehicleProviderId
}).then(res => {
return callback({
total: res.total,
@@ -941,7 +1019,7 @@
} else {
listTmsDriver({
pageSize: page.pageSize,
- pageNum: page.currentPage, ...data,
+ pageNum: page.currentPage, ...data,vehicleProviderId:form.value.vehicleProviderId,
carrierType: form.value.operationMode
}).then(res => {
return callback({
@@ -972,6 +1050,7 @@
Object.assign(form.value, {
vehicleId: active.id,
licensePlate: active.licensePlate,
+ actualVehicleType: active.vehicleType,
});
}
},
@@ -987,6 +1066,8 @@
},
vehicleType: {
label: '杞﹁締绫诲瀷', minWidth: 120,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type',
+
search: true,
},
internalCode: {
@@ -1025,7 +1106,7 @@
listTmsVehicle({
pageSize: page.pageSize,
pageNum: page.currentPage, ...data,
- carrierType: form.value.operationMode
+ carrierType: form.value.operationMode,serviceProviderId:form.value.vehicleProviderId
}).then(res => {
return callback({
total: res.total,
@@ -1088,6 +1169,10 @@
label: '鍗歌揣鐐硅仈绯绘柟寮�',
display: true, disabled: true
},
+ containerNo: {
+ label: '闆嗚绠卞彿',
+ display: false,
+ },
containerId: {
label: '鍏宠仈闆嗚绠变俊鎭�',
display: true,
@@ -1103,7 +1188,7 @@
});
}
},
- type: 'table', suffixIcon: 'search',
+ type: 'table', suffixIcon: 'search',dataType: 'string',
children: {
border: true,
searchLabelWidth: 100,
@@ -1116,6 +1201,11 @@
containerUseType: {
label: '闆嗚绠辩敤閫旂被鍨�', minWidth: 120,
type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/container_use_type',
+ search: true,
+ },
+ selfLeasType: {
+ label: '鑷绫诲瀷', minWidth: 120,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/self_leas_type',
search: true,
},
containerSize: {
@@ -1153,6 +1243,10 @@
}
},
+ shelfCode: {
+ label: '鎵樻澘鍙�',
+ display: false,
+ },
shelfId: {
label: '鎵樻澘鍙�',
display: true,
@@ -1168,7 +1262,7 @@
});
}
},
- type: 'table', suffixIcon: 'search',
+ type: 'table', suffixIcon: 'search',dataType: 'string',
children: {
border: true,
searchLabelWidth: 100,
@@ -1179,7 +1273,13 @@
search: true,
},
shelfType: {
+ label: '鎵樻灦绫诲瀷', minWidth: 120,
type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/shelf_type',
+ search: true,
+ },
+ selfLeasType: {
+ label: '鑷绫诲瀷', minWidth: 120,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/self_leas_type',
search: true,
},
compatibleContainerType: {
@@ -1858,6 +1958,165 @@
}
})
+
+const customsOption = ref({
+ menuBtn: false,
+ labelWidth: 120,
+ column: {
+ customsServiceProviderId: {
+ label: '鎶ュ叧鏈嶅姟鍟�', span:24,
+ display: true,
+ rules: [
+ {
+ required: true,
+ message: "鎶ュ叧鏈嶅姟鍟嗕笉鑳戒负绌�", trigger: "change"
+ }
+ ],
+ type: 'table', suffixIcon: 'search', dataType: 'string',
+ change: (val: any) => {
+ const table = boxFormRef.value?.getPropRef?.('customsServiceProviderId')?.$refs?.temp;
+ if (!table) return;
+ let active = table.active;
+ if (Array.isArray(active)) active = active[0];
+ if (active) {
+ Object.assign(form.value, {
+ customsServiceProviderId: active.id,
+ customsServiceProviderName: active.serviceShortName,
+ });
+ }
+ },
+ children: {
+ border: true,
+ searchLabelWidth: 100,
+ searchMenuSpan: 5,
+ column:{
+ serviceCode: {
+ label: '鏈嶅姟鍟嗙紪鐮�',
+ search: true,
+ },
+ serviceShortName: {
+ label: '鏈嶅姟鍟嗙畝绉�',minWidth:150,
+ search: true,
+ },
+ serviceName: {
+ label: '鏈嶅姟鍟嗗叏绉�',search: true,
+ },
+ serviceType: {
+ label: '鏈嶅姟绫诲瀷',minWidth:150,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type',
+ multiple:true,
+ search: true,
+ },
+ }
+ },
+ 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]
+ }
+ getTmsCustomsServiceProvider(id).then(res => {
+ return callback(res.data || {})
+ })
+ } else {
+ listTmsCustomsServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
+ return callback({
+ total: res.total,
+ data: res.rows || [],
+ })
+ })
+ }
+
+ }
+ },
+ }
+})
+
+
+const loadingOption = ref({
+ menuBtn: false,
+ labelWidth: 120,
+ column: {
+ loadingServiceProviderId: {
+ label: '瑁呭嵏鏈嶅姟鍟�',span:24,
+ display: true,
+ rules: [
+ {
+ required: true,
+ message: "瑁呭嵏鏈嶅姟鍟嗕笉鑳戒负绌�", trigger: "change"
+ }
+ ],
+ type: 'table', suffixIcon: 'search', dataType: 'string',
+ change: (val: any) => {
+ const table = boxFormRef.value?.getPropRef?.('loadingServiceProviderId')?.$refs?.temp;
+ if (!table) return;
+ let active = table.active;
+ if (Array.isArray(active)) active = active[0];
+ if (active) {
+ Object.assign(form.value, {
+ loadingServiceProviderId: active.id,
+ loadingServiceProviderName: active.serviceShortName,
+ });
+ }
+ },
+ children: {
+ border: true,
+ searchLabelWidth: 100,
+ searchMenuSpan: 5,
+ column:{
+ serviceCode: {
+ label: '鏈嶅姟鍟嗙紪鐮�',
+ search: true,
+ },
+ serviceShortName: {
+ label: '鏈嶅姟鍟嗙畝绉�',minWidth:150,
+ search: true,
+ },
+ serviceName: {
+ label: '鏈嶅姟鍟嗗叏绉�',search: true,
+ },
+ serviceType: {
+ label: '鏈嶅姟绫诲瀷',minWidth:150,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type',
+ multiple:true,
+ search: true,
+ },
+ }
+ },
+ 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]
+ }
+ getTmsLoadingServiceProvider(id).then(res => {
+ return callback(res.data || {})
+ })
+ } else {
+ listTmsLoadingServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
+ return callback({
+ total: res.total,
+ data: res.rows || [],
+ })
+ })
+ }
+
+ }
+ },
+ }
+})
+
+
+
+
const goodsTableOption = ref({
pageKey: 'TmsGoodsDetail',
rowKey: 'id',
@@ -2183,13 +2442,24 @@
},
handleSelectionChangeFunc: (selection: any) => {
selectionList.value = selection;
+ if (selection.length > 0){
+ isCustoms.value = selection[0].isCustoms;
+ isLoad.value = selection[0].isLoad ;
+ }else{
+ isCustoms.value = -1;
+ isLoad.value = -1;
+ }
+ isCustoms.value = isCustoms.value == 0 && !pageF.single ? 0 : -1;
+ isLoad.value = isLoad.value == 0 && !pageF.single ? 0 : -1;
+ console.log(pageF.single)
},
getBeginListFunc: () => {
queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.createTimeRange, 'createTime') || {};
queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.updateTimeRange, 'updateTime') || {};
queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.confirmTimeRange, 'confirmTime') || {};
queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.okTimeRange, 'okTime') || {};
- }
+ },
+
})
const handleConfirm = (row: any) => {
ElMessageBox.confirm("鏄惁瀵硅皟搴﹀崟鍙�" + row.dispatchNo + "纭畾 锛�", '绯荤粺鎻愮ず', {
@@ -2415,7 +2685,29 @@
}).finally(() => {
pageF.isUploading = false;
})
- } else {
+ }else if (optionType.value === 'customs') {
+ customsOrder({id:form.value.id}).then(res => {
+ ElMessage({
+ message: "鎻愪氦鎴愬姛锛�",
+ type: 'success'
+ })
+ cancelBox2();
+ onLoad(page.value);
+ }).finally(() => {
+ pageF.isUploading = false;
+ })
+ }else if (optionType.value === 'loading') {
+ loadingOrder({id:form.value.id}).then(res => {
+ ElMessage({
+ message: "鎻愪氦鎴愬姛锛�",
+ type: 'success'
+ })
+ cancelBox2();
+ onLoad(page.value);
+ }).finally(() => {
+ pageF.isUploading = false;
+ })
+ }else {
connectHang({
dispatchId: form.value.id,
vehicleId: form.value.vehicleId,
@@ -2532,7 +2824,7 @@
if (districtId) data.districtId = districtId;
if (streetId) data.streetId = streetId;
}
- listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
+ listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data,customerId: form.value.customerId}).then(res => {
return callback({
total: res.total,
data: res.rows || [],
@@ -2559,7 +2851,7 @@
if (districtId) data.districtId = districtId;
if (streetId) data.streetId = streetId;
}
- listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
+ listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data,customerId: form.value.customerId}).then(res => {
return callback({
total: res.total,
data: res.rows || [],
@@ -3034,5 +3326,18 @@
})
}
-
+const handleCustoms = () => {
+ title.value = '琛ュ厖濮旀墭鎶ュ叧淇℃伅';
+ open.value = true;
+ form.value = selectionList.value[0];
+ optionType.value = 'customs';
+ boxFormOption.value = customsOption.value;
+}
+const handleLoading = () => {
+ title.value = '琛ュ厖濮旀墭瑁呭嵏淇℃伅';
+ open.value = true;
+ form.value = selectionList.value[0];
+ optionType.value = 'loading';
+ boxFormOption.value = loadingOption.value;
+}
</script>
\ No newline at end of file
--
Gitblit v1.8.0