Browse Source

打印标签添加boxPackCount

dev
shenzhouyu 4 weeks ago
parent
commit
5abc4ec180
  1. 14
      src/views/modules/shipment/shipmentNotification.vue

14
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

Loading…
Cancel
Save