|
|
@ -45,9 +45,9 @@ |
|
|
|
</view> |
|
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode"> |
|
|
|
</winComScanBalance> |
|
|
|
<win-scan-package ref="scanPopup" @getResult='getScanResult'></win-scan-package> |
|
|
|
<!-- <winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode"> |
|
|
|
</winComScanBalance> --> |
|
|
|
<!-- <balanceQuery ref="refBalanceQuery"></balanceQuery> --> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
</view> |
|
|
@ -100,7 +100,7 @@ |
|
|
|
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' |
|
|
|
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' |
|
|
|
// import balanceQuery from '@/mycomponents/query/balanceQuery.vue' |
|
|
|
|
|
|
|
import winScanPackage from '@/mycomponents/scan/winScanPackage.vue' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
@ -114,6 +114,7 @@ |
|
|
|
recordDetailCard, |
|
|
|
balanceSelect, |
|
|
|
winComScanBalance, |
|
|
|
winScanPackage |
|
|
|
// balanceQuery |
|
|
|
}, |
|
|
|
data() { |
|
|
@ -181,7 +182,6 @@ |
|
|
|
// showDrawer() { |
|
|
|
// this.$refs.showRight.open(); |
|
|
|
// }, |
|
|
|
|
|
|
|
getBusinessType() { |
|
|
|
getBusinessType(this.businessTypeCode, res => { |
|
|
|
if (res.success) { |
|
|
@ -196,27 +196,36 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
|
// let balance = result.balance; |
|
|
|
let pack = result.package; |
|
|
|
let balance = result.balance; |
|
|
|
|
|
|
|
if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) { |
|
|
|
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this |
|
|
|
.fromLocationCode + "]没有库存余额") |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
//扫描的是子包装 |
|
|
|
if (pack.parentNumber) { |
|
|
|
this.setPackageData(result); |
|
|
|
} else { |
|
|
|
this.setContainerData(result); |
|
|
|
result.balance.forEach( |
|
|
|
b => { |
|
|
|
this.setPackageData(b,pack); |
|
|
|
} |
|
|
|
) |
|
|
|
}, |
|
|
|
|
|
|
|
setPackageData(result) { |
|
|
|
let balance = result.balance; |
|
|
|
let label = result.label; |
|
|
|
let pack = result.package; |
|
|
|
// getScanResult(result) { |
|
|
|
// let pack = result.package; |
|
|
|
// let balance = result.balance; |
|
|
|
|
|
|
|
// if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) { |
|
|
|
// this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this |
|
|
|
// .fromLocationCode + "]没有库存余额") |
|
|
|
// return; |
|
|
|
// } |
|
|
|
|
|
|
|
// //扫描的是子包装 |
|
|
|
// if (pack.parentNumber) { |
|
|
|
// this.setPackageData(result); |
|
|
|
// } else { |
|
|
|
// this.setContainerData(result); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
|
|
|
|
setPackageData(balance, pack) { |
|
|
|
// let balance = result.balance; |
|
|
|
// let pack = result.package; |
|
|
|
|
|
|
|
var item = this.detailSource.find(res => { |
|
|
|
if (res.itemCode == balance.itemCode) { |
|
|
@ -432,12 +441,18 @@ |
|
|
|
this.updateData(); |
|
|
|
}, |
|
|
|
|
|
|
|
// openScanPopup() { |
|
|
|
// if (this.businessType) { |
|
|
|
// this.$refs.scanPopup.openScanPopup(this.businessType); |
|
|
|
// } else { |
|
|
|
// this.getBusinessType() |
|
|
|
// } |
|
|
|
// }, |
|
|
|
|
|
|
|
openScanPopup() { |
|
|
|
if (this.businessType) { |
|
|
|
this.$refs.scanPopup.openScanPopup(this.businessType); |
|
|
|
} else { |
|
|
|
this.getBusinessType() |
|
|
|
} |
|
|
|
setTimeout(r => { |
|
|
|
this.$refs.scanPopup.openScanPopupByBusinessType(this.businessType); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
showFromLocationPopup() { |
|
|
|