From e6ee9675074cfa7816b25ae512ee8c45d73f2e3e Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 12 Feb 2026 14:48:00 +0800 Subject: [PATCH] =?UTF-8?q?2026-02-12=201=E3=80=81=E9=94=80=E5=94=AE?= =?UTF-8?q?=E6=8A=A5=E4=BB=B7=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96=202?= =?UTF-8?q?=E3=80=81ecn=20=E6=96=B0IFS=E6=96=99=E5=8F=B7=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/changeManagement/changeRecord.vue | 8 +++++++- src/views/modules/quote/index.vue | 7 +++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue index cca40e2..bf1dfd2 100644 --- a/src/views/modules/changeManagement/changeRecord.vue +++ b/src/views/modules/changeManagement/changeRecord.vue @@ -316,7 +316,7 @@ min-width="170" label="New IFS Part No."> @@ -3563,7 +3563,10 @@ // 双击选中物料 getRowData (row) { + // newPartNo保存PLM物料编码(用于存储到数据库) this.$set(this.tempPartRow,'newPartNo', row.testPartNo) + // finalPartNo用于前端显示IFS物料编码 + this.$set(this.tempPartRow,'finalPartNo', row.finalPartNo) this.partModelFlag = false }, @@ -4226,6 +4229,9 @@ this.modalData.userName = this.$store.state.user.name this.modalData.menuId = this.$route.meta.menuId + + // 处理明细列表:前端显示用finalPartNo(IFS物料编码),后端存储用newPartNo(PLM物料编码) + // newPartNo在选择物料时已经正确设置为PLM编码,这里直接传递即可 this.modalData.detailList = this.chooseDataList this.modalData.ecnTypeData = this.form this.modalData.costImpactData = this.costImpactData diff --git a/src/views/modules/quote/index.vue b/src/views/modules/quote/index.vue index 60a4297..9f07e53 100644 --- a/src/views/modules/quote/index.vue +++ b/src/views/modules/quote/index.vue @@ -620,8 +620,11 @@ export default { if (data && data.code === 0){ this.dataList = data.rows this.total = data.total - // 加载每个报价的明细首条数据 - this.loadQuoteDetailInfo() + // ❌ 性能优化:注释掉N+1查询问题(每个报价都会发起一次额外查询) + // 这会导致:如果有20条报价,就会执行1+20=21次数据库查询 + // 解决方案:如果需要显示明细,应该在SQL中一次性JOIN查询,而不是循环查询 + // this.loadQuoteDetailInfo() + if (this.dataList[0] !== undefined) { this.handleSelect(this.dataList[0]) } else {