|
@ -35,7 +35,7 @@ |
|
|
<win-scan-button @goScan='showFromLocationPopup'></win-scan-button> |
|
|
<win-scan-button @goScan='showFromLocationPopup'></win-scan-button> |
|
|
</view> |
|
|
</view> |
|
|
<!-- 合格转隔离单独的弹窗--> |
|
|
<!-- 合格转隔离单独的弹窗--> |
|
|
<okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' :isClearFromLocationCode='isClearFromLocationCode' :isClearItemCode='isClearItemCode' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg'></okToHoldRecordPack> |
|
|
<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="'箱码'" > |
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' @clearItemCode='clearItemCode' :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' |
|
@ -147,10 +147,6 @@ |
|
|
fromLocationAreaTypeList: [], |
|
|
fromLocationAreaTypeList: [], |
|
|
toLocationAreaTypeList: [], |
|
|
toLocationAreaTypeList: [], |
|
|
isShowEditLocation: false, |
|
|
isShowEditLocation: false, |
|
|
itemCode:'', |
|
|
|
|
|
batch:'', |
|
|
|
|
|
isClearFromLocationCode:false,//是否清除输入框的来源库位 |
|
|
|
|
|
isClearItemCode:false,//是否清除输入框的零件和批次 |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -247,7 +243,12 @@ |
|
|
showFromLocationPopup() { |
|
|
showFromLocationPopup() { |
|
|
setTimeout(()=>{ |
|
|
setTimeout(()=>{ |
|
|
if(this.showOnePop){ |
|
|
if(this.showOnePop){ |
|
|
|
|
|
this.$refs.okToHoldRecordPackRef.fromLocationCode = '' |
|
|
|
|
|
this.$refs.okToHoldRecordPackRef.itemCode = '' |
|
|
|
|
|
this.$refs.okToHoldRecordPackRef.batch = '' |
|
|
|
|
|
this.$refs.okToHoldRecordPackRef.handleQty = 0 |
|
|
this.$refs.okToHoldRecordPackRef.showOne = true |
|
|
this.$refs.okToHoldRecordPackRef.showOne = true |
|
|
|
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
this.$refs.scanFromLocationCode.openScanPopup(); |
|
|
this.$refs.scanFromLocationCode.openScanPopup(); |
|
|
} |
|
|
} |
|
@ -267,20 +268,19 @@ |
|
|
this.toLocationCode = code; |
|
|
this.toLocationCode = code; |
|
|
this.toLocationInfo = location; |
|
|
this.toLocationInfo = location; |
|
|
}, |
|
|
}, |
|
|
getScanResult(result,managementType) { |
|
|
getScanResult(result,managementTypeParams) { |
|
|
|
|
|
this.managementType = managementTypeParams |
|
|
if(this.showOnePop){ |
|
|
if(this.showOnePop){ |
|
|
this.itemCode= result.balance.itemCode |
|
|
this.$refs.okToHoldRecordPackRef.itemCode= result.balance.itemCode |
|
|
this.batch = result.balance.batch |
|
|
this.$refs.okToHoldRecordPackRef.batch = result.balance.batch |
|
|
this.isClearItemCode = false |
|
|
|
|
|
debugger |
|
|
|
|
|
this.getResult = result//存储接受的结果 |
|
|
this.getResult = result//存储接受的结果 |
|
|
this.$refs.scanPopup.closeScanPopup() |
|
|
this.$refs.scanPopup.closeScanPopup() |
|
|
|
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){ |
|
|
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ |
|
|
this.getScanResultAfterBatch(result) |
|
|
this.getScanResultAfterBatch(result,managementTypeParams) |
|
|
}else{ |
|
|
}else{ |
|
|
this.getScanResultAfter(result) |
|
|
this.getScanResultAfter(result,managementTypeParams) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -302,7 +302,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.getScanResultAfterBatch(this.getResult) |
|
|
this.getScanResultAfterBatch(this.getResult,this.managementType) |
|
|
}, |
|
|
}, |
|
|
getScanResultAfter(result){ |
|
|
getScanResultAfter(result){ |
|
|
var balance = result.balance; |
|
|
var balance = result.balance; |
|
@ -364,7 +364,7 @@ |
|
|
} |
|
|
} |
|
|
calcHandleQty(this.detailSource); |
|
|
calcHandleQty(this.detailSource); |
|
|
}, |
|
|
}, |
|
|
getScanResultAfterBatch(result){ |
|
|
getScanResultAfterBatch(result,managementTypeParams){ |
|
|
var balance = result.balance; |
|
|
var balance = result.balance; |
|
|
this.balanceInfo = result.balance; |
|
|
this.balanceInfo = result.balance; |
|
|
var pack = result.package; |
|
|
var pack = result.package; |
|
@ -387,18 +387,31 @@ |
|
|
newDetail.toInventoryStatus = this.toInventoryStatus; |
|
|
newDetail.toInventoryStatus = this.toInventoryStatus; |
|
|
} |
|
|
} |
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
|
|
|
newDetail.managementTypeParams = managementTypeParams; |
|
|
newDetail.fromLocationCode = result.fromLocationCode |
|
|
newDetail.fromLocationCode = result.fromLocationCode |
|
|
newDetail.handleQty = Number(result.label.qty) |
|
|
newDetail.handleQty = Number(result.label.qty) |
|
|
itemp.subList.push(newDetail); |
|
|
itemp.subList.push(newDetail); |
|
|
this.detailSource.push(itemp) |
|
|
this.detailSource.push(itemp) |
|
|
} else { |
|
|
} else { |
|
|
var detail = item.subList.find(r => { |
|
|
var detail = '' |
|
|
|
|
|
console.log(9988,managementTypeParams) |
|
|
|
|
|
if(managementTypeParams == 'BY_QUANTITY'){ |
|
|
|
|
|
detail = item.subList.find(r => { |
|
|
|
|
|
if (r.fromLocationCode == balance.locationCode && |
|
|
|
|
|
r.scaned == true) { |
|
|
|
|
|
return r; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}else if(managementTypeParams == 'BY_BATCH'){ |
|
|
|
|
|
detail = item.subList.find(r => { |
|
|
if (r.batch == pack.batch && |
|
|
if (r.batch == pack.batch && |
|
|
r.fromLocationCode == balance.locationCode && |
|
|
r.fromLocationCode == balance.locationCode && |
|
|
r.scaned == true) { |
|
|
r.scaned == true) { |
|
|
return r; |
|
|
return r; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
console.log(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; |
|
@ -412,12 +425,15 @@ |
|
|
newDetail.packingNumber = pack.number; |
|
|
newDetail.packingNumber = pack.number; |
|
|
} |
|
|
} |
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
newDetail.toLocationCode = this.toLocationCode; |
|
|
|
|
|
newDetail.managementTypeParams = managementTypeParams; |
|
|
newDetail.fromLocationCode = result.fromLocationCode |
|
|
newDetail.fromLocationCode = result.fromLocationCode |
|
|
item.subList.push(newDetail); |
|
|
item.subList.push(newDetail); |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
console.log(999,detail.handleQty) |
|
|
detail.handleQty =calc.add(detail.handleQty, result.label.qty) |
|
|
detail.handleQty =calc.add(detail.handleQty, result.label.qty) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
calcHandleQty(this.detailSource); |
|
|
calcHandleQty(this.detailSource); |
|
|
}, |
|
|
}, |
|
|
getInputMsgResult(result,fromWitch){ |
|
|
getInputMsgResult(result,fromWitch){ |
|
@ -426,17 +442,17 @@ |
|
|
}, |
|
|
}, |
|
|
// 清除来源库位 |
|
|
// 清除来源库位 |
|
|
clearFromLocation(fromLocationCodeParams){ |
|
|
clearFromLocation(fromLocationCodeParams){ |
|
|
this.fromLocationCode = fromLocationCodeParams |
|
|
this.$refs.okToHoldRecordPackRef.fromLocationCode = '' |
|
|
this.itemCode ='' |
|
|
this.$refs.okToHoldRecordPackRef.itemCode ='' |
|
|
this.batch ='' |
|
|
this.$refs.okToHoldRecordPackRef.batch ='' |
|
|
this.isClearFromLocationCode = true |
|
|
// this.isClearFromLocationCode = true |
|
|
}, |
|
|
}, |
|
|
// 清除零件 |
|
|
// 清除批次和物料 |
|
|
clearItemCode(label){ |
|
|
clearItemCode(label){ |
|
|
this.itemCode = label.itemCode |
|
|
this.$refs.okToHoldRecordPackRef.itemCode ='' |
|
|
this.batch ='' |
|
|
this.$refs.okToHoldRecordPackRef.batch ='' |
|
|
this.isClearItemCode = true |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showErrorMessage(message) { |
|
|
showErrorMessage(message) { |
|
|
if (this.$refs.scanPopup) { |
|
|
if (this.$refs.scanPopup) { |
|
|
this.$refs.scanPopup.packLoseFocus() |
|
|
this.$refs.scanPopup.packLoseFocus() |
|
@ -547,7 +563,12 @@ |
|
|
} |
|
|
} |
|
|
// if(this.balanceInfo) |
|
|
// if(this.balanceInfo) |
|
|
console.log("提交" ,params) |
|
|
console.log("提交" ,params) |
|
|
|
|
|
let obj = params.subList.find(item=>item.balanceQty < item.handleQty) |
|
|
|
|
|
if(obj){ |
|
|
|
|
|
this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']') |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
inventoryMoveRecordSubmit(params).then(res => { |
|
|
inventoryMoveRecordSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|