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