From 6849088e7b8bdcf4b1abc21b865b354f786a60df Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Fri, 14 Nov 2025 09:56:39 +0800 Subject: [PATCH] bug --- .../production-inbound/inboundRegister.vue | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/views/modules/production-inbound/inboundRegister.vue b/src/views/modules/production-inbound/inboundRegister.vue index effcf1b..70de3f8 100644 --- a/src/views/modules/production-inbound/inboundRegister.vue +++ b/src/views/modules/production-inbound/inboundRegister.vue @@ -403,13 +403,6 @@ export default { return; } - const qtyToReceive = parseFloat(this.inboundItem.transQty) || 0; - if (qtyToReceive <= 0) { - this.$message.warning('入库数量为0,无法创建HU'); - this.hanlingItem.perQty = ''; - return; - } - const perQtyValue = parseFloat(perQty); const packageQty = Math.floor(qtyToReceive / perQtyValue); const remainder = qtyToReceive - (packageQty * perQtyValue); @@ -547,7 +540,13 @@ export default { // 获取unitIds并打印标签 const unitIds = data.unitIds || []; if (unitIds.length > 0) { - this.printViaServer(unitIds); + let printLabelType; + if (this.inboundItem.partNo && this.inboundItem.partNo.startsWith("80")) { + printLabelType = '库存成品标签'; + } else { + printLabelType = 'BIL标签'; + } + this.printViaServer(unitIds,printLabelType); } this.processFlag = 1; @@ -568,13 +567,13 @@ export default { /** * 通过服务器打印 * @param {Array} unitIds - HU unitId列表 + * @param printLabelType */ - async printViaServer(unitIds) { + async printViaServer(unitIds, printLabelType) { if (!unitIds || unitIds.length === 0) { console.warn('没有可打印的标签'); return; } - this.$emit('print-start') try { const printRequest = { @@ -582,7 +581,7 @@ export default { username: localStorage.getItem('userName'), site: localStorage.getItem('site'), unitIds: unitIds, - labelType: "库存成品标签" + labelType: printLabelType } console.log('打印请求:', printRequest);