Browse Source

修改盘点扫描功能

wms3.0_pda
聂喜婷 1 year ago
parent
commit
4caf98ec0b
  1. 88
      pages/count/job/countDetail.vue

88
pages/count/job/countDetail.vue

@ -117,7 +117,7 @@
package: {}, // package: {}, //
label: {}, // label: {}, //
currentEditItem: {}, currentEditItem: {},
jobStatus:"" jobStatus: ""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -143,7 +143,7 @@
onBackPress(e) { onBackPress(e) {
// //
if (e.from === 'backbutton') { if (e.from === 'backbutton') {
if (this.jobStatus=="2") { if (this.jobStatus == "2") {
// //
cancleTakeCountJob(this.id).then(res => { cancleTakeCountJob(this.id).then(res => {
uni.navigateBack(); uni.navigateBack();
@ -331,39 +331,53 @@
that.label = result.label; that.label = result.label;
var item = this.detailSource.find(r => r.itemCode == that.package.itemCode); var item = this.detailSource.find(r => r.itemCode == that.package.itemCode);
if (item == undefined) { if (item == undefined) {
// this.$refs.comMessage.showQuestionMessage("" + that.package.itemCode +
// ",?",
// res => {
// if (res) {
that.scanByBalance(result); that.scanByBalance(result);
// } else { } else {
// this.scanPopupGetFocus(); // let subItem = item.subList.find(item => {
// if (item.packingNumber == that.label.packingNumber &&
// item.batch == that.label.batch && item.scaned == true) {
// return item;
// } // }
// }) // })
} else { let subItems = item.subList.filter(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.scaned == true) { item.batch == that.label.batch) {
return item; return item;
} }
}) })
//
if (subItem != undefined) { if (subItems.length > 1) {
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber + let subItem = subItems.find(r => r.scaned == false)
"】已经完成盘点,是否要编辑盘点结果?", if (subItem == undefined) {
res => { subItem = subItems[0];
if (res) { that.editCountResult(item, subItem);
this.currentEditItem = subItem; } else {
this.$refs.countQtyEdit.openEditPopup(subItem, that.scanByBalance(result);
item.subList); }
// this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem, } else if (subItems.length == 1) {
// item.subList); let subItem = subItems[0];
} else { if (subItem.scaned) {
this.scanPopupGetFocus(); if (subItem != undefined) {
}
}) that.editCountResult(item, subItem);
} else {
that.scanByBalance(result); // this.$refs.comMessage.showQuestionMessage("" + that.label.packingNumber +
// ",?",
// res => {
// if (res) {
// this.currentEditItem = subItem;
// this.$refs.countQtyEdit.openEditPopup(subItem,
// item.subList);
// // this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem,
// // item.subList);
// } else {
// this.scanPopupGetFocus();
// }
// })
} else {
that.scanByBalance(result);
}
}
} }
} }
} catch (e) { } catch (e) {
@ -371,6 +385,24 @@
} }
}, },
//
editCountResult(item, subItem) {
let that = this;
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber +
"】已经完成盘点,是否要编辑盘点结果?",
res => {
if (res) {
this.currentEditItem = subItem;
this.$refs.countQtyEdit.openEditPopup(subItem,
item.subList);
// this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem,
// item.subList);
} else {
this.scanPopupGetFocus();
}
})
},
getUnOpenCountResult(result) { getUnOpenCountResult(result) {
try { try {
let that = this; let that = this;

Loading…
Cancel
Save