From 5abc4ec180e2abe897d18e79953393de55e7faf3 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Wed, 14 Oct 2026 16:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A0=87=E7=AD=BE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0boxPackCount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/shipment/shipmentNotification.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/views/modules/shipment/shipmentNotification.vue b/src/views/modules/shipment/shipmentNotification.vue index 06c4523..b763fff 100644 --- a/src/views/modules/shipment/shipmentNotification.vue +++ b/src/views/modules/shipment/shipmentNotification.vue @@ -2186,6 +2186,18 @@ export default { const outerPackQty = this.multiplyQty(innerPackQty, boxPackCount) return this.splitQtyToLabels(outerTotal, outerPackQty) }, + // 与 QTY 一一对应:每个外箱内含几包(末箱不满则取实际包数) + calculatedOuterBoxPackCountList() { + const outerQtyList = this.calculatedOuterQtyList + const innerPackQty = Number(this.printForm.innerPackQty) + if (!outerQtyList.length || !(innerPackQty > 0)) { + return [] + } + return outerQtyList.map(outerQty => { + const packCount = this.splitQtyToLabels(outerQty, innerPackQty).length + return this.formatQtyValue(packCount) + }) + }, calculatedInnerQtyList() { const outerTotal = Number(this.printForm.outerTotal) const innerPackQty = Number(this.printForm.innerPackQty) @@ -3510,6 +3522,8 @@ export default { const customFields = { // 外箱标签数量数组,后端按 QTY 逐项生成外箱任务 QTY: this.calculatedOuterQtyList.slice(), + // 与 QTY 一一对应:每个外箱对应的内包数,末箱不满则按实际包数 + boxPackCount: this.calculatedOuterBoxPackCountList.slice(), } if (row.inventoryPartNo) { customFields.partNo = row.inventoryPartNo