|
|
@ -35,11 +35,11 @@ |
|
|
|
<win-scan-button @goScan='showPopup'></win-scan-button> |
|
|
|
</view> |
|
|
|
<!-- 合格转隔离单独的弹窗--> |
|
|
|
<okToHoldRecordPack ref="okToHoldRecordPackRef" :showOnePop='showOnePop' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg' @clickBtnClearFromLocation='clearFromLocation' @clickBtnClearItemCode='clearItemCode'></okToHoldRecordPack> |
|
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' @clearItemCode='clearItemCode' :title="'箱码'" > |
|
|
|
<okToHoldRecordPack ref="okToHoldRecordPackRef" :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> |
|
|
|
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation' |
|
|
|
:locationAreaTypeList="fromLocationAreaTypeList" @clearFromLocation='clearFromLocation'></win-scan-location> |
|
|
|
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -80,6 +80,8 @@ |
|
|
|
createItemInfo, |
|
|
|
createDetailInfo, |
|
|
|
calcHandleQty, |
|
|
|
createItemInfoForLabel, |
|
|
|
createDetailInfoForLabel |
|
|
|
} from '@/common/record.js'; |
|
|
|
|
|
|
|
import { |
|
|
@ -147,6 +149,7 @@ |
|
|
|
fromLocationAreaTypeList: [], |
|
|
|
toLocationAreaTypeList: [], |
|
|
|
isShowEditLocation: false, |
|
|
|
isJustReplay:true,//是否只是回显,不走库存余额接口 |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -233,7 +236,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
openScanPopup() { |
|
|
|
|
|
|
|
this.isJustReplay = true |
|
|
|
if (this.fromLocationCode == "") { |
|
|
|
this.showFromLocationPopup(); |
|
|
|
return |
|
|
@ -275,12 +278,14 @@ |
|
|
|
getScanResult(result,managementTypeParams) { |
|
|
|
this.managementType = managementTypeParams |
|
|
|
if(this.showOnePop){ |
|
|
|
this.$refs.okToHoldRecordPackRef.itemCode= result.balance.itemCode |
|
|
|
this.$refs.okToHoldRecordPackRef.batch = result.label.batch |
|
|
|
this.getResult = result//存储接受的结果 |
|
|
|
this.$refs.scanPopup.closeScanPopup() |
|
|
|
console.log(11,result) |
|
|
|
|
|
|
|
if(this.isJustReplay){ |
|
|
|
this.$refs.okToHoldRecordPackRef.itemCode= result.label.itemCode |
|
|
|
this.$refs.okToHoldRecordPackRef.batch = result.label.batch |
|
|
|
this.getResult = result//存储接受的结果 |
|
|
|
this.$refs.scanPopup.closeScanPopup() |
|
|
|
}else{ |
|
|
|
this.getScanResultAfterBatch(result,managementTypeParams) |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ |
|
|
|
this.getScanResultAfterBatch(result,managementTypeParams) |
|
|
@ -293,21 +298,27 @@ |
|
|
|
okToHoldRecordPackConfirm(obj){ |
|
|
|
// this.getResult. = result//存储接受的结果 |
|
|
|
if(!obj.fromLocationCode){ |
|
|
|
this.$refs.comMessage.showErrorMessage('请选择来源库位'); |
|
|
|
this.$refs.comMessage.showErrorMessage('请输入来源库位'); |
|
|
|
return; |
|
|
|
} |
|
|
|
if(!obj.itemCode){ |
|
|
|
this.$refs.comMessage.showErrorMessage('请选择零件'); |
|
|
|
this.$refs.comMessage.showErrorMessage('请输入零件'); |
|
|
|
return; |
|
|
|
} |
|
|
|
if(!obj.handleQty){ |
|
|
|
this.$refs.comMessage.showErrorMessage('请输入数量'); |
|
|
|
return; |
|
|
|
} |
|
|
|
// this.getResult.fromLocationCode = obj.fromLocationCode |
|
|
|
this.getResult.label.batch = obj.handleQty |
|
|
|
this.getResult = this.getResult ? this.getResult : { |
|
|
|
label:{}, |
|
|
|
fromLocationCode:'' |
|
|
|
} |
|
|
|
this.getResult.fromLocationCode = obj.fromLocationCode |
|
|
|
this.getResult.label.itemCode = obj.itemCode |
|
|
|
this.getResult.label.batch = obj.batch |
|
|
|
this.getResult.label.qty = obj.handleQty |
|
|
|
this.getScanResultAfterBatch(this.getResult,this.managementType) |
|
|
|
this.isJustReplay=false |
|
|
|
this.$refs.scanPopup.getScanResult(this.getResult,this.businessType) |
|
|
|
}, |
|
|
|
getScanResultAfter(result){ |
|
|
|
var balance = result.balance; |
|
|
@ -379,12 +390,12 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
if (item == undefined) { |
|
|
|
var itemp = createItemInfo(balance, pack); |
|
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
|
var itemp = createItemInfoForLabel(balance, result.label); |
|
|
|
let newDetail = createDetailInfoForLabel(balance, pack, result.label); |
|
|
|
|
|
|
|
if (newDetail.packingNumber == '') { |
|
|
|
newDetail.packingNumber = pack.number; |
|
|
|
} |
|
|
|
// if (newDetail.packingNumber == '') { |
|
|
|
// newDetail.packingNumber = pack.number; |
|
|
|
// } |
|
|
|
|
|
|
|
if (this.businessTypeCode == "Move") { |
|
|
|
newDetail.toInventoryStatus = balance.inventoryStatus; |
|
|
@ -413,7 +424,7 @@ |
|
|
|
}) |
|
|
|
}else if(managementTypeParams == 'BY_BATCH'){ |
|
|
|
detail = item.subList.find(r => { |
|
|
|
if (r.batch == pack.batch && |
|
|
|
if (r.batch == result.label.batch && |
|
|
|
r.fromLocationCode == balance.locationCode && |
|
|
|
r.scaned == true) { |
|
|
|
return r; |
|
|
@ -463,14 +474,14 @@ |
|
|
|
// 清除来源库位 |
|
|
|
clearFromLocation(fromLocationCodeParams){ |
|
|
|
this.$refs.okToHoldRecordPackRef.fromLocationCode = '' |
|
|
|
this.$refs.okToHoldRecordPackRef.itemCode ='' |
|
|
|
this.$refs.okToHoldRecordPackRef.batch ='' |
|
|
|
// this.$refs.okToHoldRecordPackRef.itemCode ='' |
|
|
|
// this.$refs.okToHoldRecordPackRef.batch ='' |
|
|
|
// this.isClearFromLocationCode = true |
|
|
|
}, |
|
|
|
// 清除批次和物料 |
|
|
|
clearItemCode(label){ |
|
|
|
this.$refs.okToHoldRecordPackRef.itemCode ='' |
|
|
|
this.$refs.okToHoldRecordPackRef.batch ='' |
|
|
|
// this.$refs.okToHoldRecordPackRef.batch ='' |
|
|
|
}, |
|
|
|
|
|
|
|
showErrorMessage(message) { |
|
|
@ -632,6 +643,7 @@ |
|
|
|
setParams() { |
|
|
|
var subList = [] |
|
|
|
var creator = this.$store.state.user.id |
|
|
|
console.log(233,this.detailSource) |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(detail => { |
|
|
|
if (detail.scaned) { |
|
|
@ -639,9 +651,9 @@ |
|
|
|
detail.packingNumber, detail.toLocationCode, detail.batch); |
|
|
|
var submitItem = deepCopyData(detail) |
|
|
|
submitItem.itemCode = detail.itemCode; |
|
|
|
submitItem.itemName = detail.package.itemName; |
|
|
|
submitItem.itemDesc1 = detail.package.itemDesc1; |
|
|
|
submitItem.itemDesc2 = detail.package.itemDesc2; |
|
|
|
submitItem.itemName = detail.itemName; |
|
|
|
submitItem.itemDesc1 = detail.itemDesc1; |
|
|
|
submitItem.itemDesc2 = detail.itemDesc2; |
|
|
|
|
|
|
|
submitItem.fromInventoryStatus = detail.inventoryStatus; |
|
|
|
submitItem.toInventoryStatus = detail.toInventoryStatus; |
|
|
|