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 {