From 939ee5a461a64b40b23d2b5f51c69dead13ee7e3 Mon Sep 17 00:00:00 2001
From: zhangback <zhangback@163.com>
Date: 星期二, 30 十二月 2025 23:21:03 +0800
Subject: [PATCH] 提交
---
ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue | 874 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 800 insertions(+), 74 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..ac5cbad 100644
--- a/ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue
@@ -44,14 +44,14 @@
v-hasPermi="['tms:tmsDispatchOrder:export']"
>瀵煎嚭
</el-button>
- <el-button
- type="success"
- icon="Promotion"
- :disabled="pageF.multiple"
- @click="handleGenerate"
- v-hasPermi="['tms:tmsDispatchOrder:generate']"
- >鐢熸垚搴旀敹搴斾粯璐圭敤
- </el-button>
+<!-- <el-button-->
+<!-- type="success"-->
+<!-- icon="Promotion"-->
+<!-- :disabled="pageF.multiple"-->
+<!-- @click="handleGenerate"-->
+<!-- v-hasPermi="['tms:tmsDispatchOrder:generate']"-->
+<!-- >鐢熸垚搴旀敹搴斾粯璐圭敤-->
+<!-- </el-button>-->
<el-button
type="warning"
icon="Female"
@@ -69,19 +69,47 @@
>鎺ユ寕
</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>
+ <el-button
+ type="primary"
+ icon="UserFilled"
+ :disabled="pageF.single"
+ @click="handleZZ"
+ v-hasPermi="['tms:tmsDispatchOrder:zzdj']"
+ >澧炲�间綔涓氱櫥璁�
+ </el-button>
</template>
<template #menu-before="{row}">
<el-link size="small" type="primary" @click="handleAddGoods(row)" class="link-btn"
- v-hasPermi="['tms:tmsGoodsDetail:add']"
+ v-hasPermi="['tms:tmsGoodsDetail:add']" v-if="[0,1,2].includes(row.status)"
:underline="false" icon="el-icon-document-add">杩愯緭璐у搧鐧昏
</el-link>
<el-link size="small" type="primary" @click="handleActual(row)" class="link-btn"
- v-hasPermi="['tms:tmsDispatchOrder:update']"
+ v-hasPermi="['tms:tmsDispatchOrder:update']" v-if="[0,1,2].includes(row.status)"
:underline="false" icon="el-icon-set-up">瀹為檯杩愯緭璁板綍
</el-link>
<el-link size="small" type="primary" v-if="row.status == 0" @click="handleConfirm(row)" class="link-btn"
v-hasPermi="['tms:tmsDispatchOrder:confirmOrder']"
:underline="false" icon="el-icon-pointer">纭畾
+ </el-link>
+ <el-link size="small" type="primary" v-if="[0,1,2].includes(row.status)" @click="handleClose(row)" class="link-btn"
+ v-hasPermi="['tms:tmsDispatchOrder:closeOrder']"
+ :underline="false" icon="el-icon-close">浣滃簾
</el-link>
<el-link size="small" type="primary" @click="handleCopy(row)" class="link-btn" :underline="false"
v-hasPermi="['tms:tmsDispatchOrder:copyOrder']"
@@ -99,10 +127,10 @@
v-hasPermi="['tms:tmsDispatchOrder:okOrder']"
:underline="false" icon="el-icon-circle-check">瀹屾垚琛岀▼
</el-link>
- <el-link size="small" type="primary" v-if="[2,3].includes(row.status)" @click="handleAddFinance(row)"
- class="link-btn" v-hasPermi="['tms:tmsFinanceDetail:add']"
- :underline="false" icon="el-icon-edit-pen">璐圭敤鐧昏
- </el-link>
+<!-- <el-link size="small" type="primary" v-if="[2,3].includes(row.status)" @click="handleAddFinance(row)"-->
+<!-- class="link-btn" v-hasPermi="['tms:tmsFinanceDetail:add']"-->
+<!-- :underline="false" icon="el-icon-edit-pen">璐圭敤鐧昏-->
+<!-- </el-link>-->
</template>
<template #menu="{row}">
<el-link size="small" type="primary" @click="handleLog(row)" class="link-btn" :underline="false"
@@ -110,26 +138,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"
+ <avue-input-table :props="consignorProps" dataType="string"
+ :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"
+ :children="consignorOption" dataType="string"
: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 +229,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">
@@ -249,6 +307,85 @@
</el-dialog>
+
+ <el-dialog title="澧炲�间綔涓氱櫥璁�" v-model="open4" class="avue-dialog avue-dialog--top" width="80%">
+ <el-descriptions :column="3" 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-item label="杞﹀瀷">{{form.$actualVehicleType}}</el-descriptions-item>
+ <el-descriptions-item label="杞︾墝">{{form.licensePlate}}</el-descriptions-item>
+ </el-descriptions>
+ <avue-tabs :option="tabsOption" ref="tabsOptionRef"
+ @change="handleChange"></avue-tabs>
+
+ <avue-crud v-if="active !== 'tab4'"
+ :option="zzItemsTableOption" ref="itemsTableRef"
+ :data="zzItemsTableData"
+ >
+ <template #count="{row}">
+ <el-input-number v-model="row.count" placeholder="璁¤垂鏁伴噺"
+ :min="0"></el-input-number>
+ </template>
+ <template #remark="{row}">
+ <el-input v-model="row.remark" placeholder="澶囨敞" ></el-input>
+ </template>
+
+
+ </avue-crud>
+
+ <div v-if="active === 'tab4'">
+ <h2>瀹炴姤瀹為攢璐圭敤</h2>
+ <avue-form v-model="boxForm" ref="boxFormRef"
+ :option="boxFormOption">
+
+ </avue-form>
+ <avue-crud
+ :option="boxTableOption"
+ :data="boxTableData"
+ >
+ </avue-crud>
+ </div>
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button type="primary"
+ :loading="pageF.isUploading" @click="submitTabForm">
+ {{ pageF.isUploading ? '鎻愪氦涓�' : '纭� 瀹�' }}
+ </el-button>
+
+ <el-button @click="open4 = false">鍙� 娑�</el-button>
+ </div>
+ </template>
+ </el-dialog>
+
+ <el-dialog title="璋冨害鍗曚綔搴�" v-model="open5" class="avue-dialog avue-dialog--top" width="80%">
+ <el-descriptions :column="3" 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-item label="杞﹀瀷">{{form.$actualVehicleType}}</el-descriptions-item>
+ <el-descriptions-item label="杞︾墝">{{form.licensePlate}}</el-descriptions-item>
+ </el-descriptions>
+
+ <avue-form v-model="boxForm" ref="boxFormRef"
+ :option="boxFormOption">
+
+ </avue-form>
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button type="primary"
+ :loading="pageF.isUploading" @click="submitForm5">
+ {{ pageF.isUploading ? '鎻愪氦涓�' : '纭� 瀹�' }}
+ </el-button>
+
+ <el-button @click="open5 = false">鍙� 娑�</el-button>
+ </div>
+ </template>
+ </el-dialog>
+
+
</basicContainer>
</template>
@@ -261,10 +398,11 @@
getTmsDispatchOrder,
listTmsDispatchOrder,
updateTmsDispatchOrder,
- confirmOrder, copyOrder, okOrder, initGenerate, generateTmsDispatchOrder, dropHook, connectHang
+ confirmOrder, copyOrder, okOrder, initGenerate, generateTmsDispatchOrder, dropHook,
+ connectHang,customsOrder,loadingOrder,checkCloseOrder,closeOrder
} from "@/api/tms/tmsDispatchOrder";
import useCurrentInstance from "@/utils/useCurrentInstance";
-import {computed, onMounted, reactive, ref, toRefs, watch, getCurrentInstance} from "vue";
+import {computed, onMounted, reactive, ref, toRefs, watch, getCurrentInstance, nextTick} from "vue";
import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
import {usePagePlus} from "@/hooks/usePagePlus";
import {hasPermission} from "@/utils/permissionUtils";
@@ -279,15 +417,22 @@
import {addTmsConsignor, getTmsConsignor, listTmsConsignor} from "@/api/tms/tmsConsignor";
import {ElMessage, ElMessageBox} from "element-plus";
import {addTmsTrip, listTmsTrip} from "@/api/tms/tmsTrip";
-import {addTmsFinanceDetail, listTmsFinanceDetail, updateTmsFinanceDetail} from "@/api/tms/tmsFinanceDetail";
+import {
+ addTmsFinanceDetail,
+ listTmsFinanceDetail,
+ saveTmsFinanceDetail,
+ updateTmsFinanceDetail
+} from "@/api/tms/tmsFinanceDetail";
import {getTmsProductInfo, listTmsProductInfo} from "@/api/tms/tmsProductInfo";
import {addTmsGoodsDetail, delTmsGoodsDetail, listTmsGoodsDetail, updateTmsGoodsDetail} from "@/api/tms/tmsGoodsDetail";
import {getTransportRouteVi, listTransportRouteVi} from "@/api/tms/tmsTransportRouteVi";
import {listTmsQuoteItem} from "@/api/tms/tmsQuotePlanItem";
-import {$DialogForm} from '@smallwei/avue'
+import {$DialogForm, randomId} from '@smallwei/avue'
import {getTmsCustomerInfo, listTmsCustomerInfo} from "@/api/tms/tmsCustomerInfo";
import {getAddressCode} from "@/api/tms/tmsRegion";
import {mapRegeo} from "@/api/common";
+import {getDicts} from "@/api/system/dict/data";
+import {pushTmsQuoteFee} from "@/api/tms/tmsQuoteFee";
const {appContext} = getCurrentInstance();
@@ -333,12 +478,15 @@
goodsForm: <any>{},
open3: false,
actualForm: <any>{},
+ isCustoms:<any> -1,
+ isLoad: -1,
+ open5:false,
})
const {
queryParams, form, page, selectionList, open3,
boxTableData, optionType,
boxFormOption, boxForm, boxTableOption, title, open, open2,
- goodsTableData, goodsForm, actualForm, selectionList2
+ goodsTableData, goodsForm, actualForm, selectionList2,isCustoms,isLoad,open5
} = toRefs(data);
const option = ref({
pageKey: 'TmsDispatchOrder',
@@ -347,6 +495,7 @@
searchSpan: 6,
searchLabelWidth: 150,
menuWidth: 300,
+ height: 530,
group: [
{
label: '鍩烘湰淇℃伅',
@@ -362,7 +511,7 @@
message: "璇烽�夋嫨杩愯緭璺嚎", trigger: "change"
}
],
- type: 'table', suffixIcon: 'search',
+ type: 'table', suffixIcon: 'search',dataType: 'string',
change: (val: any) => {
const table = crudRef.value?.getPropRef?.('quoteDetailId')?.$refs?.temp;
if (!table) return;
@@ -384,6 +533,13 @@
requiredVehicleTypes: active.vehicleType,
quotePlanId: active.quotePlanId,
});
+ form.value.shipperId = undefined;
+ form.value.shipperRegionLabel = undefined;
+ form.value.shipperAddress = undefined;
+ form.value.shipperMobile = undefined;
+ form.value.receiverId = undefined;
+ form.value.receiverAddress = undefined;
+ form.value.receiverMobile = undefined;
}
},
children: {
@@ -657,8 +813,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: [
@@ -677,6 +844,13 @@
// label: '閰嶈浇鏂瑰紡',
// display: true, type: 'select', dicUrl: '/system/dict/data/type/load_method', dataType: 'string',
// },
+ orderTime: {
+ label: '涓嬪崟鏃堕棿',
+ type: 'datetime', // 鏀逛负 datetime 绫诲瀷
+ format: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ display: true,
+ },
latestDeparture: {
label: '瑕佹眰鏈�鏅氬嚭鍙戞椂闂�',
type: 'datetime', // 鏀逛负 datetime 绫诲瀷
@@ -724,12 +898,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 +943,7 @@
});
}
},
- type: 'table', suffixIcon: 'search',
+ type: 'table', suffixIcon: 'search',dataType: 'string',
children: {
border: true,
searchLabelWidth: 100,
@@ -876,7 +1067,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 +1132,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 +1163,7 @@
Object.assign(form.value, {
vehicleId: active.id,
licensePlate: active.licensePlate,
+ actualVehicleType: active.vehicleType,
});
}
},
@@ -987,6 +1179,8 @@
},
vehicleType: {
label: '杞﹁締绫诲瀷', minWidth: 120,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type',
+
search: true,
},
internalCode: {
@@ -1025,7 +1219,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 +1282,10 @@
label: '鍗歌揣鐐硅仈绯绘柟寮�',
display: true, disabled: true
},
+ containerNo: {
+ label: '闆嗚绠卞彿',
+ display: false,
+ },
containerId: {
label: '鍏宠仈闆嗚绠变俊鎭�',
display: true,
@@ -1103,7 +1301,7 @@
});
}
},
- type: 'table', suffixIcon: 'search',
+ type: 'table', suffixIcon: 'search',dataType: 'string',
children: {
border: true,
searchLabelWidth: 100,
@@ -1116,6 +1314,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 +1356,10 @@
}
},
+ shelfCode: {
+ label: '鎵樻澘鍙�',
+ display: false,
+ },
shelfId: {
label: '鎵樻澘鍙�',
display: true,
@@ -1168,7 +1375,7 @@
});
}
},
- type: 'table', suffixIcon: 'search',
+ type: 'table', suffixIcon: 'search',dataType: 'string',
children: {
border: true,
searchLabelWidth: 100,
@@ -1179,7 +1386,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: {
@@ -1323,13 +1536,13 @@
type: 'select', dataType: 'string',
dicUrl: '/system/dict/data/type/order_type',
},
- signType: {
- label: '璁㈠崟绫诲瀷',
- display: false,
- search: true, minWidth: 120,
- type: 'select', dataType: 'string',
- dicUrl: '/system/dict/data/type/order_type',
- },
+ // signType: {
+ // label: '璁㈠崟绫诲瀷',
+ // display: false,
+ // search: true, minWidth: 120,
+ // type: 'select', dataType: 'string',
+ // dicUrl: '/system/dict/data/type/order_type',
+ // },
transportLine: {
label: '杩愯緭绾胯矾',
@@ -1355,7 +1568,21 @@
search: true,
},
isUrgent: {
- label: '鏄惁绱ф�ュ惁',
+ label: '鏄惁绱ф��',
+ display: false, minWidth: 100,
+ search: true,
+ type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string',
+
+ },
+ iscc: {
+ label: '鏄惁鏌ヨ溅',
+ display: false, minWidth: 100,
+ search: true,
+ type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string',
+
+ },
+ isfk: {
+ label: '鏄惁鏀剧┖',
display: false, minWidth: 100,
search: true,
type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string',
@@ -1396,29 +1623,29 @@
display: false,
search: true,
},
- accountsReceivableStatus: {
- label: '搴旀敹璐圭敤鐢熸垚鐘舵��', minWidth: 160,
- display: false,
- hide: false,
- search: true,
- type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/accounts_status',
-
- },
- accountsPayableStatus: {
- label: '搴斾粯璐圭敤鐢熸垚鐘舵��', minWidth: 160,
- display: false,
- hide: false,
- search: true,
- type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/accounts_status',
-
- },
+ // accountsReceivableStatus: {
+ // label: '搴旀敹璐圭敤鐢熸垚鐘舵��', minWidth: 160,
+ // display: false,
+ // hide: false,
+ // search: true,
+ // type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/accounts_status',
+ //
+ // },
+ // accountsPayableStatus: {
+ // label: '搴斾粯璐圭敤鐢熸垚鐘舵��', minWidth: 160,
+ // display: false,
+ // hide: false,
+ // search: true,
+ // type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/accounts_status',
+ //
+ // },
status: {
label: '鐘舵��', minWidth: 150,
type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/tms_dispatch_order_status',
display: false,
hide: false, fixed: 'right',
- search: true,
+ search: false,
rules: [
{
required: true,
@@ -1426,14 +1653,54 @@
}
],
},
+ inStatusList: {
+ label: '鐘舵��', minWidth: 150,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/tms_dispatch_order_status',
+ display: false,multiple:true,
+ hide: true,
+ search: true,
+ },
+ confirmTime: {
+ label: '纭鏃堕棿', minWidth: 180,
+ display: false,
+ hide: false,
+ search: false,
+ },
+ orderTime: {
+ label: '涓嬪崟鏃堕棿', minWidth: 180,
+ display: false,
+ hide: false,
+ search: false,
+ },
+ createBy: {
+ label: '鍒涘缓浜�', minWidth: 150,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ hide: false,
+ search: true,
+ },
+ createTime: {
+ label: '鍒涘缓鏃堕棿', minWidth: 180,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ hide: false,
+ search: false,
+ },
+ createTimeRange: {
+ label: '鍒涘缓鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
+ format: 'YYYY-MM-DD', hide: true, searchSpan: 5,
+ valueFormat: 'YYYY-MM-DD',
+ },
updateBy: {
label: '鏇存柊浜�', minWidth: 150,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: false,
- search: false,
+ search: true,
},
updateTime: {
label: '鏇存柊鏃堕棿', minWidth: 180,
@@ -1458,6 +1725,11 @@
format: 'YYYY-MM-DD', hide: true, searchSpan: 5,
valueFormat: 'YYYY-MM-DD',
},
+ orderTimeRange: {
+ label: '涓嬪崟鏃堕棿', display: false, search: true, searchRange: true, type: 'date',
+ format: 'YYYY-MM-DD', hide: true, searchSpan: 5,
+ valueFormat: 'YYYY-MM-DD',
+ },
}
})
@@ -1479,11 +1751,27 @@
tripType: {
label: '琛岀▼绫诲瀷',
display: true,
+ change: function ({value}: any) {
+ if (value == '5'){
+ itineraryOption.value.column.iscc.display = true
+ }
+ },
type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/trip_type',
rules: [
{
required: true,
message: "琛岀▼绫诲瀷涓嶈兘涓虹┖", trigger: "change"
+ }
+ ],
+ },
+ iscc: {
+ label: '鏄惁鏌ヨ溅',
+ display: false,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_number_is',
+ rules: [
+ {
+ required: true,
+ message: "鏄惁鏌ヨ溅涓嶈兘涓虹┖", trigger: "change"
}
],
},
@@ -1575,11 +1863,10 @@
display: true,
},
voucherUrl: {
- label: '琛岀▼鍑瘉',
+ label: '鍑瘉',
display: true,
span: 24, dataType: 'string',
- type: 'upload',
- action: '/common/upload2',
+ type: 'img',
},
@@ -1612,14 +1899,29 @@
}
],
},
- voucherUrl: {
- label: '琛岀▼鍑瘉',
+ currency:{
+ label: '甯佺',
display: true,
- span: 24,
+ type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_currency',
+ rules: [
+ {
+ required: true,
+ message: "甯佺涓嶈兘涓虹┖", trigger: "change"
+ }
+ ],
+
+ },
+ voucherUrl: {
+ label: '璐圭敤鍑瘉',
+ display: true,
accept: 'string', dataType: 'string',
type: 'upload',
action: '/common/upload2',
+ },
+ remark:{
+ label: '澶囨敞',
+ type: 'textarea', minRows: 3, maxRows: 5, span: 24
},
dataSource: {
label: '鏁版嵁鏉ユ簮',
@@ -1660,6 +1962,11 @@
label: '閲戦',
display: true,
},
+ currency:{
+ label: '甯佺',
+ display: true,
+ type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_currency',
+ },
feeVoucherUrl: {
label: '璐圭敤鍑瘉',
display: true,
@@ -1667,7 +1974,9 @@
accept: 'string', dataType: 'object',
type: 'upload',
action: '/common/upload2',
-
+ },
+ remark:{
+ label: '澶囨敞',
},
}
@@ -1857,6 +2166,187 @@
}
})
+
+
+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 closeOption = ref({
+ menuBtn: false,
+ labelWidth: 120,
+ column: {
+ closeWhy:{
+ label: '浣滃簾鍘熷洜',span:24,
+ type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/close_why',
+ rules: [
+ {
+ required: true,
+ message: "浣滃簾鍘熷洜涓嶈兘涓虹┖", trigger: "change"
+ }
+ ],
+ },
+ closeWhyRemark:{
+ label: '浣滃簾鍘熷洜璇存槑',
+ type: 'textarea',
+ span:24,
+ },
+ }
+})
+
+
const goodsTableOption = ref({
pageKey: 'TmsGoodsDetail',
@@ -2149,6 +2639,65 @@
const itemsCrudRef = ref()
const itemsTableData = ref<any>([])
+const tabsOption = ref({
+ column: [
+ {
+ label: '杩愯緭澧炲�间綔涓氱櫥璁�',
+ prop: 'tab1',
+ name: 'tab1',
+ value: '0',
+
+ },
+ {
+ label: '鎶ュ叧澧炲�间綔涓氱櫥璁�',
+ prop: 'tab2',
+ name: 'tab2',
+ value: '1',
+ },
+ {
+ label: '瑁呭嵏澧炲�间綔涓氱櫥璁�',
+ prop: 'tab3',
+ name: 'tab3',
+ value: '2',
+
+ },
+ {
+ label: '瀹炴姤瀹為攢璐圭敤鐧昏',
+ prop: 'tab4',
+ name: 'tab4',
+ value: '3',
+ }
+ ]
+})
+const tabsOptionRef = ref();
+const active = ref('tab1');
+const open4 = ref(false);
+const zzItemsTableOption = ref({
+ pageKey: 'zzItemsTable',
+ rowKey: 'rowKey',
+ header: false,
+ menu: false,
+ selection: false,
+ column: {
+ freeName:{
+ label: '璐圭敤鍚嶇О',
+ },
+ unit:{
+ label: '璁¢噺鍗曚綅',
+ },
+ count:{
+ label : '璁¤垂鏁伴噺'
+ },
+ remark:{
+ label: '澶囨敞'
+ }
+ }
+});
+const zzItemsTableData = ref();
+
+
+
+
const {
tableData,
pageF,
@@ -2183,13 +2732,29 @@
},
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') || {};
+ },
+ handleBeforeOpenFunc:(type:string)=>{
+ if(type == 'add'){
+ form.value = {};
+ }
}
+
})
const handleConfirm = (row: any) => {
ElMessageBox.confirm("鏄惁瀵硅皟搴﹀崟鍙�" + row.dispatchNo + "纭畾 锛�", '绯荤粺鎻愮ず', {
@@ -2415,7 +2980,35 @@
}).finally(() => {
pageF.isUploading = false;
})
- } else {
+ }else if (optionType.value === 'customs') {
+ customsOrder({id:form.value.id,
+ customsServiceProviderId: form.value.customsServiceProviderId,
+ customsServiceProviderName: form.value.customsServiceProviderName,
+ }).then(res => {
+ ElMessage({
+ message: "鎻愪氦鎴愬姛锛�",
+ type: 'success'
+ })
+ cancelBox2();
+ onLoad(page.value);
+ }).finally(() => {
+ pageF.isUploading = false;
+ })
+ }else if (optionType.value === 'loading') {
+ loadingOrder({id:form.value.id,
+ loadingServiceProviderId: form.value.loadingServiceProviderId,
+ loadingServiceProviderName: form.value.loadingServiceProviderName,
+ }).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 +3125,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 +3152,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 +3627,138 @@
})
}
+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;
+}
+const quotationItems = ref();
+const getQuotationItems = async () => {
+ let res = await getDicts("sys_quotation_items");
+ quotationItems.value = res.data || [];
+}
+getQuotationItems();
+
+const getTabData = (val:string)=>{
+ console.log(val)
+ let filter = quotationItems.value.filter((item:any)=>{
+ return item.remark == val;
+ });
+ if (filter.length > 0){
+ zzItemsTableData.value = filter.map((item:any)=>{
+ return { rowKey: randomId() ,freeName: item.dictLabel,free: item.dictValue,unit: '娆�'}
+ })
+ }else{
+ zzItemsTableData.value = []
+ }
+}
+
+const getTab4Data = ()=>{
+ listTmsFinanceDetail({
+ dispatchOrderId: form.value.id, financeType: 2,
+ pageNum: 1, pageSize: 999
+ }).then(async res => {
+ boxTableData.value = res.rows || [];
+
+ boxForm.value = {
+ dispatchOrderId: form.value.id,
+ dataSource: 0,
+ financeType: 2,
+ }
+ })
+}
+
+
+
+const submitTabForm = ()=>{
+ if (['tab1','tab2','tab3'].includes(active.value)){
+ let quoteFeeItems = zzItemsTableData.value.filter((item:any)=>{
+ return item.count && item.count > 0;
+ })
+ console.log(quoteFeeItems)
+ pushTmsQuoteFee({...form.value,quoteFeeItems:quoteFeeItems}).then(res=>{
+ ElMessage.success('淇濆瓨鎴愬姛');
+ open4.value = false;
+ })
+ }else if (active.value === 'tab4'){
+ if (Array.isArray(boxForm.value.feeVoucherUrl)) {
+ boxForm.value.feeVoucherUrl = boxForm.value.feeVoucherUrl.toString();
+ }
+ //boxForm.value.rowItems = boxTableData.value;
+ saveTmsFinanceDetail(boxForm.value).then(res => {
+ ElMessage({
+ message: "鎿嶄綔鎴愬姛锛�",
+ type: 'success'
+ })
+ boxFormRef.value?.resetFields();
+ getTab4Data();
+ })
+ }
+}
+
+
+
+const handleChange = (column:any)=>{
+ active.value = column.prop;
+ if (['tab1','tab2','tab3'].includes(column.prop)){
+ getTabData(column.value)
+ }else if (column.prop === 'tab4'){
+ getTab4Data()
+ }
+}
+
+const handleZZ = () => {
+ open4.value = true;
+ form.value = selectionList.value[0];
+ handleChange(tabsOption.value.column[0]);
+
+ boxFormOption.value = financeOption.value;
+ boxTableOption.value = financeTableOption.value;
+ nextTick(()=>{
+ tabsOptionRef.value.active = "0";
+
+ })
+}
+
+const handleClose = (row:any) => {
+
+ if (row.status == 2){
+ checkCloseOrder(row.id).then(res=>{
+ open5.value = true;
+ form.value = row;
+ boxFormOption.value = closeOption.value;
+ });
+ }else{
+ open5.value = true;
+ form.value = row;
+ boxFormOption.value = closeOption.value;
+
+ }
+}
+const submitForm5 = () =>{
+ boxFormRef.value.validate((valid: boolean,done:any) => {
+ console.log(valid)
+ if(valid){
+ boxForm.value.id = form.value.id;
+ closeOrder(boxForm.value).then(res=>{
+ ElMessage.success('鎿嶄綔鎴愬姛');
+ open5.value = false;
+ done();
+ onLoad(page.value)
+ }).catch(err=>{
+ done();
+ })
+ }
+ })
+}
</script>
\ No newline at end of file
--
Gitblit v1.8.0