lijuncheng 10 months ago
parent
commit
f839b80794
  1. 90
      pages/count/job/countDetail.vue

90
pages/count/job/countDetail.vue

@ -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,9 +393,13 @@
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;
this.currentEditItem.inventoryStatus = inventoryStatus;
} else { //
// //
var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode);
if (detail == undefined) { if (detail == undefined) {
// //
that.addNewItemCodeToList(qty, inventoryStatus) that.addNewItemCodeToList(qty, inventoryStatus)
@ -407,29 +414,15 @@
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 { //
} else {
itemEditInfo.scaned = true; itemEditInfo.scaned = true;
itemEditInfo.handleQty = qty; itemEditInfo.handleQty = qty;
itemEditInfo.inventoryStatus = inventoryStatus; itemEditInfo.inventoryStatus = inventoryStatus;
itemEditInfo.balanceQty = that.balance.qty; itemEditInfo.balanceQty = that.balance.qty;
itemEditInfo.stdPackQty = that.package.stdPackQty; itemEditInfo.stdPackQty = that.package.stdPackQty;
itemEditInfo.stdPackUnit = that.package.stdPackUnit; 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();

Loading…
Cancel
Save