Browse Source

2026-09-20

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

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

@ -79,10 +79,8 @@
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<el-form-item :label="'送检类型'"> <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-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -792,6 +790,17 @@
<!-- 设置动态列 --> <!-- 设置动态列 -->
<column v-if="visible" ref="column" @refreshData="refreshColumnList"></column> <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> </div>
</template> </template>
@ -855,6 +864,10 @@
end = this.tableData.length end = this.tableData.length
} }
return this.tableData.slice(start,end) return this.tableData.slice(start,end)
},
needTriggerMachineInspectOption () {
const types = this.appearanceInspectTypes || []
return (this.IQCSelections || []).some(r => types.indexOf(r.submissionType) !== -1)
} }
}, },
watch: { watch: {
@ -912,7 +925,12 @@
isQualifiedChinese: '', isQualifiedChinese: '',
submitList: [], submitList: [],
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
triggerMachineInspect: false,
}, },
submitConfirmFlag: false,
triggerMachineInspect: false,
iqcSubmissionTypeOptions: ['材料进货检验', '刀模进货检验-外观', '刀模进货检验-上机', '刀模维修检验-外观', '刀模维修检验-上机'],
appearanceInspectTypes: ['刀模进货检验-外观', '刀模维修检验-外观'],
tagNo:'', tagNo:'',
searchData: { searchData: {
site: '', site: '',
@ -1319,7 +1337,7 @@
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100,
columnWidth: 160,
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -3072,16 +3090,23 @@
// }) // })
// return false // return false
// } // }
this.$confirm(`已确认单据信息无误,确定审核该 ` + this.IQCSelections.length + ` 条记录`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.triggerMachineInspect = false
this.submitConfirmFlag = true
},
confirmSubmitResult () {
this.submitConfirmFlag = false
this.doSaveIQCSubmitResult()
},
doSaveIQCSubmitResult () {
this.submitData.submitList = this.IQCSelections this.submitData.submitList = this.IQCSelections
this.submitData.triggerMachineInspect = this.needTriggerMachineInspectOption ? this.triggerMachineInspect : false
saveIQCSubmitResult(this.submitData).then(({data}) => { saveIQCSubmitResult(this.submitData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
this.IQCSelections = [] this.IQCSelections = []
this.triggerMachineInspect = false
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -3094,7 +3119,6 @@
}) })
} }
}) })
})
}, },
// 取消审核 // 取消审核

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

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

Loading…
Cancel
Save