From d54b976c27f8f42f82185c1b1730247ffb92a993 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Mon, 1 Jul 2024 14:11:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A3=85=E8=BD=A6=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E4=BF=AE=E6=94=B9=E7=9B=AE=E7=9A=84=E4=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../artery/truckLoadingDetails.vue | 52 ++++++++++++++++--- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/src/views/distribution/artery/truckLoadingDetails.vue b/src/views/distribution/artery/truckLoadingDetails.vue index 2f8b8237..9510d5d3 100644 --- a/src/views/distribution/artery/truckLoadingDetails.vue +++ b/src/views/distribution/artery/truckLoadingDetails.vue @@ -204,7 +204,7 @@ style="width: 100%" :precision="0" :max="details.zeroItem.num" - readonly + :min="0" :controls="false" v-model="details.zeroItem.enterNum" /> @@ -298,7 +298,10 @@ import { postSignLoadScanByIds, postLoadingDetailExport, } from '@/api/distribution/truckLoadingDetails'; -import { postFindNextNodeList } from '@/api/distribution/VehicleStowage'; +import { + postFindNextNodeList, + postUpdateLoadScanFinalNodeIdById, +} from '@/api/distribution/VehicleStowage'; import { getShowAdvancePackgeCode } from '@/api/waybill/orderPackageListDetails'; import { postShowOrderCode } from '@/api/distribution/distributionStockArticle'; /** 获取字典 */ @@ -378,8 +381,6 @@ const details = reactive({ }, /** 弹出层显示 */ popUpShow: { - /** 装车详情 */ - truckLoadingDetailVisited: false, /** 零担补录 */ transferVisited: false, /** 计划仓更改 */ @@ -439,6 +440,7 @@ const details = reactive({ /** 后续节点仓库数据 */ nextNodeData: [], choosePackageList: [], + chooseNodeId: '', }); const { @@ -1411,10 +1413,46 @@ const handleChooseWarehouse = async () => { await nextTick(); if (_arr.length === 0) return ElMessage.warning('请选择未卸车数据'); - + details.choosePackageList = _arr; details.popUpShow.chooseDestinationVisited = true; }; +/** 配置装车目的地 */ +const handleEditSubmit = async () => { + if (!details.chooseNodeId) return ElMessage.warning('请选择目的仓'); + + details.loadingObj.pageLoading = true; + try { + const submitData = { + loadId: $route.query.loadId, + loadScanFinalNodeIdList: [], + }; + + for (const iterator of details.choosePackageList) { + submitData.loadScanFinalNodeIdList.push({ + loadScanId: iterator.id, + finalNodeId: details.chooseNodeId, + }); + } + + details.popUpShow.chooseDestinationVisited = false; + + const res = await postUpdateLoadScanFinalNodeIdById(submitData); + + const { code, msg } = res.data; + + if (code !== 200) return; + if (msg) ElMessage.success(msg); + details.chooseNodeId = ''; + + onLoad(); + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.pageLoading = false; + } +}; + watch( $route, (newVal, oldVal) => { @@ -1530,8 +1568,8 @@ watch( } &.primary { - background-color: #0086f1; - border-color: #0086f1; + background-color: green; + border-color: green; color: #fff; }