diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue index f61b885f..a082b823 100644 --- a/src/pages/issue/coms/comScanIssuePack.vue +++ b/src/pages/issue/coms/comScanIssuePack.vue @@ -488,6 +488,10 @@ } if (this.toLocation && result.package.packUnit) { let item = this.toLocation.Items.find(r => r.itemCode == result.package.itemCode); + if(!item){ + this.showErrorMessage('扫描物料代码不属于该任务'); + return + } if (result.package.packUnit !== item.packUnit) { this.$refs.comMessage.showQuestionMessage( `扫描物料包装【${result.package.packUnit}】与任务推荐包装规格【${item.packUnit}】不一致.是否要继续发料?`, res => { diff --git a/src/pages/issue/record/issueRecord.vue b/src/pages/issue/record/issueRecord.vue index 9236e084..b9219f6f 100644 --- a/src/pages/issue/record/issueRecord.vue +++ b/src/pages/issue/record/issueRecord.vue @@ -235,8 +235,15 @@ that.recommendList.forEach(r => r.locationCode = r.fromLocationCode) let recommendInfo = res.data[0]; if (recommendInfo.batch != result.package.batch) { - that.showErrorMessage('扫描的批次【' + result.package.batch + '】,不是系统推荐的批次【' + - recommendInfo.batch + '】,不满足系统的先进先出规则,请重新扫描'); + that.$refs.comMessage.showQuestionMessage('扫描的批次【' + result.package.batch + '】,不是系统推荐的批次【' + + recommendInfo.batch + '】,不满足系统的先进先出规则,'+'是否继续?', + res => { + if(res){ + this.setData(result); + } + }) + // that.showErrorMessage('扫描的批次【' + result.package.batch + '】,不是系统推荐的批次【' + + // recommendInfo.batch + '】,不满足系统的先进先出规则,请重新扫描'); } else { this.setData(result); } diff --git a/src/pages/repleinsh/record/repleinshRecord.vue b/src/pages/repleinsh/record/repleinshRecord.vue index 7cd3b6c2..c7378cfe 100644 --- a/src/pages/repleinsh/record/repleinshRecord.vue +++ b/src/pages/repleinsh/record/repleinshRecord.vue @@ -259,8 +259,15 @@ that.recommendList.forEach(r => r.locationCode = r.fromLocationCode) let recommendInfo = res.data[0]; if (recommendInfo.batch != result.package.batch) { - that.showErrorMessage('扫描的批次【' + result.package.batch + '】,不是系统推荐的批次【' + - recommendInfo.batch + '】,不满足系统的先进先出规则,请重新扫描'); + // that.showErrorMessage('扫描的批次【' + result.package.batch + '】,不是系统推荐的批次【' + + // recommendInfo.batch + '】,不满足系统的先进先出规则,请重新扫描'); + that.$refs.comMessage.showQuestionMessage('扫描的批次【' + result.package.batch + '】,不是系统推荐的批次【' + + recommendInfo.batch + '】,不满足系统的先进先出规则,'+'是否继续?', + res => { + if(res){ + this.setData(result); + } + }) } else { this.setData(result); }