Browse Source

2026-02-12

1、销售报价查询优化
2、ecn 新IFS料号显示优化
master
fengyuan_yang 7 months ago
parent
commit
e6ee967507
  1. 8
      src/views/modules/changeManagement/changeRecord.vue
  2. 7
      src/views/modules/quote/index.vue

8
src/views/modules/changeManagement/changeRecord.vue

@ -316,7 +316,7 @@
min-width="170" min-width="170"
label="New IFS Part No."> label="New IFS Part No.">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input clearable @keydown.native.prevent :ref="`newPartNo${scope.$index}`" v-model="scope.row.newPartNo" style="width:77%"></el-input>
<el-input clearable @keydown.native.prevent :ref="`newPartNo${scope.$index}`" v-model="scope.row.finalPartNo" style="width:77%"></el-input>
<el-button :disabled="showModalFlag||changeRequestDetailFlag('newPartNo') === 'N'" type="primary" @click="choosePartNo(scope.row)" style="width:18%;padding: 3px 7px">·&nbsp;·&nbsp;·</el-button> <el-button :disabled="showModalFlag||changeRequestDetailFlag('newPartNo') === 'N'" type="primary" @click="choosePartNo(scope.row)" style="width:18%;padding: 3px 7px">·&nbsp;·&nbsp;·</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -3563,7 +3563,10 @@
// 双击选中物料 // 双击选中物料
getRowData (row) { getRowData (row) {
// newPartNo保存PLM物料编码(用于存储到数据库)
this.$set(this.tempPartRow,'newPartNo', row.testPartNo) this.$set(this.tempPartRow,'newPartNo', row.testPartNo)
// finalPartNo用于前端显示IFS物料编码
this.$set(this.tempPartRow,'finalPartNo', row.finalPartNo)
this.partModelFlag = false this.partModelFlag = false
}, },
@ -4226,6 +4229,9 @@
this.modalData.userName = this.$store.state.user.name this.modalData.userName = this.$store.state.user.name
this.modalData.menuId = this.$route.meta.menuId this.modalData.menuId = this.$route.meta.menuId
// 处理明细列表:前端显示用finalPartNo(IFS物料编码),后端存储用newPartNo(PLM物料编码)
// newPartNo在选择物料时已经正确设置为PLM编码,这里直接传递即可
this.modalData.detailList = this.chooseDataList this.modalData.detailList = this.chooseDataList
this.modalData.ecnTypeData = this.form this.modalData.ecnTypeData = this.form
this.modalData.costImpactData = this.costImpactData this.modalData.costImpactData = this.costImpactData

7
src/views/modules/quote/index.vue

@ -620,8 +620,11 @@ export default {
if (data && data.code === 0){ if (data && data.code === 0){
this.dataList = data.rows this.dataList = data.rows
this.total = data.total this.total = data.total
// 加载每个报价的明细首条数据
this.loadQuoteDetailInfo()
// ❌ 性能优化:注释掉N+1查询问题(每个报价都会发起一次额外查询)
// 这会导致:如果有20条报价,就会执行1+20=21次数据库查询
// 解决方案:如果需要显示明细,应该在SQL中一次性JOIN查询,而不是循环查询
// this.loadQuoteDetailInfo()
if (this.dataList[0] !== undefined) { if (this.dataList[0] !== undefined) {
this.handleSelect(this.dataList[0]) this.handleSelect(this.dataList[0])
} else { } else {

Loading…
Cancel
Save