|
@ -328,18 +328,21 @@ |
|
|
} else { |
|
|
} else { |
|
|
let subItem = item.subList.find(item => { |
|
|
let subItem = item.subList.find(item => { |
|
|
if (item.packingNumber == that.label.packingNumber && |
|
|
if (item.packingNumber == that.label.packingNumber && |
|
|
item.batch == that.label.batch) { |
|
|
item.batch == that.label.batch && item.scaned == true) { |
|
|
return item; |
|
|
return item; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
if (subItem != undefined && subItem.scaned) { |
|
|
if (subItem != undefined) { |
|
|
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber + |
|
|
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber + |
|
|
"】已经完成盘点,是否要编辑盘点结果?", |
|
|
"】已经完成盘点,是否要编辑盘点结果?", |
|
|
res => { |
|
|
res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem, |
|
|
this.currentEditItem = subItem; |
|
|
|
|
|
this.$refs.countQtyEdit.openEditPopup(subItem, |
|
|
item.subList); |
|
|
item.subList); |
|
|
|
|
|
// this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem, |
|
|
|
|
|
// item.subList); |
|
|
} else { |
|
|
} else { |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
|
} |
|
|
} |
|
@ -390,46 +393,36 @@ |
|
|
|
|
|
|
|
|
editConfirm(qty, inventoryStatus, mode) { |
|
|
editConfirm(qty, inventoryStatus, mode) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
//编辑 |
|
|
|
|
|
if (mode == 'edit') { |
|
|
//检查物料号是否存在 |
|
|
this.currentEditItem.handleQty = qty; |
|
|
if (detail == undefined) { |
|
|
this.currentEditItem.inventoryStatus = inventoryStatus; |
|
|
//物料号不存在,创建物料号数据添加到列表。设置为已经扫描 |
|
|
} else { //新增盘点 |
|
|
that.addNewItemCodeToList(qty, inventoryStatus) |
|
|
//检查物料号是否存在 |
|
|
} else { |
|
|
var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
var itemEditInfo = detail.subList.find(item => { |
|
|
if (detail == undefined) { |
|
|
if (item.packingNumber == that.package.number && |
|
|
//物料号不存在,创建物料号数据添加到列表。设置为已经扫描 |
|
|
item.batch == that.package.batch && |
|
|
that.addNewItemCodeToList(qty, inventoryStatus) |
|
|
item.inventoryStatus == inventoryStatus) { |
|
|
} else { |
|
|
return item; |
|
|
var itemEditInfo = detail.subList.find(item => { |
|
|
} |
|
|
if (item.packingNumber == that.package.number && |
|
|
}) |
|
|
item.batch == that.package.batch && |
|
|
|
|
|
item.inventoryStatus == inventoryStatus) { |
|
|
|
|
|
return item; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
if (itemEditInfo == undefined) { |
|
|
if (itemEditInfo == undefined) { |
|
|
//不在任务列表中,提示是否添加到列表 |
|
|
//不在任务列表中,提示是否添加到列表 |
|
|
if (mode == 'edit') { |
|
|
|
|
|
that.currentEditItem.handleQty = qty; |
|
|
|
|
|
that.currentEditItem.inventoryStatus = inventoryStatus; |
|
|
|
|
|
} else { |
|
|
|
|
|
that.addExistItemCodeToList(detail, qty, inventoryStatus); |
|
|
that.addExistItemCodeToList(detail, qty, inventoryStatus); |
|
|
|
|
|
} else { //已经扫描是否编辑 |
|
|
|
|
|
itemEditInfo.scaned = true; |
|
|
|
|
|
itemEditInfo.handleQty = qty; |
|
|
|
|
|
itemEditInfo.inventoryStatus = inventoryStatus; |
|
|
|
|
|
itemEditInfo.balanceQty = that.balance.qty; |
|
|
|
|
|
itemEditInfo.stdPackQty = that.package.stdPackQty; |
|
|
|
|
|
itemEditInfo.stdPackUnit = that.package.stdPackUnit; |
|
|
} |
|
|
} |
|
|
} else { |
|
|
|
|
|
itemEditInfo.scaned = true; |
|
|
|
|
|
itemEditInfo.handleQty = qty; |
|
|
|
|
|
itemEditInfo.inventoryStatus = inventoryStatus; |
|
|
|
|
|
itemEditInfo.balanceQty = that.balance.qty; |
|
|
|
|
|
itemEditInfo.stdPackQty = that.package.stdPackQty; |
|
|
|
|
|
itemEditInfo.stdPackUnit = that.package.stdPackUnit; |
|
|
|
|
|
|
|
|
|
|
|
//编辑后的结果对应到其它明细,当前编辑结果为0 |
|
|
|
|
|
if (mode == 'edit') { |
|
|
|
|
|
itemEditInfo.scaned = false; |
|
|
|
|
|
that.currentEditItem.handleQty = 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail |
|
|
|
|
|
// .subList); |
|
|
|
|
|
that.updateData() |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
setTimeout(r => { |
|
|
setTimeout(r => { |
|
@ -437,8 +430,64 @@ |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
|
}, 100) |
|
|
}, 100) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// editConfirm(qty, inventoryStatus, mode) { |
|
|
|
|
|
// let that = this; |
|
|
|
|
|
// var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
|
|
|
|
|
|
|
|
|
// //检查物料号是否存在 |
|
|
|
|
|
// if (detail == undefined) { |
|
|
|
|
|
// //物料号不存在,创建物料号数据添加到列表。设置为已经扫描 |
|
|
|
|
|
// that.addNewItemCodeToList(qty, inventoryStatus) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// var itemEditInfo = detail.subList.find(item => { |
|
|
|
|
|
// if (item.packingNumber == that.package.number && |
|
|
|
|
|
// item.batch == that.package.batch && |
|
|
|
|
|
// item.inventoryStatus == inventoryStatus) { |
|
|
|
|
|
// return item; |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
// if (itemEditInfo == undefined) { |
|
|
|
|
|
// //不在任务列表中,提示是否添加到列表 |
|
|
|
|
|
// if (mode == 'edit') { |
|
|
|
|
|
// that.currentEditItem.handleQty = qty; |
|
|
|
|
|
// that.currentEditItem.inventoryStatus = inventoryStatus; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// that.addExistItemCodeToList(detail, qty, inventoryStatus); |
|
|
|
|
|
// } |
|
|
|
|
|
// } else { //已经扫描是否编辑 |
|
|
|
|
|
// if (itemEditInfo.scaned) { |
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// itemEditInfo.scaned = true; |
|
|
|
|
|
// itemEditInfo.handleQty = qty; |
|
|
|
|
|
// itemEditInfo.inventoryStatus = inventoryStatus; |
|
|
|
|
|
// itemEditInfo.balanceQty = that.balance.qty; |
|
|
|
|
|
// itemEditInfo.stdPackQty = that.package.stdPackQty; |
|
|
|
|
|
// itemEditInfo.stdPackUnit = that.package.stdPackUnit; |
|
|
|
|
|
|
|
|
|
|
|
// //编辑后的结果对应到其它明细,当前编辑结果为0 |
|
|
|
|
|
// if (mode == 'edit') { |
|
|
|
|
|
// itemEditInfo.scaned = false; |
|
|
|
|
|
// that.currentEditItem.handleQty = 0; |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// // this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail |
|
|
|
|
|
// // .subList); |
|
|
|
|
|
// that.updateData() |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// setTimeout(r => { |
|
|
|
|
|
// this.calcHandleQty(); |
|
|
|
|
|
// this.scanPopupGetFocus(); |
|
|
|
|
|
// }, 100) |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
editClose() { |
|
|
editClose() { |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
|
}, |
|
|
}, |
|
@ -554,7 +603,6 @@ |
|
|
return totalCount; |
|
|
return totalCount; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
commit() { |
|
|
commit() { |
|
|
this.scanCount = this.getScanCount(); |
|
|
this.scanCount = this.getScanCount(); |
|
|
|
|
|
|
|
|