|
@ -243,6 +243,22 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if (detail == undefined) { |
|
|
if (detail == undefined) { |
|
|
|
|
|
//如果最开始扫父,在扫子,提示已经扫描父包装 |
|
|
|
|
|
//如果扫子在扫父,提示扫描的是父包装,是否移除子包装,是移除子包装,显示父包装 |
|
|
|
|
|
//扫描的是子包装, |
|
|
|
|
|
if (pack.parentNumber) { |
|
|
|
|
|
var checkData = item.subList.find(r => { |
|
|
|
|
|
if (r.packingNumber == pack.parentNumber && |
|
|
|
|
|
r.batch == balance.batch) { |
|
|
|
|
|
return r; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if (checkData) { |
|
|
|
|
|
//提示已经扫描 |
|
|
|
|
|
this.showErrorMessage("箱码[" + pack.number + "]批次[" + balance.batch + |
|
|
|
|
|
"]的父包装已经扫描") |
|
|
|
|
|
console.log("父包装已经扫描") |
|
|
|
|
|
} else { |
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
newDetail.parentNumber = pack.parentNumber; |
|
|
newDetail.parentNumber = pack.parentNumber; |
|
|
newDetail.packingNumber = pack.number |
|
|
newDetail.packingNumber = pack.number |
|
@ -252,6 +268,49 @@ |
|
|
newDetail.handleQty = balance.lableQty |
|
|
newDetail.handleQty = balance.lableQty |
|
|
} |
|
|
} |
|
|
item.subList.push(newDetail); |
|
|
item.subList.push(newDetail); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
//扫描的是父包装 |
|
|
|
|
|
var checkData = item.subList.find(r => { |
|
|
|
|
|
if (r.parentNumber == pack.number && |
|
|
|
|
|
r.batch == balance.batch) { |
|
|
|
|
|
return r; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if (checkData) { |
|
|
|
|
|
//是否移除 |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage("箱码[" + checkData.parentNumber+"]" + "批次[" + balance |
|
|
|
|
|
.batch + "]是父包装,是否移除子包装", res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
item.subList = []; |
|
|
|
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
|
|
|
newDetail.parentNumber = pack.parentNumber; |
|
|
|
|
|
newDetail.packingNumber = pack.number |
|
|
|
|
|
newDetail.packUnit = pack.packUnit; |
|
|
|
|
|
newDetail.packQty = pack.packQty; |
|
|
|
|
|
if (balance.lableQty) { |
|
|
|
|
|
newDetail.handleQty = balance.lableQty |
|
|
|
|
|
} |
|
|
|
|
|
item.subList.push(newDetail); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
console.log("扫描的是父包装,是否移除子包装") |
|
|
|
|
|
} else { |
|
|
|
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
|
|
|
newDetail.parentNumber = pack.parentNumber; |
|
|
|
|
|
newDetail.packingNumber = pack.number |
|
|
|
|
|
newDetail.packUnit = pack.packUnit; |
|
|
|
|
|
newDetail.packQty = pack.packQty; |
|
|
|
|
|
if (balance.lableQty) { |
|
|
|
|
|
newDetail.handleQty = balance.lableQty |
|
|
|
|
|
} |
|
|
|
|
|
item.subList.push(newDetail); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.scanPopupGetFocus() |
|
|
this.scanPopupGetFocus() |
|
|
} else { |
|
|
} else { |
|
|
if (detail.scaned == true) { |
|
|
if (detail.scaned == true) { |
|
|