|
|
|
@ -670,7 +670,7 @@ |
|
|
|
<!-- 检验标准维护 --> |
|
|
|
<el-tab-pane :label="$t('qc.partAttributePage.tabQcSpec')" name="qcSpec"> |
|
|
|
<div class="qc-spec-type-bar"> |
|
|
|
<span v-for="i in options" :key="i.inspectionTypeNo" class="qc-spec-type-item" |
|
|
|
<span v-for="i in qcSpecTypeOptions" :key="i.inspectionTypeNo" class="qc-spec-type-item" |
|
|
|
:class="{ 'is-active': qcSpecFilterType === String(i.inspectionTypeNo) }" |
|
|
|
@click="qcSpecFilterType = String(i.inspectionTypeNo)">{{ i.inspectionTypeName }}</span> |
|
|
|
</div> |
|
|
|
@ -2600,7 +2600,7 @@ export default { |
|
|
|
qcSpecSortedCacheSource: null, |
|
|
|
qcSpecListSkipSchedule: false, |
|
|
|
qcSpecDragSaving: false, |
|
|
|
qcSpecFilterType: '', |
|
|
|
qcSpecFilterType: '105', |
|
|
|
qcSpecFilterIpqcMethod: '', |
|
|
|
qcSpecFilterOperation: '', |
|
|
|
qcSpecCurrentRow: null, |
|
|
|
@ -3747,6 +3747,21 @@ export default { |
|
|
|
}) |
|
|
|
return [...operationSet].sort((a, b) => a.localeCompare(b, 'zh-CN')) |
|
|
|
}, |
|
|
|
/** 质检项目设置:IQC 与 IPQC 互换位置,IQC 排最前 */ |
|
|
|
qcSpecTypeOptions() { |
|
|
|
const opts = [...(this.options || [])] |
|
|
|
const iqcIdx = opts.findIndex((item) => String(item.inspectionTypeNo) === '105') |
|
|
|
const ipqcIdx = opts.findIndex((item) => String(item.inspectionTypeNo) === '101') |
|
|
|
if (iqcIdx < 0 || ipqcIdx < 0 || iqcIdx === ipqcIdx) { |
|
|
|
return opts |
|
|
|
} |
|
|
|
const result = [...opts] |
|
|
|
const iqc = result[iqcIdx] |
|
|
|
const ipqc = result[ipqcIdx] |
|
|
|
result[iqcIdx] = ipqc |
|
|
|
result[ipqcIdx] = iqc |
|
|
|
return result |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
@ -4432,9 +4447,15 @@ export default { |
|
|
|
resetQcSpecFilters() { |
|
|
|
this.qcSpecFilterIpqcMethod = '' |
|
|
|
this.qcSpecFilterOperation = '' |
|
|
|
this.ensureDefaultQcSpecFilterType() |
|
|
|
this.qcSpecFilterType = this.getDefaultQcSpecFilterType() |
|
|
|
this.resetQcSpecTableSelection() |
|
|
|
}, |
|
|
|
getDefaultQcSpecFilterType() { |
|
|
|
const opts = this.qcSpecTypeOptions |
|
|
|
if (!opts.length) return '' |
|
|
|
const iqc = opts.find((item) => String(item.inspectionTypeNo) === '105') |
|
|
|
return iqc ? '105' : String(opts[0].inspectionTypeNo) |
|
|
|
}, |
|
|
|
ensureDefaultQcSpecFilterType() { |
|
|
|
const opts = this.options || [] |
|
|
|
if (!opts.length) { |
|
|
|
@ -4445,8 +4466,8 @@ export default { |
|
|
|
const exists = opts.some( |
|
|
|
(item) => String(item.inspectionTypeNo) === current |
|
|
|
) |
|
|
|
if (!exists) { |
|
|
|
this.qcSpecFilterType = String(opts[0].inspectionTypeNo) |
|
|
|
if (!current || !exists) { |
|
|
|
this.qcSpecFilterType = this.getDefaultQcSpecFilterType() |
|
|
|
} |
|
|
|
}, |
|
|
|
resetFileCollectQuery() { |
|
|
|
|