Browse Source

2026-10-21

iqc,对于抽检,如果不合格的情况下,其实不允许“挑选使用”
对于全检,不良处置不能“拒收退回“、”返工返修“、”让步接收“
master
fengyuan_yang 1 month ago
parent
commit
48fb12811f
  1. 56
      src/views/modules/qc/IQCResultEntry.vue

56
src/views/modules/qc/IQCResultEntry.vue

@ -319,7 +319,7 @@
</el-select> </el-select>
<el-select v-else clearable v-model="detailData.disposalMeasures" style="width: 100px"> <el-select v-else clearable v-model="detailData.disposalMeasures" style="width: 100px">
<el-option <el-option
v-for = "i in disposalMeasuresOptions"
v-for = "i in disposalMeasuresForDetail"
:key = "i.id" :key = "i.id"
:label = "i.disposalMeasures" :label = "i.disposalMeasures"
:value = "i.disposalMeasures"> :value = "i.disposalMeasures">
@ -888,6 +888,10 @@
needTriggerMachineInspectOption () { needTriggerMachineInspectOption () {
const types = this.appearanceInspectTypes || [] const types = this.appearanceInspectTypes || []
return (this.IQCSelections || []).some(r => types.indexOf(r.submissionType) !== -1 && this.treatsAsQualified(r)) 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: { watch: {
@ -1913,7 +1917,8 @@
submissionType: '', submissionType: '',
passQty: '', passQty: '',
notPassQty: '', notPassQty: '',
batchQualifiedQty: ''
batchQualifiedQty: '',
inspectCode: ''
}, },
detailInformationFlag: false, detailInformationFlag: false,
iqcRecordOverFlag: false, iqcRecordOverFlag: false,
@ -2687,7 +2692,42 @@
&& (row.disposalMeasures === '让步接收' || row.disposalMeasures === '挑选使用') && (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) { 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 (type === '2') {
if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
this.$message.warning('请选择检验结论!') this.$message.warning('请选择检验结论!')
@ -2885,6 +2925,7 @@
this.detailData.responsiblePersonName = row.responsiblePersonName this.detailData.responsiblePersonName = row.responsiblePersonName
this.detailData.invdefinetype = row.invdefinetype this.detailData.invdefinetype = row.invdefinetype
this.detailData.state = row.state this.detailData.state = row.state
this.detailData.inspectCode = row.inspectCode || ''
this.$set(this.detailData, 'submissionType', row.submissionType || '') this.$set(this.detailData, 'submissionType', row.submissionType || '')
this.$set(this.detailData, 'supplierNo', row.supplierNo || '') this.$set(this.detailData, 'supplierNo', row.supplierNo || '')
// if (row.state === '待检验') { // if (row.state === '待检验') {
@ -2897,6 +2938,7 @@
this.detailData.passQty = row.passQty this.detailData.passQty = row.passQty
this.detailData.notPassQty = row.notPassQty this.detailData.notPassQty = row.notPassQty
this.detailData.batchQualifiedQty = row.batchQualifiedQty this.detailData.batchQualifiedQty = row.batchQualifiedQty
this.clearIllegalDisposal()
this.getInspectionFormData() this.getInspectionFormData()
this.inspectorSearch() this.inspectorSearch()
// this.acquisitionList = [] // this.acquisitionList = []
@ -3121,6 +3163,7 @@
submitResult () { submitResult () {
let tempData1 = '' // 记录不是待审核状态的单号 let tempData1 = '' // 记录不是待审核状态的单号
let tempData2 = '' // 记录处置措施未填写的单号 let tempData2 = '' // 记录处置措施未填写的单号
let tempData3 = '' // 记录处置措施与检验方式不符的单号
if (this.IQCSelections.length === 0) { if (this.IQCSelections.length === 0) {
this.$message.warning('请勾选要审核的检验单!') this.$message.warning('请勾选要审核的检验单!')
return return
@ -3132,6 +3175,9 @@
if (this.IQCSelections[i].inspectionResult === '不合格' && (this.IQCSelections[i].disposalMeasures === '' || this.IQCSelections[i].disposalMeasures == null)) { if (this.IQCSelections[i].inspectionResult === '不合格' && (this.IQCSelections[i].disposalMeasures === '' || this.IQCSelections[i].disposalMeasures == null)) {
tempData2 = tempData2 + this.IQCSelections[i].inspectionNo + '、' 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 !== '') { if (tempData1 !== '') {
tempData1 = tempData1.substring(0, tempData1.length - 1) tempData1 = tempData1.substring(0, tempData1.length - 1)
@ -3143,6 +3189,11 @@
this.$message.warning('检验单号 ' + tempData2 + ', 的处置措施未选择!') this.$message.warning('检验单号 ' + tempData2 + ', 的处置措施未选择!')
return return
} }
if (tempData3 !== '') {
tempData3 = tempData3.substring(0, tempData3.length - 1)
this.$message.warning('检验单号 ' + tempData3 + ' 的处置措施与检验方式不符,请重新选择')
return
}
// this.submitData.site = row.site // this.submitData.site = row.site
// this.submitData.inspectionNo = row.inspectionNo // this.submitData.inspectionNo = row.inspectionNo
// this.submitData.inspectionResult = row.inspectionResult // this.submitData.inspectionResult = row.inspectionResult
@ -3474,6 +3525,7 @@
if (this.detailData.inspectionResult === '不合格') { if (this.detailData.inspectionResult === '不合格') {
this.detailData.passQty = 0 this.detailData.passQty = 0
} }
this.clearIllegalDisposal()
}, },
// 校验用户是否收藏 // 校验用户是否收藏

Loading…
Cancel
Save