|
@ -34,6 +34,8 @@ |
|
|
</view> |
|
|
</view> |
|
|
<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'></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' |
|
@ -50,6 +52,7 @@ |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
|
|
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
|
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|
|
|
|
|
import okToHoldRecordPack from '@/pages/inventoryMove/coms/okToHoldRecordPack.vue' |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getInventoryStatusName |
|
|
getInventoryStatusName |
|
@ -92,6 +95,7 @@ |
|
|
comBlankView, |
|
|
comBlankView, |
|
|
winScanLocation, |
|
|
winScanLocation, |
|
|
winScanPackAndLocation, |
|
|
winScanPackAndLocation, |
|
|
|
|
|
okToHoldRecordPack |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
// fromInventoryStatus: { |
|
|
// fromInventoryStatus: { |
|
@ -122,6 +126,11 @@ |
|
|
type: String, |
|
|
type: String, |
|
|
default: "" |
|
|
default: "" |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 是否显示第一层弹窗 |
|
|
|
|
|
showOnePop: { |
|
|
|
|
|
type: Boolean, |
|
|
|
|
|
default: false |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -137,7 +146,9 @@ |
|
|
dataContent: {}, |
|
|
dataContent: {}, |
|
|
fromLocationAreaTypeList: [], |
|
|
fromLocationAreaTypeList: [], |
|
|
toLocationAreaTypeList: [], |
|
|
toLocationAreaTypeList: [], |
|
|
isShowEditLocation: false |
|
|
isShowEditLocation: false, |
|
|
|
|
|
itemCode:'', |
|
|
|
|
|
batch:'', |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -147,7 +158,13 @@ |
|
|
this.businessType = res.businessType; |
|
|
this.businessType = res.businessType; |
|
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; |
|
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; |
|
|
this.toLocationAreaTypeList = res.toLocationAreaTypeList; |
|
|
this.toLocationAreaTypeList = res.toLocationAreaTypeList; |
|
|
this.showFromLocationPopup(); |
|
|
if(this.showOnePop){ |
|
|
|
|
|
console.log(this.$refs.okToHoldRecordPackRef) |
|
|
|
|
|
this.$refs.okToHoldRecordPackRef.show = true |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
this.showFromLocationPopup(); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage(res.message) |
|
|
this.showErrorMessage(res.message) |
|
|
} |
|
|
} |
|
@ -237,18 +254,49 @@ |
|
|
getFromLocation(location) { |
|
|
getFromLocation(location) { |
|
|
this.fromLocationCode = location.code; |
|
|
this.fromLocationCode = location.code; |
|
|
this.fromLocationInfo = location; |
|
|
this.fromLocationInfo = location; |
|
|
this.openScanPopup(); |
|
|
if(!this.showOnePop){ |
|
|
|
|
|
this.openScanPopup(); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
getToLocation(location, code) { |
|
|
getToLocation(location, code) { |
|
|
this.toLocationCode = code; |
|
|
this.toLocationCode = code; |
|
|
this.toLocationInfo = location; |
|
|
this.toLocationInfo = location; |
|
|
}, |
|
|
}, |
|
|
getScanResult(result,managementType) { |
|
|
getScanResult(result,managementType) { |
|
|
if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){ |
|
|
console.log(result) |
|
|
this.getScanResultAfterBatch(result) |
|
|
if(this.showOnePop){ |
|
|
|
|
|
this.itemCode= result.label.itemCode |
|
|
|
|
|
this.batch = result.label.batch |
|
|
|
|
|
this.getResult = result//存储接受的结果 |
|
|
|
|
|
this.$refs.scanPopup.closeScanPopup() |
|
|
|
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
this.getScanResultAfter(result) |
|
|
if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){ |
|
|
|
|
|
this.getScanResultAfterBatch(result) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.getScanResultAfter(result) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
okToHoldRecordPackConfirm(obj){ |
|
|
|
|
|
// this.getResult. = result//存储接受的结果 |
|
|
|
|
|
if(!obj.fromLocationCode){ |
|
|
|
|
|
this.$refs.comMessage.showErrorMessage('请选择来源库位'); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if(!obj.itemCode){ |
|
|
|
|
|
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.label.qty = obj.handleQty |
|
|
|
|
|
this.getScanResultAfterBatchOnePop(this.getResult) |
|
|
}, |
|
|
}, |
|
|
getScanResultAfter(result){ |
|
|
getScanResultAfter(result){ |
|
|
var balance = result.balance; |
|
|
var balance = result.balance; |
|
@ -367,6 +415,68 @@ |
|
|
} |
|
|
} |
|
|
calcHandleQty(this.detailSource); |
|
|
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) { |
|
|
|
|
|
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); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
showErrorMessage(message) { |
|
|
showErrorMessage(message) { |
|
|
if (this.$refs.scanPopup) { |
|
|
if (this.$refs.scanPopup) { |
|
|
this.$refs.scanPopup.packLoseFocus() |
|
|
this.$refs.scanPopup.packLoseFocus() |
|
|