|
|
|
@ -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); |
|
|
|
|
|
|
|
|