|
|
@ -110,6 +110,10 @@ |
|
|
|
calc |
|
|
|
} from '@/common/calc.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
uniqueArray |
|
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
getBalanceByManagementPrecision |
|
|
|
} from '@/common/balance.js'; |
|
|
@ -153,7 +157,7 @@ |
|
|
|
defaultValueList: [], |
|
|
|
label: {}, |
|
|
|
fromInventoryStatuses: "", |
|
|
|
packageInfo:{} |
|
|
|
packageInfo: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -208,7 +212,10 @@ |
|
|
|
list.push(f.fromLocationCode) |
|
|
|
}) |
|
|
|
}) |
|
|
|
//去掉重复库位 |
|
|
|
list = uniqueArray(list); |
|
|
|
this.fromLocationCode = list[0]; |
|
|
|
|
|
|
|
return list; |
|
|
|
} else { |
|
|
|
this.$refs.comMessage.showErrorMessages('需求库位【' + this.toLocationCode + '】不存在', res => { |
|
|
@ -253,7 +260,7 @@ |
|
|
|
}) |
|
|
|
|
|
|
|
this.getBalance(result.label, packageInfo, balances => { |
|
|
|
this.packageInfo =packageInfo; |
|
|
|
this.packageInfo = packageInfo; |
|
|
|
//扫描的是外包装 |
|
|
|
let s = ''; |
|
|
|
if (!result.package.parentNumber) { |
|
|
@ -282,7 +289,7 @@ |
|
|
|
//外包装库存 |
|
|
|
let subParentPackitems = balances.list.filter(r => r.packingNumber == |
|
|
|
packageInfo |
|
|
|
.parentNumber&&r.locationCode==this.fromLocationCode) |
|
|
|
.parentNumber && r.locationCode == this.fromLocationCode) |
|
|
|
|
|
|
|
|
|
|
|
//小包装没有库存, |
|
|
@ -290,11 +297,11 @@ |
|
|
|
//外包装有库存,出库后剩余库存未转换为出库包装规格 |
|
|
|
|
|
|
|
if (subParentPackitems.length > 0) { |
|
|
|
if(subParentPackitems.length==1){ |
|
|
|
if (subParentPackitems.length == 1) { |
|
|
|
let balance = subParentPackitems[0]; |
|
|
|
balance.qty=packageInfo.qty; |
|
|
|
balance.qty = packageInfo.qty; |
|
|
|
this.afterGetBalance(result.label, balance, packageInfo); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.showBalanceSelect(subParentPackitems); |
|
|
|
} |
|
|
|
|
|
|
@ -304,11 +311,12 @@ |
|
|
|
} |
|
|
|
} else { |
|
|
|
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){ |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
@ -411,7 +419,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
selectBalanceItem(balance) { |
|
|
|
this.afterGetBalance(this.label, balance,this.packageInfo); |
|
|
|
this.afterGetBalance(this.label, balance, this.packageInfo); |
|
|
|
}, |
|
|
|
|
|
|
|
afterGetBalance(label, balance, packageInfo) { |
|
|
|