Browse Source

2026-09-20

iqc任务增加刀模
master
fengyuan_yang 6 days ago
parent
commit
3833cab312
  1. 78
      src/views/modules/qc/IQCResultEntry.vue
  2. 46
      src/views/modules/qc/qcPartAttribute.vue

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

@ -79,10 +79,8 @@
</el-select>
</el-form-item> -->
<el-form-item :label="'送检类型'">
<el-select v-model="searchData.submissionType" clearable style="width: 90px">
<el-option label="厂内使用" value="厂内使用"></el-option>
<el-option label="外协使用" value="外协使用"></el-option>
<el-option label="其他" value="其他"></el-option>
<el-select v-model="searchData.submissionType" clearable style="width: 180px">
<el-option v-for="opt in iqcSubmissionTypeOptions" :key="opt" :label="opt" :value="opt"></el-option>
</el-select>
</el-form-item>
</el-form>
@ -792,6 +790,17 @@
<!-- 设置动态列 -->
<column v-if="visible" ref="column" @refreshData="refreshColumnList"></column>
<el-dialog title="提示" :close-on-click-modal="false" :visible.sync="submitConfirmFlag" width="460px">
<div>已确认单据信息无误,确定审核该 {{ IQCSelections.length }} 条记录</div>
<el-checkbox v-if="needTriggerMachineInspectOption" v-model="triggerMachineInspect" style="margin-top: 16px">
是否触发QMS的上机检验任务单
</el-checkbox>
<span slot="footer">
<el-button @click="submitConfirmFlag = false">取消</el-button>
<el-button type="primary" @click="confirmSubmitResult">确定</el-button>
</span>
</el-dialog>
</div>
</template>
@ -855,6 +864,10 @@
end = this.tableData.length
}
return this.tableData.slice(start,end)
},
needTriggerMachineInspectOption () {
const types = this.appearanceInspectTypes || []
return (this.IQCSelections || []).some(r => types.indexOf(r.submissionType) !== -1)
}
},
watch: {
@ -912,7 +925,12 @@
isQualifiedChinese: '',
submitList: [],
updateBy: this.$store.state.user.name,
triggerMachineInspect: false,
},
submitConfirmFlag: false,
triggerMachineInspect: false,
iqcSubmissionTypeOptions: ['材料进货检验', '刀模进货检验-外观', '刀模进货检验-上机', '刀模维修检验-外观', '刀模维修检验-上机'],
appearanceInspectTypes: ['刀模进货检验-外观', '刀模维修检验-外观'],
tagNo:'',
searchData: {
site: '',
@ -1319,7 +1337,7 @@
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
columnWidth: 160,
},
{
userId: this.$store.state.user.name,
@ -3072,28 +3090,34 @@
// })
// return false
// }
this.$confirm(`已确认单据信息无误,确定审核该 ` + this.IQCSelections.length + ` 条记录`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.submitData.submitList = this.IQCSelections
saveIQCSubmitResult(this.submitData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.IQCSelections = []
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
this.triggerMachineInspect = false
this.submitConfirmFlag = true
},
confirmSubmitResult () {
this.submitConfirmFlag = false
this.doSaveIQCSubmitResult()
},
doSaveIQCSubmitResult () {
this.submitData.submitList = this.IQCSelections
this.submitData.triggerMachineInspect = this.needTriggerMachineInspectOption ? this.triggerMachineInspect : false
saveIQCSubmitResult(this.submitData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.IQCSelections = []
this.triggerMachineInspect = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},

46
src/views/modules/qc/qcPartAttribute.vue

@ -280,23 +280,23 @@
prop="ipqcInspectionMethod"
header-align="center"
align="center"
min-width="140"
label="IPQC检验方式">
min-width="180"
label="检验方式">
<template slot-scope="scope">
<el-select
v-model="scope.row.ipqcInspectionMethod"
placeholder="请选择"
size="mini"
style="width: 120px"
:disabled="!isIPQCInspectionType(scope.row)">
style="width: 160px"
:disabled="!isInspectionMethodApplicable(scope.row)">
<el-option
v-for="opt in ipqcInspectionMethodOptions"
v-for="opt in getInspectionMethodOptions(scope.row)"
:key="opt"
:label="opt"
:value="opt">
</el-option>
</el-select>
<span v-if="isIPQCInspectionType(scope.row) && !scope.row.ipqcInspectionMethod" style="color:#F56C6C;margin-left:6px">*</span>
<span v-if="isInspectionMethodApplicable(scope.row) && !scope.row.ipqcInspectionMethod" style="color:#F56C6C;margin-left:6px">*</span>
</template>
</el-table-column>
<el-table-column
@ -1710,6 +1710,7 @@
dataList: [],
dataListLoading: false,
ipqcInspectionMethodOptions: ['首件检', '自检', '巡检', '末件检'],
iqcInspectionMethodOptions: ['材料进货检验', '刀模进货检验-外观', '刀模进货检验-上机', '刀模维修检验-外观', '刀模维修检验-上机'],
// 展示列集
columnDetailList: [
{
@ -2161,15 +2162,36 @@
isIPQCInspectionType (row) {
const name = (row && row.inspectionTypeName) ? String(row.inspectionTypeName) : ''
const no = (row && row.inspectionTypeNo) ? String(row.inspectionTypeNo) : ''
return name.toUpperCase().includes('IPQC') || no.toUpperCase().includes('IPQC')
return name.toUpperCase().includes('IPQC') || no.toUpperCase().includes('IPQC') || no === '101'
},
isIQCInspectionType (row) {
const name = (row && row.inspectionTypeName) ? String(row.inspectionTypeName) : ''
const no = (row && row.inspectionTypeNo) ? String(row.inspectionTypeNo) : ''
return name.toUpperCase().includes('IQC') || no.toUpperCase().includes('IQC') || no === '105'
},
isInspectionMethodApplicable (row) {
return this.isIPQCInspectionType(row) || this.isIQCInspectionType(row)
},
getInspectionMethodOptions (row) {
if (this.isIQCInspectionType(row)) {
return this.iqcInspectionMethodOptions
}
return this.ipqcInspectionMethodOptions
},
normalizeIpqcInspectionMethod (row) {
if (!row) return
if (this.isIPQCInspectionType(row)) {
if (!row.ipqcInspectionMethod) {
if (!row.ipqcInspectionMethod || this.ipqcInspectionMethodOptions.indexOf(row.ipqcInspectionMethod) === -1) {
this.$set(row, 'ipqcInspectionMethod', '首件检')
}
} else if (this.isIQCInspectionType(row)) {
if (!row.ipqcInspectionMethod || this.iqcInspectionMethodOptions.indexOf(row.ipqcInspectionMethod) === -1) {
this.$set(row, 'ipqcInspectionMethod', '材料进货检验')
}
} else {
if (row.ipqcInspectionMethod) {
this.$set(row, 'ipqcInspectionMethod', '')
@ -2647,11 +2669,11 @@
// 保存属性模板
saveDetail () {
// IPQC 的检验方式必填(默认:IPQC首件检)
// IPQC / IQC 的检验方式必填
this.normalizeDetailListIpqcInspectionMethod()
const missingIpqc = (this.detailList || []).find(r => this.isIPQCInspectionType(r) && !r.ipqcInspectionMethod)
if (missingIpqc) {
this.$message.warning('检验类型为IPQC时,“IPQC检验方式”为必填!')
const missingMethod = (this.detailList || []).find(r => this.isInspectionMethodApplicable(r) && !r.ipqcInspectionMethod)
if (missingMethod) {
this.$message.warning('检验类型为IPQC或IQC时,“检验方式”为必填!')
return
}
for (let i = 0; i < this.detailList.length; i++) {

Loading…
Cancel
Save