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