Browse Source

修改计划外出入库

lijuncheng0816
lijuncheng 3 months ago
parent
commit
c078fb5ca1
  1. 15
      src/pages/scrap/request/scrapRequestCreate.vue
  2. 20
      src/pages/unPlanned/record/issueRecord.vue
  3. 17
      src/pages/unPlanned/record/receiptRecord.vue
  4. 21
      src/pages/unPlanned/request/issueRequestCreate.vue

15
src/pages/scrap/request/scrapRequestCreate.vue

@ -159,6 +159,7 @@
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.scanPopupGetFocus()
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
@ -171,6 +172,7 @@
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
this.scanPopupGetFocus()
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描")
@ -185,7 +187,7 @@
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus()
} }
}); });
}, },
@ -231,8 +233,8 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.packGetFocus();
} }
}, },
@ -292,13 +294,6 @@
if (res) {} if (res) {}
}); });
}, },
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) { showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message); this.$refs.comMessage.showScanMessage(message);

20
src/pages/unPlanned/record/issueRecord.vue

@ -154,12 +154,13 @@
// newDetail.inventoryStatus ="OK"; // newDetail.inventoryStatus ="OK";
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.packGetFocus()
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == result.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == result.batch && r.batch == balance.batch &&
r.locationCode == result.locationCode && r.locationCode == balance.locationCode &&
r.inventoryStatus == result.inventoryStatus && r.inventoryStatus == balance.inventoryStatus &&
r.scaned == true) { r.scaned == true) {
return r; return r;
} }
@ -168,14 +169,21 @@
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
this.packGetFocus()
} else { } else {
this.showErrorMessage(result.packingNumber + "重复扫描") this.showErrorMessage("箱码[" + balance.packingNumber + "]批次[" + balance.batch + "]已经扫描")
} }
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
packGetFocus(){
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
},
calcHandleQty() { calcHandleQty() {
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
this.$forceUpdate(); this.$forceUpdate();
@ -184,7 +192,7 @@
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.packGetFocus()
} }
}); });
}, },

17
src/pages/unPlanned/record/receiptRecord.vue

@ -144,10 +144,12 @@
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.getfocus()
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == result.number && if (r.packingNumber == pack.number &&
r.batch == result.batch) { r.batch == pack.batch) {
return r; return r;
} }
}) })
@ -155,9 +157,10 @@
if (detail == undefined) { if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
this.getfocus()
} else { } else {
if (detail.scaned) { if (detail.scaned) {
this.showErrorMessage("箱码[" + result.Number + "]批次[" + result.batch + "]已经扫描") this.showErrorMessage("箱码[" + pack.number + "]批次[" + pack.batch + "]已经扫描")
} }
} }
@ -166,6 +169,12 @@
}, },
getfocus(){
if(this.$refs.scanPopup){
this.$refs.scanPopup.getfocus()
}
},
createItemInfo(label, pack) { createItemInfo(label, pack) {
let item = { let item = {
itemCode: pack.itemCode, itemCode: pack.itemCode,
@ -213,7 +222,7 @@
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.getfocus()
} }
}); });
}, },

21
src/pages/unPlanned/request/issueRequestCreate.vue

@ -166,12 +166,13 @@
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.packGetFocus()
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == result.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == result.batch && r.batch == balance.batch &&
r.locationCode == result.locationCode && r.locationCode == balance.locationCode &&
r.inventoryStatus == result.inventoryStatus && r.inventoryStatus == balance.inventoryStatus &&
r.scaned == true) { r.scaned == true) {
return r; return r;
} }
@ -180,13 +181,21 @@
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
this.packGetFocus()
} else { } else {
this.showErrorMessage(result.packingNumber + "重复扫描") this.showErrorMessage("包装["+balance.packingNumber+"]"+"批次["+balance.batch+"]" + "重复扫描")
} }
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
packGetFocus(){
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
},
calcHandleQty() { calcHandleQty() {
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
@ -196,7 +205,7 @@
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.packGetFocus()
} }
}); });
}, },

Loading…
Cancel
Save