diff --git a/src/pages/repleinsh/coms/comScanReplishPack.vue b/src/pages/repleinsh/coms/comScanReplishPack.vue index ab348a07..3596d39a 100644 --- a/src/pages/repleinsh/coms/comScanReplishPack.vue +++ b/src/pages/repleinsh/coms/comScanReplishPack.vue @@ -291,6 +291,7 @@ if (subParentPackitems.length > 0) { if(subParentPackitems.length==1){ let balance = subParentPackitems[0]; + balance.qty=packageInfo.qty; this.afterGetBalance(result.label, balance, packageInfo); }else { this.showBalanceSelect(subParentPackitems); @@ -301,8 +302,18 @@ packageInfo.number + '】都未查找到库存余额') } } else { - this.showErrorMessage('该包装【' + packageInfo.number + '】在库位【' + balances - .list[0].locationCode + + var locationCode = this.fromLocationCode + if(balances.list==1){ + locationCode=balances.list[0].locationCode + }else { + var manyBlances = balances.list.filter(r=>r.locationCode!=this.fromLocationCode) + if(manyBlances.length>0){ + locationCode = manyBlances[0].locationCode; + } + + } + this.showErrorMessage('该包装【' + packageInfo.number + '】在库位【' + + locationCode + '】已经有库存余额,请重新扫描') }