|
|
|
@ -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++) { |
|
|
|
|