Browse Source

修改明盘

wms3.0_pda
niexiting 11 months ago
parent
commit
b90ca753a7
  1. 2
      mycomponents/qty/CountQtyEdit.vue
  2. 118
      pages/count/job/countDetail.vue
  3. 2
      static/config.json

2
mycomponents/qty/CountQtyEdit.vue

@ -184,7 +184,7 @@
initData(item, detailList) { initData(item, detailList) {
this.dataContent = item; this.dataContent = item;
this.inventoryStatus = this.dataContent.inventoryStatus; this.inventoryStatus = this.dataContent.inventoryStatus;
this.allQty = Number(this.dataContent.qty); this.allQty = Number(this.dataContent.handleQty);
this.stdCount = Math.ceil(this.allQty / this.dataContent.stdPackQty); this.stdCount = Math.ceil(this.allQty / this.dataContent.stdPackQty);
this.detailList = detailList; this.detailList = detailList;
}, },

118
pages/count/job/countDetail.vue

@ -395,42 +395,11 @@
} }
}) })
if (mode == 'edit') {
//
// if (that.currentEditItem.id == '0') {
// let a = detail.subList.find(that.currentEditItem);
// let index = that.currentEditItem.index;
// // detail.subList
// detail.subList.splice(index, 1)
// } else {
//
// that.currentEditItem.handleQty = 0;
// that.currentEditItem.scaned = false;
// that.currentEditItem = {};
// }
}
if (itemEditInfo == undefined) { if (itemEditInfo == undefined) {
// //
if (mode == 'edit') { if (mode == 'edit') {
that.currentEditItem.handleQty = 0; that.currentEditItem.handleQty = qty;
that.currentEditItem.inventoryStatus = inventoryStatus; that.currentEditItem.inventoryStatus = inventoryStatus;
//
// if (that.currentEditItem.id == '0') {
// let a = detail.subList.find(that.currentEditItem);
// let index = that.currentEditItem.index;
// // detail.subList
// detail.subList.splice(index, 1)
// } else {
//
// that.currentEditItem.handleQty = 0;
// that.currentEditItem.scaned = false;
// that.currentEditItem = {};
// }
} else { } else {
that.addExistItemCodeToList(detail, qty, inventoryStatus); that.addExistItemCodeToList(detail, qty, inventoryStatus);
} }
@ -441,6 +410,13 @@
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 // this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail
// .subList); // .subList);
that.updateData() that.updateData()
@ -457,74 +433,6 @@
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}, },
//
getUnOpenScanResult(result) {
try {
//
if (result.balance.length == 0) {
}
let label = result.label;
this.balance = result.balance[0];
var packingNumber = label.packingNumber;
var batch = label.batch;
var itemCode = label.itemCode;
var balanceQty = this.balance.qty;
var inventoryStatus = this.balance.inventoryStatus;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
var itemEditInfo;
//
if (detail == undefined) {
//
this.addNewItemCodeToList()
} else {
//
itemEditInfo = detail.subList.find(item => {
if (item.packingNumber == packingNumber &&
item.batch == batch &&
item.inventoryStatus == inventoryStatus) {
return item;
}
})
if (itemEditInfo == undefined) {
//
this.addExistItemCodeToList(detail);
} 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) {
this.showErrorMessage(e.message)
}
},
addNewItemCodeToList() { addNewItemCodeToList() {
this.$refs.comMessage.showQuestionMessage("物料[" + this.package.itemCode + "]不在列表中,是否添加到列表?", this.$refs.comMessage.showQuestionMessage("物料[" + this.package.itemCode + "]不在列表中,是否添加到列表?",
res => { res => {
@ -540,15 +448,17 @@
}, },
addExistItemCodeToList(detail, qty, inventoryStatus) { addExistItemCodeToList(detail, qty, inventoryStatus) {
this.$refs.comMessage.showQuestionMessage("盘点明细不在列表中,是否添加到列表?", let that = this;
that.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage("盘点结果不在明细列表中,是否添加到列表?",
res => { res => {
if (res) { if (res) {
detail.qty = calc.add(qty, qty) detail.qty = calc.add(qty, qty)
let newDetail = this.createAddDetailInfo(qty, inventoryStatus); // let newDetail = that.createAddDetailInfo(qty, inventoryStatus); //
detail.subList.push(newDetail); detail.subList.push(newDetail);
this.updateData() that.updateData()
} }
that.scanPopupGetFocus();
}) })
}, },

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.178:12080/admin-api", "value": "http://192.168.0.158:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.176:12080/admin-api", "chefang": "http://192.168.0.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save