lijuncheng 10 months ago
parent
commit
88e8f725aa
  1. 15
      common/balance.js
  2. 94
      pages/count/job/countDetail.vue

15
common/balance.js

@ -263,6 +263,11 @@ export function byBatch(label, locationCode, fromInventoryStatuses, callback) {
action: "==",
value: label.batch
})
filters.push({
column: "packingNumber",
action: "==",
value: null
})
filters.push({
column: "locationCode",
action: "==",
@ -325,6 +330,16 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback)
action: "==",
value: label.itemCode
})
filters.push({
column: "packingNumber",
action: "==",
value: null
})
filters.push({
column: "batch",
action: "==",
value: null
})
filters.push({
column: "locationCode",
action: "==",

94
pages/count/job/countDetail.vue

@ -117,7 +117,7 @@
package: {}, //
label: {}, //
currentEditItem: {},
jobStatus:""
jobStatus: ""
};
},
onLoad(option) {
@ -143,7 +143,7 @@
onBackPress(e) {
//
if (e.from === 'backbutton') {
if (this.jobStatus=="2") {
if (this.jobStatus == "2") {
//
cancleTakeCountJob(this.id).then(res => {
uni.navigateBack();
@ -331,39 +331,53 @@
that.label = result.label;
var item = this.detailSource.find(r => r.itemCode == that.package.itemCode);
if (item == undefined) {
// this.$refs.comMessage.showQuestionMessage("" + that.package.itemCode +
// ",?",
// res => {
// if (res) {
that.scanByBalance(result);
// } else {
// this.scanPopupGetFocus();
} else {
// let subItem = item.subList.find(item => {
// if (item.packingNumber == that.label.packingNumber &&
// item.batch == that.label.batch && item.scaned == true) {
// return item;
// }
// })
} else {
let subItem = item.subList.find(item => {
let subItems = item.subList.filter(item => {
if (item.packingNumber == that.label.packingNumber &&
item.batch == that.label.batch && item.scaned == true) {
item.batch == that.label.batch) {
return item;
}
})
if (subItem != undefined) {
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);
//
if (subItems.length > 1) {
let subItem = subItems.find(r => r.scaned == false)
if (subItem == undefined) {
subItem = subItems[0];
that.editCountResult(item, subItem);
} else {
that.scanByBalance(result);
}
} else if (subItems.length == 1) {
let subItem = subItems[0];
if (subItem.scaned) {
if (subItem != undefined) {
that.editCountResult(item, subItem);
// 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) {
@ -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) {
try {
let that = this;
@ -487,14 +519,14 @@
} else {
//
//
var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode);
var detail = that.detailSource.find(r => r.itemCode == that.label.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 &&
if (item.packingNumber == that.label.packingNumber &&
item.batch == that.label.batch &&
item.inventoryStatus == inventoryStatus) {
return item;
}

Loading…
Cancel
Save