From 3570f479548934b06f6b31f115d495245d544277 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Thu, 5 Nov 2026 10:41:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E6=A0=B7=E6=95=B0=E9=87=8F=E3=80=81?= =?UTF-8?q?=E6=8A=BD=E6=A0=B7=E6=AF=94=E4=BE=8B=E3=80=81=E6=8A=BD=E6=A0=B7?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E6=B7=BB=E5=8A=A0=E4=B8=AA=E4=BA=92=E6=96=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/qc/qcItem.vue | 37 +++++++++-- src/views/modules/qc/qcPartAttribute.vue | 82 ++++++++++++++++++++---- src/views/modules/qc/qcTemplate.vue | 38 +++++++++-- 3 files changed, 138 insertions(+), 19 deletions(-) diff --git a/src/views/modules/qc/qcItem.vue b/src/views/modules/qc/qcItem.vue index ae176c3..53342ac 100644 --- a/src/views/modules/qc/qcItem.vue +++ b/src/views/modules/qc/qcItem.vue @@ -161,7 +161,7 @@ 抽样方案编码 - + @@ -170,7 +170,7 @@ 检验水平编码 - + @@ -191,10 +191,10 @@ - + - + 需上传图片 @@ -1246,6 +1246,33 @@ this.inspectionTypeSearch() }, + hasSamplingValue (val) { + return val !== null && val !== undefined && String(val).trim() !== '' + }, + onSamplingPlanOrLevelChange () { + if (this.hasSamplingValue(this.modalData.samplingProgrammeNo) || this.hasSamplingValue(this.modalData.samplingLevelNo)) { + this.modalData.itemSamplingQuantity = '' + this.modalData.defaultSamplingProportion = '' + } + }, + onSamplingQuantityChange () { + if (this.hasSamplingValue(this.modalData.itemSamplingQuantity)) { + this.modalData.samplingProgrammeNo = '' + this.modalData.samplingProgrammeDesc = '' + this.modalData.samplingLevelNo = '' + this.modalData.samplingLevelDesc = '' + this.modalData.defaultSamplingProportion = '' + } + }, + onSamplingProportionChange () { + if (this.hasSamplingValue(this.modalData.defaultSamplingProportion)) { + this.modalData.samplingProgrammeNo = '' + this.modalData.samplingProgrammeDesc = '' + this.modalData.samplingLevelNo = '' + this.modalData.samplingLevelDesc = '' + this.modalData.itemSamplingQuantity = '' + } + }, // 列表方法的回调 getBaseData (val) { if (this.tagNo === 1036) { @@ -1255,10 +1282,12 @@ if (this.tagNo === 207) { this.modalData.samplingProgrammeNo = val.sampling_programme_no this.modalData.samplingProgrammeDesc = val.sampling_programme_desc + this.onSamplingPlanOrLevelChange() } if (this.tagNo === 208) { this.modalData.samplingLevelNo = val.sampling_level_no this.modalData.samplingLevelDesc = val.sampling_level_desc + this.onSamplingPlanOrLevelChange() } }, diff --git a/src/views/modules/qc/qcPartAttribute.vue b/src/views/modules/qc/qcPartAttribute.vue index b264f75..ac416ac 100644 --- a/src/views/modules/qc/qcPartAttribute.vue +++ b/src/views/modules/qc/qcPartAttribute.vue @@ -304,7 +304,7 @@ + label="抽样方案"> + min-width="170" + label="检验水平"> + + + + min-width="60" + label="检验周期(h)"> i.columnProp === 'inspectionTypeName') if (idx === -1) return [] return list.slice(idx + 1) + }, + detailColumnsAfterIpqcBeforeQty () { + const list = this.detailColumnsAfterIpqc + const idx = list.findIndex(i => i.columnProp === 'defaultSamplingQuantity') + if (idx === -1) return list + return list.slice(0, idx) + }, + detailColumnsAfterIpqcFromQty () { + const list = this.detailColumnsAfterIpqc + const idx = list.findIndex(i => i.columnProp === 'defaultSamplingQuantity') + if (idx === -1) return [] + return list.slice(idx) } }, @@ -2226,6 +2260,30 @@ this.detailList.forEach(r => this.normalizeIpqcInspectionMethod(r)) }, + hasSamplingValue (val) { + return val !== null && val !== undefined && String(val).trim() !== '' + }, + onDetailSamplingPlanOrLevelChange (row) { + if (this.hasSamplingValue(row.samplingProgrammeNo) || this.hasSamplingValue(row.samplingLevelNo)) { + this.$set(row, 'defaultSamplingQuantity', '') + this.$set(row, 'defaultSamplingProportion', '') + } + }, + onDetailSamplingFieldInput (row, field) { + if (field === 'defaultSamplingQuantity' && this.hasSamplingValue(row.defaultSamplingQuantity)) { + this.$set(row, 'samplingProgrammeNo', '') + this.$set(row, 'samplingProgrammeDesc', '') + this.$set(row, 'samplingLevelNo', '') + this.$set(row, 'samplingLevelDesc', '') + this.$set(row, 'defaultSamplingProportion', '') + } else if (field === 'defaultSamplingProportion' && this.hasSamplingValue(row.defaultSamplingProportion)) { + this.$set(row, 'samplingProgrammeNo', '') + this.$set(row, 'samplingProgrammeDesc', '') + this.$set(row, 'samplingLevelNo', '') + this.$set(row, 'samplingLevelDesc', '') + this.$set(row, 'defaultSamplingQuantity', '') + } + }, chooseLevel (row) { this.tempLevelRow = row this.getBaseList(208) @@ -2269,10 +2327,12 @@ if (this.tagNo === 208) { this.tempLevelRow.samplingLevelNo = val.sampling_level_no this.tempLevelRow.samplingLevelDesc = val.sampling_level_desc + this.onDetailSamplingPlanOrLevelChange(this.tempLevelRow) } if (this.tagNo === 207) { this.tempProgrammeRow.samplingProgrammeNo = val.sampling_programme_no this.tempProgrammeRow.samplingProgrammeDesc = val.sampling_programme_desc + this.onDetailSamplingPlanOrLevelChange(this.tempProgrammeRow) } if (this.tagNo === 1056) { this.modalData.supplierNo = val.supplier_id diff --git a/src/views/modules/qc/qcTemplate.vue b/src/views/modules/qc/qcTemplate.vue index dd22b2e..c8e54fa 100644 --- a/src/views/modules/qc/qcTemplate.vue +++ b/src/views/modules/qc/qcTemplate.vue @@ -149,7 +149,7 @@ 抽样方案编码 - + @@ -158,7 +158,7 @@ 检验水平编码 - + @@ -169,10 +169,10 @@ - + - + @@ -1260,6 +1260,34 @@ this.inspectionTypeSearch() }, + hasSamplingValue (val) { + return val !== null && val !== undefined && String(val).trim() !== '' + }, + onSamplingPlanOrLevelChange () { + if (this.hasSamplingValue(this.modalData.samplingProgrammeNo) || this.hasSamplingValue(this.modalData.samplingLevelNo)) { + this.modalData.defaultSamplingQuantity = '' + this.modalData.defaultSamplingProportion = '' + } + }, + onSamplingQuantityChange () { + if (this.hasSamplingValue(this.modalData.defaultSamplingQuantity)) { + this.modalData.samplingProgrammeNo = '' + this.modalData.samplingProgrammeDesc = '' + this.modalData.samplingLevelNo = '' + this.modalData.samplingLevelDesc = '' + this.modalData.defaultSamplingProportion = '' + } + }, + onSamplingProportionChange () { + if (this.hasSamplingValue(this.modalData.defaultSamplingProportion)) { + this.modalData.samplingProgrammeNo = '' + this.modalData.samplingProgrammeDesc = '' + this.modalData.samplingLevelNo = '' + this.modalData.samplingLevelDesc = '' + this.modalData.defaultSamplingQuantity = '' + } + }, + // 查询设备 objectSearch () { let tempData = { @@ -1338,10 +1366,12 @@ if (this.tagNo === 207) { this.modalData.samplingProgrammeNo = val.sampling_programme_no this.modalData.samplingProgrammeDesc = val.sampling_programme_desc + this.onSamplingPlanOrLevelChange() } if (this.tagNo === 208) { this.modalData.samplingLevelNo = val.sampling_level_no this.modalData.samplingLevelDesc = val.sampling_level_desc + this.onSamplingPlanOrLevelChange() } },