Browse Source

修改盘点编辑功能

wms3.0_pda
niexiting 8 months ago
parent
commit
62172dbef4
  1. 130
      pages/count/job/countDetail.vue

130
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,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();

Loading…
Cancel
Save