|
@ -50,7 +50,7 @@ |
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
<win-scan-pack-and-location ref="scanPopup" :noShowBalanceMessage="true" @getCountScanResult='getScanResult'> |
|
|
<win-scan-pack-and-location ref="scanPopup" :noShowBalanceMessage="true" @getCountScanResult='getScanResult'> |
|
|
</win-scan-pack-and-location> |
|
|
</win-scan-pack-and-location> |
|
|
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" :isShowStatus="true" |
|
|
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" |
|
|
:allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'"> |
|
|
:allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'"> |
|
|
</count-qty-edit> |
|
|
</count-qty-edit> |
|
|
<com-message ref="comMessage"></com-message> |
|
|
<com-message ref="comMessage"></com-message> |
|
@ -110,11 +110,11 @@ |
|
|
jobContent: {}, //任务内容 |
|
|
jobContent: {}, //任务内容 |
|
|
subList: [], //接口返回的任务subList |
|
|
subList: [], //接口返回的任务subList |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
itemEditInfo: {}, |
|
|
|
|
|
balance: {}, //库存余额 |
|
|
balance: {}, //库存余额 |
|
|
editInventoryStatus: false, |
|
|
editInventoryStatus: false, |
|
|
package: {}, //包装 |
|
|
package: {}, //包装 |
|
|
label: {} //标签 |
|
|
label: {}, //标签 |
|
|
|
|
|
currentEditItem: {} |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
@ -315,7 +315,6 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//明盘 |
|
|
//明盘 |
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
try { |
|
|
try { |
|
@ -333,11 +332,11 @@ |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
if (subItem != undefined && subItem.scaned) { |
|
|
if (subItem != undefined && subItem.scaned) { |
|
|
this.$refs.comMessage.showQuestionMessage("箱码【" + packingNumber + |
|
|
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber + |
|
|
"】已经完成盘点,是否要编辑数量", |
|
|
"】已经完成盘点,是否要编辑盘点结果?", |
|
|
res => { |
|
|
res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.$refs.countQtyEdit.openEditPopup(subItem, |
|
|
this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem, |
|
|
item.subList); |
|
|
item.subList); |
|
|
} else { |
|
|
} else { |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
@ -357,8 +356,8 @@ |
|
|
item.handleQty = Number(that.label.qty); |
|
|
item.handleQty = Number(that.label.qty); |
|
|
item.balanceQty = 0; |
|
|
item.balanceQty = 0; |
|
|
item.inventoryStatus = "OK"; |
|
|
item.inventoryStatus = "OK"; |
|
|
this.balance = item; |
|
|
that.balance = item; |
|
|
that.$refs.countQtyEdit.openEditPopup(item, |
|
|
that.$refs.countQtyEdit.openEditPopupShowSeconds(item, |
|
|
null); |
|
|
null); |
|
|
} else { |
|
|
} else { |
|
|
//继续扫描 |
|
|
//继续扫描 |
|
@ -366,88 +365,20 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} else if (result.balance.length == 1) { |
|
|
} else if (result.balance.length == 1) { |
|
|
this.balance = result.balance[0]; |
|
|
that.balance = result.balance[0]; |
|
|
that.$refs.countQtyEdit.openEditPopup(this.balance, |
|
|
that.balance.balanceQty = that.balance.qty; |
|
|
|
|
|
that.balance.stdPackQty = that.package.stdPackQty; |
|
|
|
|
|
that.balance.stdPackUnit = that.package.stdPackUnit; |
|
|
|
|
|
that.$refs.countQtyEdit.openEditPopupShowSeconds(that.balance, |
|
|
null); |
|
|
null); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return; |
|
|
|
|
|
// var packingNumber = that.label.packingNumber; |
|
|
|
|
|
// var batch = that.label.batch; |
|
|
|
|
|
// var itemCode = that.label.itemCode; |
|
|
|
|
|
// var balanceQty = 0; |
|
|
|
|
|
// var inventoryStatus = "OK" |
|
|
|
|
|
|
|
|
|
|
|
// var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
|
|
|
|
// var itemEditInfo; |
|
|
|
|
|
// //检查物料号是否存在 |
|
|
|
|
|
// if (detail == undefined) { |
|
|
|
|
|
// //物料号不存在,创建物料号数据添加到列表。设置为已经扫描 |
|
|
|
|
|
// this.addNewItemCodeToList(result) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// if (result.balance.length == 0) { |
|
|
|
|
|
// this.balance = label; |
|
|
|
|
|
// this.balanceQty = 0; |
|
|
|
|
|
// this.inventoryStatus = "OK"; |
|
|
|
|
|
// this.editInventoryStatus = true; |
|
|
|
|
|
|
|
|
|
|
|
// //物料号存在,查询是否在任务列表中 |
|
|
|
|
|
// itemEditInfo = detail.subList.find(item => { |
|
|
|
|
|
// if (item.packingNumber == packingNumber && |
|
|
|
|
|
// item.batch == batch) { |
|
|
|
|
|
// return item; |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.balance = result.balance[0]; |
|
|
|
|
|
// balanceQty = this.balance.qty; |
|
|
|
|
|
// inventoryStatus = this.balance.inventoryStatus; |
|
|
|
|
|
// //物料号存在,查询是否在任务列表中 |
|
|
|
|
|
// itemEditInfo = detail.subList.find(item => { |
|
|
|
|
|
// if (item.packingNumber == packingNumber && |
|
|
|
|
|
// item.batch == batch && |
|
|
|
|
|
// item.inventoryStatus == inventoryStatus) { |
|
|
|
|
|
// return item; |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// if (itemEditInfo == undefined) { |
|
|
|
|
|
// //不在任务列表中,提示是否添加到列表 |
|
|
|
|
|
// this.addExistItemCodeToList(detail, result); |
|
|
|
|
|
|
|
|
|
|
|
// } else { |
|
|
|
|
|
// //在列表中,更新已扫描状态, |
|
|
|
|
|
// if (itemEditInfo.scaned) { |
|
|
|
|
|
// this.$refs.comMessage.showQuestionMessage("箱码【" + packingNumber + |
|
|
|
|
|
// "】已经完成盘点,是否要编辑数量", |
|
|
|
|
|
// res => { |
|
|
|
|
|
// if (res) { |
|
|
|
|
|
// this.$refs.countQtyEdit.openEditPopup(itemEditInfo, |
|
|
|
|
|
// detail.subList); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.scanPopupGetFocus(); |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
// } else { |
|
|
|
|
|
// itemEditInfo.scaned = true; |
|
|
|
|
|
// itemEditInfo.handleQty = balanceQty; |
|
|
|
|
|
// itemEditInfo.balanceQty = balanceQty; |
|
|
|
|
|
// itemEditInfo.stdPackQty = result.package.stdPackQty; |
|
|
|
|
|
// itemEditInfo.stdPackUnit = result.package.stdPackUnit; |
|
|
|
|
|
// this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail |
|
|
|
|
|
// .subList); |
|
|
|
|
|
// this.updateData() |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
this.showErrorMessage(e.message) |
|
|
this.showErrorMessage(e.message) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
editConfirm(qty, inventoryStatus) { |
|
|
editConfirm(qty, inventoryStatus, mode) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
var detail = this.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
var detail = this.detailSource.find(r => r.itemCode == that.package.itemCode); |
|
|
|
|
|
|
|
@ -478,11 +409,24 @@ |
|
|
this.updateData() |
|
|
this.updateData() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.calcHandleQty(); |
|
|
//如果是编辑,移除之前的盘点结果 |
|
|
this.scanPopupGetFocus(); |
|
|
if (mode == 'edit') { |
|
|
|
|
|
this.currentEditItem.handleQty = 0; |
|
|
|
|
|
this.currentEditItem.scaned = false; |
|
|
|
|
|
this.currentEditItem = {}; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(r => { |
|
|
|
|
|
this.calcHandleQty(); |
|
|
|
|
|
this.scanPopupGetFocus(); |
|
|
|
|
|
}, 100) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
editClose() { |
|
|
|
|
|
this.scanPopupGetFocus(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
//盲盘 |
|
|
//盲盘 |
|
|
getUnOpenScanResult(result) { |
|
|
getUnOpenScanResult(result) { |
|
|
try { |
|
|
try { |
|
@ -599,7 +543,7 @@ |
|
|
scaned: true, |
|
|
scaned: true, |
|
|
countDetailNumber: "", |
|
|
countDetailNumber: "", |
|
|
ownerCode: balance.ownerCode, |
|
|
ownerCode: balance.ownerCode, |
|
|
packingNumber: pack.packingNumber, |
|
|
packingNumber: pack.number, |
|
|
containerNumber: balance.containerNumber, |
|
|
containerNumber: balance.containerNumber, |
|
|
batch: pack.batch, |
|
|
batch: pack.batch, |
|
|
inventoryStatus: balance.inventoryStatus, |
|
|
inventoryStatus: balance.inventoryStatus, |
|
@ -620,7 +564,6 @@ |
|
|
stdPackUnit: pack.stdPackUnit, |
|
|
stdPackUnit: pack.stdPackUnit, |
|
|
creator: this.$store.state.user.id |
|
|
creator: this.$store.state.user.id |
|
|
} |
|
|
} |
|
|
debugger; |
|
|
|
|
|
return detail; |
|
|
return detail; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -766,6 +709,7 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
editItem(item) { |
|
|
editItem(item) { |
|
|
|
|
|
this.currentEditItem = item; |
|
|
var detail = this.detailSource.find(r => r.itemCode == item.itemCode); |
|
|
var detail = this.detailSource.find(r => r.itemCode == item.itemCode); |
|
|
this.$refs.countQtyEdit.openEditPopup(item, |
|
|
this.$refs.countQtyEdit.openEditPopup(item, |
|
|
detail.subList); |
|
|
detail.subList); |
|
|