From 91a332e40ff52003ed2f3a32d12ef50e4d2d28c7 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Mon, 31 Aug 2026 13:10:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E4=B8=AD=E5=B0=86iqc?= =?UTF-8?q?=E6=94=BE=E6=9C=80=E5=89=8D=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/modules/qc/qcPartAttribute.vue | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/cclqms-vue/src/views/modules/qc/qcPartAttribute.vue b/cclqms-vue/src/views/modules/qc/qcPartAttribute.vue index 16aea0d..1a2f37d 100644 --- a/cclqms-vue/src/views/modules/qc/qcPartAttribute.vue +++ b/cclqms-vue/src/views/modules/qc/qcPartAttribute.vue @@ -670,7 +670,7 @@
- {{ i.inspectionTypeName }}
@@ -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() {