|
@ -35,7 +35,7 @@ |
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
</view> |
|
|
</view> |
|
|
<!-- 合格转隔离单独的弹窗--> |
|
|
<!-- 合格转隔离单独的弹窗--> |
|
|
<okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @fromLocationBlur="fromLocationBlur"></okToHoldRecordPack> |
|
|
<okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg'></okToHoldRecordPack> |
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'" > |
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'" > |
|
|
</win-scan-pack-and-location> |
|
|
</win-scan-pack-and-location> |
|
|
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation' |
|
|
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation' |
|
@ -296,7 +296,7 @@ |
|
|
// this.getResult.fromLocationCode = obj.fromLocationCode |
|
|
// this.getResult.fromLocationCode = obj.fromLocationCode |
|
|
this.getResult.label.batch = obj.handleQty |
|
|
this.getResult.label.batch = obj.handleQty |
|
|
this.getResult.label.qty = obj.handleQty |
|
|
this.getResult.label.qty = obj.handleQty |
|
|
this.getScanResultAfterBatchOnePop(this.getResult) |
|
|
this.getScanResultAfterBatch(this.getResult) |
|
|
}, |
|
|
}, |
|
|
getScanResultAfter(result){ |
|
|
getScanResultAfter(result){ |
|
|
var balance = result.balance; |
|
|
var balance = result.balance; |
|
@ -382,9 +382,12 @@ |
|
|
} |
|
|
} |
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
newDetail.fromLocationCode = result.fromLocationCode |
|
|
newDetail.fromLocationCode = result.fromLocationCode |
|
|
|
|
|
newDetail.handleQty = Number(result.label.qty) |
|
|
itemp.subList.push(newDetail); |
|
|
itemp.subList.push(newDetail); |
|
|
this.detailSource.push(itemp) |
|
|
this.detailSource.push(itemp) |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
console.log(233,this.detailSource) |
|
|
|
|
|
console.log(988,balance.inventoryStatus) |
|
|
var detail = item.subList.find(r => { |
|
|
var detail = item.subList.find(r => { |
|
|
if (r.batch == pack.batch && |
|
|
if (r.batch == pack.batch && |
|
|
r.fromLocationCode == balance.locationCode && |
|
|
r.fromLocationCode == balance.locationCode && |
|
@ -393,68 +396,6 @@ |
|
|
return r; |
|
|
return r; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
if (detail == undefined) { |
|
|
|
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
|
|
|
// newDetail.inventoryStatus = balance.inventoryStatus; |
|
|
|
|
|
if (this.businessTypeCode == "Move") { |
|
|
|
|
|
newDetail.toInventoryStatus = balance.inventoryStatus; |
|
|
|
|
|
} else { |
|
|
|
|
|
newDetail.toInventoryStatus = this.toInventoryStatus; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (newDetail.packingNumber == '') { |
|
|
|
|
|
newDetail.packingNumber = pack.number; |
|
|
|
|
|
} |
|
|
|
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
|
|
|
newDetail.fromLocationCode = result.fromLocationCode |
|
|
|
|
|
item.subList.push(newDetail); |
|
|
|
|
|
} else { |
|
|
|
|
|
detail.handleQty =calc.add(detail.handleQty, result.label.qty) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
calcHandleQty(this.detailSource); |
|
|
|
|
|
}, |
|
|
|
|
|
getScanResultAfterBatchOnePop(result){ |
|
|
|
|
|
var balance = result.balance; |
|
|
|
|
|
this.balanceInfo = result.balance; |
|
|
|
|
|
var pack = result.package; |
|
|
|
|
|
var item = this.detailSource.find(res => { |
|
|
|
|
|
if (res.itemCode == balance.itemCode) { |
|
|
|
|
|
return res |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if (item == undefined) { |
|
|
|
|
|
var itemp = createItemInfo(balance, pack); |
|
|
|
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
|
|
|
|
|
|
|
|
|
if (newDetail.packingNumber == '') { |
|
|
|
|
|
newDetail.packingNumber = pack.number; |
|
|
|
|
|
} |
|
|
|
|
|
if (this.businessTypeCode == "Move") { |
|
|
|
|
|
newDetail.toInventoryStatus = balance.inventoryStatus; |
|
|
|
|
|
} else { |
|
|
|
|
|
newDetail.toInventoryStatus = this.toInventoryStatus; |
|
|
|
|
|
} |
|
|
|
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
|
|
|
newDetail.fromLocationCode = result.fromLocationCode |
|
|
|
|
|
itemp.subList.push(newDetail); |
|
|
|
|
|
this.detailSource.push(itemp) |
|
|
|
|
|
} else { |
|
|
|
|
|
if( balance.inventoryStatus != this.toInventoryStatus){ |
|
|
|
|
|
this.showErrorMessage("库存状态的库存") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
var detail = item.subList.find(r => { |
|
|
|
|
|
if (r.batch == pack.batch && |
|
|
|
|
|
r.fromLocationCode == balance.locationCode && |
|
|
|
|
|
r.toInventoryStatus == balance.inventoryStatus && |
|
|
|
|
|
r.scaned == true) { |
|
|
|
|
|
return r; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(2333,detail) |
|
|
|
|
|
|
|
|
|
|
|
if (detail == undefined) { |
|
|
if (detail == undefined) { |
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
// newDetail.inventoryStatus = balance.inventoryStatus; |
|
|
// newDetail.inventoryStatus = balance.inventoryStatus; |
|
@ -476,10 +417,14 @@ |
|
|
} |
|
|
} |
|
|
calcHandleQty(this.detailSource); |
|
|
calcHandleQty(this.detailSource); |
|
|
}, |
|
|
}, |
|
|
fromLocationBlur(result){ |
|
|
getInputMsgResult(result){ |
|
|
console.log('pooo',result) |
|
|
console.log('pooo',result) |
|
|
|
|
|
if(!this.fromLocationCode){ |
|
|
this.$refs.scanFromLocationCode.getScanResult(result) |
|
|
this.$refs.scanFromLocationCode.getScanResult(result) |
|
|
// this.$refs.scanPopup. |
|
|
}else{ |
|
|
|
|
|
result.fromLocationCode = this.fromLocationCode |
|
|
|
|
|
this.$refs.scanPopup.getScanResult(result) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
showErrorMessage(message) { |
|
|
showErrorMessage(message) { |
|
|
if (this.$refs.scanPopup) { |
|
|
if (this.$refs.scanPopup) { |
|
|