From e38595d3e6e5334ae8ef9b79b50414b9450ebb42 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Fri, 30 Oct 2026 14:30:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=B7=BB=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/shipment/cnShipment.js | 6 ++++ src/i18n/locales/shipment/enShipment.js | 6 ++++ .../modules/shipment/shipmentNotification.vue | 33 +++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/src/i18n/locales/shipment/cnShipment.js b/src/i18n/locales/shipment/cnShipment.js index e5a7c55..8bb45d3 100644 --- a/src/i18n/locales/shipment/cnShipment.js +++ b/src/i18n/locales/shipment/cnShipment.js @@ -176,6 +176,12 @@ export default { inputInnerPackQty: '请输入内箱数量', boxPackCount: '每箱内包数', inputBoxPackCount: '请输入每箱内包数', + cartonWeight: '箱重', + inputCartonWeight: '请输入箱重', + netWeight: '净重', + inputNetWeight: '请输入净重', + productionDate: '生产日期', + selectProductionDate: '请选择生产日期', printHint: '每张外箱标签数量 = 每箱内包数 × 内箱数量;外箱/内箱余数均单独成张标签', calcResult: '计算结果(不可修改)', outerBoxLabel: '外箱标签', diff --git a/src/i18n/locales/shipment/enShipment.js b/src/i18n/locales/shipment/enShipment.js index 44bf48c..7b5f3ee 100644 --- a/src/i18n/locales/shipment/enShipment.js +++ b/src/i18n/locales/shipment/enShipment.js @@ -175,6 +175,12 @@ export default { inputInnerPackQty: 'Please enter inner-box qty', boxPackCount: 'Inner packs per box', inputBoxPackCount: 'Please enter inner packs per box', + cartonWeight: 'Carton weight', + inputCartonWeight: 'Please enter carton weight', + netWeight: 'Net weight', + inputNetWeight: 'Please enter net weight', + productionDate: 'Production date', + selectProductionDate: 'Please select production date', printHint: 'Qty per outer-box label = inner packs per box × inner-box qty; remainders print as separate labels', calcResult: 'Calculation result (read-only)', outerBoxLabel: 'Outer-box label', diff --git a/src/views/modules/shipment/shipmentNotification.vue b/src/views/modules/shipment/shipmentNotification.vue index b763fff..eaf9a8a 100644 --- a/src/views/modules/shipment/shipmentNotification.vue +++ b/src/views/modules/shipment/shipmentNotification.vue @@ -722,6 +722,24 @@ {{ $t('shipment.print.boxPackCount') }} + + +
{{ $t('shipment.print.printHint') }} @@ -2057,6 +2075,9 @@ export default { outerTotal: '', innerPackQty: '', boxPackCount: '', + specialCartonWeight: '0', + specialNetWeight: '0', + specialProductionDate: '', labelType: '外箱标签', reportId: '', printerName: '', @@ -3456,6 +3477,9 @@ export default { outerTotal: '', innerPackQty: '', boxPackCount: '', + specialCartonWeight: '0', + specialNetWeight: '0', + specialProductionDate: '', labelType: '外箱标签', reportId: '', printerName: '', @@ -3467,6 +3491,11 @@ export default { return Math.round(Number(a) * Number(b) * precision) / precision }, + parsePrintWeight(value) { + const num = Number(value) + return Number.isFinite(num) ? num : 0 + }, + formatQtyValue(value) { const num = Number(value) if (Number.isNaN(num)) { @@ -3524,6 +3553,10 @@ export default { QTY: this.calculatedOuterQtyList.slice(), // 与 QTY 一一对应:每个外箱对应的内包数,末箱不满则按实际包数 boxPackCount: this.calculatedOuterBoxPackCountList.slice(), + // 非数组字段由本次所有外箱标签共用,模板用 #{specialCartonWeight} 等替换 + specialCartonWeight: this.parsePrintWeight(this.printForm.specialCartonWeight), + specialNetWeight: this.parsePrintWeight(this.printForm.specialNetWeight), + specialProductionDate: this.printForm.specialProductionDate || '', } if (row.inventoryPartNo) { customFields.partNo = row.inventoryPartNo