From 9d80c4978ac40a2a2880da8c734795ebbe04a862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Thu, 25 Apr 2024 17:35:36 +0800 Subject: [PATCH] =?UTF-8?q?PDA-=E5=87=BA=E5=BA=93=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E8=AE=A1=E5=88=92=E6=9F=A5=E7=9C=8B=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/warehouse/warehose.js | 11 +++ pages/outWarehouse/outWarehouse.vue | 106 +++++++++++++++++++++++----- 2 files changed, 101 insertions(+), 16 deletions(-) diff --git a/api/warehouse/warehose.js b/api/warehouse/warehose.js index 180a166..6606cea 100644 --- a/api/warehouse/warehose.js +++ b/api/warehouse/warehose.js @@ -147,6 +147,17 @@ export function generateOutorderplan(params) { }) } +/** + * 获取出库单的持久化存储出库计划并计算计划批次当前已出库数量 + */ +export function getOutOrderPlanAndOutProductionNum(params) { + return request({ + url: '/mes/wm/WmOutOrder/getOutOrderPlanAndOutProductionNum', + method: 'get', + params + }) +} + /** * 检查是否可出库 production_packcode(扫码结果) shipment_num(出库单号) */ diff --git a/pages/outWarehouse/outWarehouse.vue b/pages/outWarehouse/outWarehouse.vue index abf7156..16d73b3 100644 --- a/pages/outWarehouse/outWarehouse.vue +++ b/pages/outWarehouse/outWarehouse.vue @@ -5,6 +5,7 @@ + 请扫出库单 请扫箱码 @@ -13,23 +14,77 @@ - 出库单号:{{ outInfo.shipmentNum }} + + + + + 当前已扫货物数:{{ quantityTotal }} + 当前已扫箱数:{{ newMaterialList.length }} + + + + + + + + + + 出库计划查看 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - 选择物料号 - - @@ -81,6 +136,7 @@ data() { return { loading: false, + showPopup: false, // 双击判定 touchNum: 0, clearData: {}, @@ -112,7 +168,7 @@ newMaterialList: [], //工单计划 - outOrderPlan: [], + outOrderPlanList: [], // 1-仓库扫码 2-货物扫码 3-出货单扫码 searchType: 3, subsectionList: ['单箱出库', '多箱出库'], @@ -121,7 +177,7 @@ columns: [ ['无物料号'] ], - material_id: '无物料号' //物料号 + material_id: '无物料号', //物料号 }; }, watch: {}, @@ -145,13 +201,13 @@ // 初始化,并且清空数据 this.clearData.outInfo = JSON.parse(JSON.stringify(this.outInfo)); this.clearData.newMaterialList = JSON.parse(JSON.stringify(this.newMaterialList)); - this.clearData.outOrderPlan = JSON.parse(JSON.stringify(this.outOrderPlan)); + this.clearData.outOrderPlanList = JSON.parse(JSON.stringify(this.outOrderPlanList)); this.searchType = 3; }, clear() { this.outInfo = JSON.parse(JSON.stringify(this.clearData.outInfo)); this.newMaterialList = JSON.parse(JSON.stringify(this.clearData.newMaterialList)); - this.outOrderPlan = JSON.parse(JSON.stringify(this.clearData.outOrderPlan)); + this.outOrderPlanList = JSON.parse(JSON.stringify(this.clearData.outOrderPlanList)); this.searchType = 3; }, // 扫码信息录入 @@ -161,10 +217,8 @@ this.searchType = 2; this.outInfo = data; this.newMaterialList = []; - let arry = []; this.columns = []; - this.outInfo.materialList.forEach((item) => { arry.push(item.partnumber); }); @@ -174,6 +228,7 @@ } else { this.columns.push(['无物料号']); } + } else if (type === 2) { if (this.subsectionCurrent === 0 && this.newMaterialList.length > 0) { uni.showModal({ @@ -448,6 +503,27 @@ return; } this.subsectionCurrent = index; + }, + // 弹窗打开 + popupOpen() { + this.getPlan(); + }, + // 弹窗关闭 + popupClose() { + this.showPopup = false; + }, + // 获取计划 + getPlan() { + this.outOrderPlanList = []; + const data = { + shipment_num: this.outInfo.shipmentNum, + partnumber: this.material_id + } + WarehoseApi.getOutOrderPlanAndOutProductionNum(data).then(res => { + if (res.code === 200) { + this.outOrderPlanList = res.data; + } + }) } } }; @@ -467,8 +543,6 @@ .warehoseInfo-box { width: 100%; font-size: 20px; - display: flex; - flex-direction: column; } .warehoseInfo-box .row {