From fe74974bf584787520efc9b5ce0adc2b7445173e Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Wed, 10 Jan 2024 10:03:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=95=86=E9=85=8D=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/distribution/VehicleStowage.js | 33 ++ src/option/distribution/VehicleStowage.js | 58 +++ src/router/views/index.js | 11 + .../distribution/artery/VehicleStowage.vue | 227 +++--------- .../artery/handleLoadingDestination.vue | 329 ++++++++++++++++++ .../turndelivery/deliveryDiscuss.vue | 111 +----- .../parcelList/distributionParcelList.vue | 10 +- 7 files changed, 492 insertions(+), 287 deletions(-) create mode 100644 src/views/distribution/artery/handleLoadingDestination.vue diff --git a/src/api/distribution/VehicleStowage.js b/src/api/distribution/VehicleStowage.js index d2c4512b..f0ee2aaf 100644 --- a/src/api/distribution/VehicleStowage.js +++ b/src/api/distribution/VehicleStowage.js @@ -81,3 +81,36 @@ export const postCancelCarsLoadByLoadId = data => { data, }); }; + +/** + * 判断是否有未有终点的装车数据 + */ +export const postDetermineHasNoFinalNode = data => { + return request({ + url: '/api/logpm-trunkline/carsLoad/determineHasNoFinalNode', + method: 'post', + data, + }); +}; + +/** + * 更新节点数据的最终目的仓id + */ +export const postUpdateLoadScanFinalNodeIdById = data => { + return request({ + url: '/api/logpm-trunkline/carsLoad/updateLoadScanFinalNodeIdById', + method: 'post', + data, + }); +}; + +/** + * 查询当前节点以后的节点id + */ +export const postFindNextNodeList = data => { + return request({ + url: '/api/logpm-trunkline/carsLoad/findNextNodeList ', + method: 'post', + data, + }); +}; diff --git a/src/option/distribution/VehicleStowage.js b/src/option/distribution/VehicleStowage.js index 089c6199..ef3a1d47 100644 --- a/src/option/distribution/VehicleStowage.js +++ b/src/option/distribution/VehicleStowage.js @@ -743,3 +743,61 @@ export const truckLoadingColumnList = [ sortable: false, }, ]; + +/** 对比报表 -- 仓库节点 */ +export const packageColumnList = [ + { + prop: '', + label: '复选框', + type: 0, + values: '', + width: 55, + fixed: true, + }, + { + prop: '', + label: '序号', + type: 12, + values: '', + width: 55, + fixed: true, + }, + { + prop: 'orderCode', + label: '合同号', + type: 2, + values: '', + checkarr: [], + fixed: true, + sortable: false, + head: false, + }, + { + prop: 'scanCode', + label: '包条码', + type: 2, + values: '', + checkarr: [], + fixed: true, + sortable: false, + head: false, + }, + { + prop: 'waybillNo', + label: '运单号', + type: 2, + values: '', + checkarr: [], + fixed: false, + sortable: false, + }, + { + prop: '', + label: '操作', + type: 6, + values: '', + checkarr: [], + fixed: 'right', + sortable: false, + }, +]; diff --git a/src/router/views/index.js b/src/router/views/index.js index 7eaaed35..308cb55d 100644 --- a/src/router/views/index.js +++ b/src/router/views/index.js @@ -245,6 +245,17 @@ export default [ /* webpackChunkName: "views" */ '@/views/distribution/artery/VehicleStowageDetails.vue' ), }, + { + path: 'handleLoadingDestination', + name: '配置装车目的地', + meta: { + i18n: 'data', + }, + component: () => + import( + /* webpackChunkName: "views" */ '@/views/distribution/artery/handleLoadingDestination.vue' + ), + }, ], }, // { diff --git a/src/views/distribution/artery/VehicleStowage.vue b/src/views/distribution/artery/VehicleStowage.vue index 7915ae5f..42d84a42 100644 --- a/src/views/distribution/artery/VehicleStowage.vue +++ b/src/views/distribution/artery/VehicleStowage.vue @@ -67,26 +67,24 @@
新增配载 - 打 印 - 打 印 + 装载清单 - 装载卸车清单(财务) - 发 车 - 发 车 + 取消发车 - 取消配载 - 对比报表 - 卸车报告
@@ -218,9 +216,9 @@ - + - -
- - - - - - - - - - 批量卸车 - 搜 索 - 二维码 - -
-
+ -->
- - - - - - - 仓库节点 - - - - - - 总装车数 (22) - - - - - - 已匹配配载运单 零担: 21; - -
描述:已匹配配载运单指该车次配载的运单和装车零担数据能匹配上
- - - - - - 已匹配配载运单 包件: 21; - -
描述:已匹配配载运单指该车次配载的运单和装车包条码能匹配上
- - - - - 未匹配配载运单 : 1; -
- 描述:未匹配配载运单指该车次配载的运单和装车包条码尚未匹配上,可能配载的运单和装车的货物有错误 -
- - -
- ({ /** 列表 */ columnList, detailsColumnList, - warehouseNodeColumnList, - truckLoadingColumnList, /** 列表数据 */ data: [], /** 页面loading */ @@ -914,7 +774,7 @@ const handleGoWaybill = ({ row }) => { }; /** 发车 */ -const handleStartCar = () => { +const handleStartCar = async () => { if (details.selectionList.length === 0) { return ElMessage({ message: '请选择发车数据', @@ -926,28 +786,45 @@ const handleStartCar = () => { type: 'warning', }); } - ElMessageBox.confirm('确认发车吗?', 'Warning', { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }).then(async () => { - const submitData = { - loadId: details.selectionList.map(val => val.id).join(','), - startCarType: '1', - }; - const res = await postStartCarByLoadId(submitData); - const { code } = res.data; - if (code !== 200) { - return; - } - ElMessage({ - type: 'success', - message: '发车成功', - }); + // 判断是否有未有终点的装车数据 + const res = await postDetermineHasNoFinalNode({ loadId: details.selectionList[0].id }); + + const { code, data } = res.data; + if (code !== 200) return; + // 根据data是否返值判断能否发车 + if (data) { + details.popUpShow.truckLoadingDetailVisited = true; + // $router.push({ + // path: '/distribution/artery/handleLoadingDestination', + // query: { + // loadId: details.selectionList[0].id, + // }, + // }); + } else { + ElMessageBox.confirm('确认发车吗?', '', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(async () => { + const submitData = { + loadId: details.selectionList.map(val => val.id).join(','), + startCarType: '1', + }; + + const res = await postStartCarByLoadId(submitData); + const { code } = res.data; + if (code !== 200) { + return; + } + ElMessage({ + type: 'success', + message: '发车成功', + }); - onLoad(); - }); + onLoad(); + }); + } }; /** 取消发车 */ diff --git a/src/views/distribution/artery/handleLoadingDestination.vue b/src/views/distribution/artery/handleLoadingDestination.vue new file mode 100644 index 00000000..bdbb2fe3 --- /dev/null +++ b/src/views/distribution/artery/handleLoadingDestination.vue @@ -0,0 +1,329 @@ + + + + + diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue index 4df73b58..c7222286 100644 --- a/src/views/distribution/turndelivery/deliveryDiscuss.vue +++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue @@ -519,7 +519,7 @@
-
+
搜索 @@ -2036,52 +2036,6 @@ const SearchFu = () => { } return; - if (multifunctional.value) { - document.getElementById(multifunctional.value).scrollIntoView(); - } - return; - console.log(soInpuState.value, '当前搜索状态'); - if (!multifunctional.value && !dataInfoTemp.value.length) { - soInpuState.value = false; //重置搜索状态 - ElMessage({ - showClose: true, - message: '请输入搜索内容', - type: 'warning', - }); - return; - } - if (!multifunctional.value && dataInfoTemp.value.length) { - //这里是回复初始内容 - soInpuState.value = false; //重置搜索状态 - dataInfo.value = JSON.parse(JSON.stringify(dataInfoTemp.value)); - dataInfoTemp.value = []; - } - if (soInpuState.value) { - ElMessage({ - showClose: true, - message: '请先重置数据', - type: 'warning', - }); - return; - } else { - //当前状态默认为假,如果是假可以搜索 - console.log('多功能搜索功能'); - console.log(dataInfo.value, '当前订单'); - dataInfoTemp.value = dataInfo.value; //先存储一个完整的值 - let temp = dataInfo.value.filter(item => { - return Object.values(item).some(val => { - if (typeof val === 'string') { - return val.includes(multifunctional.value); - } - return false; - }); - }); - - console.log(temp, '搜索结果'); - console.log(dataInfoTemp.value, '临时存储的值'); - dataInfo.value = temp; //如果搜索到了值才赋值 - soInpuState.value = false; //表示当前已经搜索过了 - } // console.log(dataInfo.value, '搜索结果'); }; @@ -2265,66 +2219,6 @@ const ViewEvent = val => { // 编辑信息弹窗状态 PackageFn(); return; - if (RouteId.value) { - console.log(wrapLoading.value, '当前为编辑状态'); - $_getPackageListByDeliveryIdAndOrderId({ - waybillNumber: '', //运单号 - orderPackageCode: '', //包条码 - current: 1, - size: 100, - deliveryId: RouteId.value, - id: val.id, - }).then(res => { - console.log(res, '订单包件信息'); - if (res.data.code == 200) { - wrapData.value = res.data.data.data.packageList; - let IdTmp = []; //订单ID暂存 - dataInfo.value[dataId.value].packageListInfo = wrapTemp.value[dataId.value]; - //查看当前订单下面包件是缓存值,如果有就读取缓存值,否则就是第一次加载,使用API返回值 - if (dataInfo.value[dataId.value].packageListInfo) { - dataInfo.value[dataId.value].packageListInfo.forEach(item => { - IdTmp.push(item.id); - }); - } - toggleSelection({ - val: false, - data: IdTmp.length ? IdTmp : res.data.data.data.packageListIds.split(','), - index: kind.value ? 0 : 1, - }); //编辑的时候选中已有的数据 - } - // AddLalog.value = false; //关闭弹窗 - console.log(wrapData.value, '包件表格信息'); - console.log(res); - }); - } else { - // 运单号 - // 包条码 - $_getPackageListByStockArticleId({ - waybillNumber: '', //运单号 - orderPackageCode: '', //包条码 - id: val.id, - current: 1, - size: 100, - }).then(res => { - wrapData.value = res.data.data.records; - console.log(res, '订单包件'); - if (kind.value) { - toggleSelection({ index: 0 }); //自主配送下面包件全选 - } else { - toggleSelection({ index: 1 }); //外协下面包件全选 - } - console.log(tableRefs, 'tableRefs'); - console.log(res.data.data.records, '查看下面的包件'); - }); - // 新增 查看订单流程 - console.log('当前为新增状态'); - console.log(val, val.id, '查看包件事件'); - //临时存储下标用于查询包件对应的下标 - console.log(dataId.value, 'dataId.value下标'); - console.log(wrapDataInfo.value[dataId.value], '当前订单下面的包件信息'); - console.log(wrapDataInfo, '订单'); - } - editLoading.value = false; //关闭加载效果 }; // 输入框值切换 @@ -2970,9 +2864,10 @@ const SubmitCommercial = async () => { .el-Cart-button-left, .el-Cart-button-right { display: flex; - margin: 0 0px; justify-content: space-between; + margin: 0 0px; } + .el-Cart-button-left { width: 100%; :deep(button) { diff --git a/src/views/warehouse/parcelList/distributionParcelList.vue b/src/views/warehouse/parcelList/distributionParcelList.vue index 099b36f3..7d55c87f 100644 --- a/src/views/warehouse/parcelList/distributionParcelList.vue +++ b/src/views/warehouse/parcelList/distributionParcelList.vue @@ -84,7 +84,9 @@ -
+
+
勾选数量:{{ selectionList.length }}
+