|
|
@ -14,7 +14,7 @@ |
|
|
|
<view class=""> |
|
|
|
<comInventoryDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData" |
|
|
|
@updateData='updateData' :locationAreaTypeList="toLocationAreaTypeList" |
|
|
|
:allowEditQty="jobContent.allowModifyQty=='TRUE'?true:false" @openDetail="openDetail"> |
|
|
|
:allowEditQty="jobContent.allowModifyQty=='TRUE'?true:false" @openDetail="openDetail" :isTestBalance='isTestBalance'> |
|
|
|
</comInventoryDetailCard> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -117,7 +117,9 @@ |
|
|
|
title: '', |
|
|
|
toLocationAreaTypeList: [], |
|
|
|
jobToLocationCode:'', |
|
|
|
deptObj:{} |
|
|
|
deptObj:{}, |
|
|
|
areaType:'', |
|
|
|
isTestBalance:'true' |
|
|
|
}; |
|
|
|
}, |
|
|
|
props: { |
|
|
@ -195,6 +197,7 @@ |
|
|
|
name = "合格转隔离"; |
|
|
|
this.toLocationCode = 'HOLD'; |
|
|
|
this.toInventoryStatus = 'HOLD'; |
|
|
|
this.isTestBalance = false |
|
|
|
} else if (this.businessTypeCode == "NokToHold") { |
|
|
|
name = "不合格转隔离"; |
|
|
|
this.toLocationCode = 'HOLD'; |
|
|
@ -297,7 +300,6 @@ |
|
|
|
|
|
|
|
calcHandleQty() { |
|
|
|
calcHandleQty(this.detailSource) |
|
|
|
console.log(this.detailSource) |
|
|
|
this.continueScan() |
|
|
|
this.$forceUpdate(); |
|
|
|
}, |
|
|
@ -327,6 +329,7 @@ |
|
|
|
|
|
|
|
getScanResult(result, managementPrecision) { |
|
|
|
this.managementType = managementPrecision |
|
|
|
this.areaType = result && result.balance && result.balance.areaType ? result.balance.areaType : '' |
|
|
|
if (managementPrecision == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY') { |
|
|
|
this.setDataBatch(result, managementPrecision) |
|
|
|
} else { |
|
|
@ -335,7 +338,6 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
setDataBatch(result, managementPrecision) { |
|
|
|
console.log(877, result) |
|
|
|
try { |
|
|
|
var packingNumber = result.label.packingNumber; |
|
|
|
var batch = result.label.batch; |
|
|
@ -498,7 +500,6 @@ |
|
|
|
this.managementType = this.managementList && this.managementList[0] && this |
|
|
|
.managementList[0].ManagementPrecision ? this.managementList[0] |
|
|
|
.ManagementPrecision : 'BY_PACKAGING' |
|
|
|
console.log(11, this.managementType) |
|
|
|
} else { |
|
|
|
uni.hideLoading(); |
|
|
|
this.showErrorMessage(res.message); |
|
|
@ -563,24 +564,20 @@ |
|
|
|
// 提交的数量和任务数量不一致提示 |
|
|
|
let str = '' |
|
|
|
let str1 = '' |
|
|
|
let str2 = '' |
|
|
|
this.detailSource.forEach((item) => { |
|
|
|
item.subList.forEach(cur => { |
|
|
|
|
|
|
|
if (cur.scaned) { |
|
|
|
if (cur.qty != cur.handleQty) { |
|
|
|
var tempHandleQty = 0 |
|
|
|
if (cur.handleQty) { |
|
|
|
tempHandleQty = cur.handleQty |
|
|
|
} else { |
|
|
|
tempHandleQty = 0 |
|
|
|
} |
|
|
|
var batchHint = cur.batch ? `批次【${cur.batch}】` : `` |
|
|
|
str += `物料号【${item.itemCode}】` + `${batchHint}` + |
|
|
|
`提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n` |
|
|
|
`提交数量【${cur.handleQty || 0 }】与任务物料数量【${cur.qty}】不一致\n` |
|
|
|
} |
|
|
|
if (cur.handleQty > cur.balance.balanceQty) { |
|
|
|
str1 += `物料号【${item.itemCode}】` + `${batchHint}` + |
|
|
|
`提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}】` |
|
|
|
} |
|
|
|
`提交数量【${ cur.handleQty || 0 }】不可以大于库存数量【${cur.balance.balanceQty}】` |
|
|
|
str2 += `物料号【${item.itemCode}】在库位【${cur.fromLocationCode}】下` + |
|
|
|
`提交数量【${ cur.handleQty || 0 }】大于库存数量【${cur.balance.balanceQty}】` |
|
|
|
} |
|
|
|
} else { |
|
|
|
var batchHint = cur.batch ? `批次【${cur.batch}】` : `` |
|
|
@ -589,6 +586,38 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
if(this.businessTypeCode == "OkToHold" && this.areaType == "WIP"){ |
|
|
|
console.log(999,this.jobContent.allowSmallerQty) |
|
|
|
console.log(999,this.jobContent.allowBiggerQty) |
|
|
|
if(str){ |
|
|
|
if (this.jobContent.allowSmallerQty == "TRUE" || this.jobContent.allowBiggerQty == "TRUE") { |
|
|
|
str = str + '/n是否提交?' |
|
|
|
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { |
|
|
|
if (res) { |
|
|
|
this.submitJob() |
|
|
|
} |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
//不允许部分提交,提示 |
|
|
|
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { |
|
|
|
if (res) { |
|
|
|
this.openScanPopup(); |
|
|
|
} |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (str2) { |
|
|
|
str2 = str2 + '\n是否确认提交' |
|
|
|
this.$refs.comMessage.showQuestionMessage1(str2, 'red', res => { |
|
|
|
if (res) { |
|
|
|
this.submitJob() |
|
|
|
} |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if (str1) { |
|
|
|
this.$refs.comMessage.showConfirmWarningModal(str1) |
|
|
|
return |
|
|
@ -597,23 +626,13 @@ |
|
|
|
str = '任务明细未全部完成,是否提交?\n' + str |
|
|
|
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { |
|
|
|
if (res) { |
|
|
|
// 2025-04-16号修改物料隔离去掉明细弹窗
// // 物料隔离
// if(this.businessTypeCode == "OkToHold"){
// this.$refs.deptPopup.deptShow = true
// this.$refs.deptPopup.chooseDutyItem={}
// this.$refs.deptPopup.chooseDeptItem={}
// this.$refs.deptPopup.chooseDetailItem={}
// }else{
// this.submitJob()
// } |
|
|
|
this.submitJob() |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
// 2025-04-16号修改物料隔离去掉明细弹窗 |
|
|
|
// // 物料隔离 |
|
|
|
// if(this.businessTypeCode == "OkToHold"){ |
|
|
|
// this.$refs.deptPopup.deptShow = true |
|
|
|
// this.$refs.deptPopup.chooseDutyItem={} |
|
|
|
// this.$refs.deptPopup.chooseDeptItem={} |
|
|
|
// this.$refs.deptPopup.chooseDetailItem={} |
|
|
|
// }else{ |
|
|
|
// this.submitJob() |
|
|
|
// } |
|
|
|
this.submitJob() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
submitJob() { |
|
|
|
uni.showLoading({ |
|
|
@ -626,21 +645,21 @@ |
|
|
|
...this.deptObj |
|
|
|
} |
|
|
|
console.log("提交",params) |
|
|
|
inventoryMoveSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
let showTitle = this.title |
|
|
|
if (this.title.indexOf('任务') == this.title.length - 2) { |
|
|
|
showTitle = this.title.replace('任务', '') |
|
|
|
} |
|
|
|
this.showCommitSuccessMessage("提交成功\n生成" + showTitle + "记录\n" + res.data) |
|
|
|
} else { |
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
// inventoryMoveSubmit(params).then(res => { |
|
|
|
// uni.hideLoading() |
|
|
|
// if (res.data) { |
|
|
|
// let showTitle = this.title |
|
|
|
// if (this.title.indexOf('任务') == this.title.length - 2) { |
|
|
|
// showTitle = this.title.replace('任务', '') |
|
|
|
// } |
|
|
|
// this.showCommitSuccessMessage("提交成功\n生成" + showTitle + "记录\n" + res.data) |
|
|
|
// } else { |
|
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
// } |
|
|
|
// }).catch(error => { |
|
|
|
// uni.hideLoading() |
|
|
|
// this.showErrorMessage(error) |
|
|
|
// }) |
|
|
|
}, |
|
|
|
|
|
|
|
setPrecisionStrategParams() { |
|
|
|