|
@ -38,7 +38,8 @@ |
|
|
</view> |
|
|
</view> |
|
|
<win-scan-container ref="scanContainer" title="器具" @getContainer='getContainer'></win-scan-container> |
|
|
<win-scan-container ref="scanContainer" title="器具" @getContainer='getContainer'></win-scan-container> |
|
|
<win-scan-location ref="scanLocationPopup" title="来源库位" @getLocation="getFromLocation"></win-scan-location> |
|
|
<win-scan-location ref="scanLocationPopup" title="来源库位" @getLocation="getFromLocation"></win-scan-location> |
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false"></win-scan-pack-and-location> |
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false"> |
|
|
|
|
|
</win-scan-pack-and-location> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -142,8 +143,8 @@ |
|
|
getContainerDetailByNumber(this.containerCode).then(res => { |
|
|
getContainerDetailByNumber(this.containerCode).then(res => { |
|
|
if (res.data != null && res.data.subList.length > 0) { |
|
|
if (res.data != null && res.data.subList.length > 0) { |
|
|
this.detailSource = this.getDataSource(res.data.subList) |
|
|
this.detailSource = this.getDataSource(res.data.subList) |
|
|
this.showScanLocation(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
this.showScanLocation(); |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
this.showErrorMessage(error.message) |
|
|
this.showErrorMessage(error.message) |
|
|
}) |
|
|
}) |
|
@ -167,15 +168,24 @@ |
|
|
var qty = result.label.qty; |
|
|
var qty = result.label.qty; |
|
|
var itemCode = result.label.itemCode; |
|
|
var itemCode = result.label.itemCode; |
|
|
|
|
|
|
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
|
var item = this.detailSource.find(r => r.itemCode == itemCode); |
|
|
if (detail == undefined) { |
|
|
if (item == undefined) { |
|
|
this.showMessage("绑定物料【" + itemCode + "】与现有物料不一致,不可以绑定"); |
|
|
|
|
|
|
|
|
if (this.detailSource.length == 0) { |
|
|
|
|
|
item = this.createItemInfo(result.label); |
|
|
|
|
|
let itemDetail = result.balance; |
|
|
|
|
|
itemDetail.scaned = true; |
|
|
|
|
|
item.subList.push(itemDetail); |
|
|
|
|
|
this.detailSource.push(item); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showMessage("绑定物料【" + itemCode + "】与现有物料不一致,不可以绑定"); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); |
|
|
var itemDetail = item.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); |
|
|
if (itemDetail == undefined) { |
|
|
if (itemDetail == undefined) { |
|
|
itemDetail = result.balance; |
|
|
itemDetail = result.balance; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
detail.subList.push(itemDetail); |
|
|
item.subList.push(itemDetail); |
|
|
} else { |
|
|
} else { |
|
|
if (itemDetail.scaned) { |
|
|
if (itemDetail.scaned) { |
|
|
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】已经扫描") |
|
|
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】已经扫描") |
|
@ -266,7 +276,7 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openScanPopup() { |
|
|
openScanPopup() { |
|
|
if (this.fromLocationInfo != null) { |
|
|
if (this.fromLocationInfo.code != undefined) { |
|
|
this.$refs.scanPopup.openScanPopupForType(this.fromLocationInfo.code, this.businessType); |
|
|
this.$refs.scanPopup.openScanPopupForType(this.fromLocationInfo.code, this.businessType); |
|
|
} else { |
|
|
} else { |
|
|
this.showScanLocation(); |
|
|
this.showScanLocation(); |
|
|