From 48fb12811f6f98395c21fe4655bad51e6748a5e6 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 21 Oct 2026 15:27:45 +0800 Subject: [PATCH] =?UTF-8?q?2026-10-21=20iqc=EF=BC=8C=E5=AF=B9=E4=BA=8E?= =?UTF-8?q?=E6=8A=BD=E6=A3=80=EF=BC=8C=E5=A6=82=E6=9E=9C=E4=B8=8D=E5=90=88?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E5=85=B6?= =?UTF-8?q?=E5=AE=9E=E4=B8=8D=E5=85=81=E8=AE=B8=E2=80=9C=E6=8C=91=E9=80=89?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E2=80=9D=20=E5=AF=B9=E4=BA=8E=E5=85=A8?= =?UTF-8?q?=E6=A3=80=EF=BC=8C=E4=B8=8D=E8=89=AF=E5=A4=84=E7=BD=AE=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E2=80=9C=E6=8B=92=E6=94=B6=E9=80=80=E5=9B=9E=E2=80=9C?= =?UTF-8?q?=E3=80=81=E2=80=9D=E8=BF=94=E5=B7=A5=E8=BF=94=E4=BF=AE=E2=80=9C?= =?UTF-8?q?=E3=80=81=E2=80=9D=E8=AE=A9=E6=AD=A5=E6=8E=A5=E6=94=B6=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/qc/IQCResultEntry.vue | 56 ++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue index 49fc279..7041bed 100644 --- a/src/views/modules/qc/IQCResultEntry.vue +++ b/src/views/modules/qc/IQCResultEntry.vue @@ -319,7 +319,7 @@ @@ -888,6 +888,10 @@ needTriggerMachineInspectOption () { const types = this.appearanceInspectTypes || [] return (this.IQCSelections || []).some(r => types.indexOf(r.submissionType) !== -1 && this.treatsAsQualified(r)) + }, + disposalMeasuresForDetail () { + const options = this.disposalMeasuresOptions || [] + return options.filter(i => this.isDisposalAllowed(this.detailData.inspectCode, this.detailData.inspectionResult, i.disposalMeasures)) } }, watch: { @@ -1913,7 +1917,8 @@ submissionType: '', passQty: '', notPassQty: '', - batchQualifiedQty: '' + batchQualifiedQty: '', + inspectCode: '' }, detailInformationFlag: false, iqcRecordOverFlag: false, @@ -2687,7 +2692,42 @@ && (row.disposalMeasures === '让步接收' || row.disposalMeasures === '挑选使用') }, + isFullInspect (inspectCode) { + return String(inspectCode || '').trim().toUpperCase() === 'F' + }, + + isDisposalAllowed (inspectCode, inspectionResult, disposalMeasures) { + const disposal = disposalMeasures == null ? '' : String(disposalMeasures).trim() + if (!disposal) { + return true + } + if (this.isFullInspect(inspectCode)) { + return disposal !== '拒收退回' && disposal !== '返工返修' && disposal !== '让步接收' + } + return !(inspectionResult === '不合格' && disposal === '挑选使用') + }, + + disposalForbiddenTip (inspectCode) { + if (this.isFullInspect(inspectCode)) { + return '全检任务不允许选择拒收退回、返工返修、让步接收' + } + return '抽检任务检验结论为不合格时,不允许选择挑选使用' + }, + + clearIllegalDisposal () { + if (this.detailData.submitFlag === 'Y') { + return + } + if (!this.isDisposalAllowed(this.detailData.inspectCode, this.detailData.inspectionResult, this.detailData.disposalMeasures)) { + this.detailData.disposalMeasures = '' + } + }, + async Transfer (type) { + if (this.detailData.submitFlag !== 'Y' && !this.isDisposalAllowed(this.detailData.inspectCode, this.detailData.inspectionResult, this.detailData.disposalMeasures)) { + this.$message.warning(this.disposalForbiddenTip(this.detailData.inspectCode)) + return + } if (type === '2') { if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { this.$message.warning('请选择检验结论!') @@ -2885,6 +2925,7 @@ this.detailData.responsiblePersonName = row.responsiblePersonName this.detailData.invdefinetype = row.invdefinetype this.detailData.state = row.state + this.detailData.inspectCode = row.inspectCode || '' this.$set(this.detailData, 'submissionType', row.submissionType || '') this.$set(this.detailData, 'supplierNo', row.supplierNo || '') // if (row.state === '待检验') { @@ -2897,6 +2938,7 @@ this.detailData.passQty = row.passQty this.detailData.notPassQty = row.notPassQty this.detailData.batchQualifiedQty = row.batchQualifiedQty + this.clearIllegalDisposal() this.getInspectionFormData() this.inspectorSearch() // this.acquisitionList = [] @@ -3121,6 +3163,7 @@ submitResult () { let tempData1 = '' // 记录不是待审核状态的单号 let tempData2 = '' // 记录处置措施未填写的单号 + let tempData3 = '' // 记录处置措施与检验方式不符的单号 if (this.IQCSelections.length === 0) { this.$message.warning('请勾选要审核的检验单!') return @@ -3132,6 +3175,9 @@ if (this.IQCSelections[i].inspectionResult === '不合格' && (this.IQCSelections[i].disposalMeasures === '' || this.IQCSelections[i].disposalMeasures == null)) { tempData2 = tempData2 + this.IQCSelections[i].inspectionNo + '、' } + if (!this.isDisposalAllowed(this.IQCSelections[i].inspectCode, this.IQCSelections[i].inspectionResult, this.IQCSelections[i].disposalMeasures)) { + tempData3 = tempData3 + this.IQCSelections[i].inspectionNo + '、' + } } if (tempData1 !== '') { tempData1 = tempData1.substring(0, tempData1.length - 1) @@ -3143,6 +3189,11 @@ this.$message.warning('检验单号 ' + tempData2 + ', 的处置措施未选择!') return } + if (tempData3 !== '') { + tempData3 = tempData3.substring(0, tempData3.length - 1) + this.$message.warning('检验单号 ' + tempData3 + ' 的处置措施与检验方式不符,请重新选择') + return + } // this.submitData.site = row.site // this.submitData.inspectionNo = row.inspectionNo // this.submitData.inspectionResult = row.inspectionResult @@ -3474,6 +3525,7 @@ if (this.detailData.inspectionResult === '不合格') { this.detailData.passQty = 0 } + this.clearIllegalDisposal() }, // 校验用户是否收藏