Commit 3ad77478 authored by 黄媛媛's avatar 黄媛媛

修改出库扫码多次

parent 1415d361
......@@ -184,11 +184,13 @@
var scanMsg = {};
var data2 = JSON.parse(JSON.stringify(this.tableData));
this.orderNum=0;
data2.forEach(x => {
let isUpdate=false
for (let i = 0; i < data2.length; i++) {
let x = data2[i];
if ((myData.GoodsId == x.GoodsId) && (myData.SpecificationKey == x.NewSpecificationSort)) {
this.orderNum++;
if(x.nowBound<x.NewNumber){
isUpdate=true;
x.nowBound++;
this.tableData = data2;
this.scanData.unshift(myData);
......@@ -199,11 +201,14 @@
scanMsg.NewSpecificationSort = x.NewSpecificationSort;
scanMsg.StockInId = myData.StockInId;
this.sureMsg.WarehouseOutGoodsDetailList.push(scanMsg);
}else{
this.Error('超过了出库数量');
break;
}
}
})
}
console.log(this.orderNum>0 && !isUpdate)
if(this.orderNum>0 && !isUpdate){
this.Error("超过了出库数量");
}
this.getorderNum();
}else{
this.Error(res.data.data.Msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment