From af005f3878a24ca55ee42ee70072579c3534955c Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 18 Nov 2025 10:44:03 +0800 Subject: [PATCH] =?UTF-8?q?2025-11-18=20=E6=8A=A5=E4=BB=B7=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/quote/index.vue | 86 +++++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 5 deletions(-) diff --git a/src/views/modules/quote/index.vue b/src/views/modules/quote/index.vue index 51cea5e..9db6556 100644 --- a/src/views/modules/quote/index.vue +++ b/src/views/modules/quote/index.vue @@ -29,6 +29,7 @@ import {getPriceCheckPropertiesList} from "../../../api/quotation/priceCheckProp import {getApprovalList} from "../../../api/changeManagement/changeManagement"; import QuoteGroupDetail from "./detail/quoteGroupDetail.vue"; import FilterSearch from "../../common/filterSearch.vue"; +import {queryQuoteGroupDetail} from "../../../api/quote/quoteGroupDetail"; export default { name: "quote", @@ -122,20 +123,56 @@ export default { { userId: this.$store.state.user.name, functionId: 5011, - serialNumber: '5011Table1QuoteDate', + serialNumber: '5011Table1PlmPartNo', tableId: '5011Table1', tableName: '报价信息表', - columnProp: 'quoteDate', + columnProp: 'plmPartNo', headerAlign: 'center', - align: 'center', - columnLabel: '报价日期', + align: 'left', + columnLabel: 'PLM物料编码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1IfsPartNo', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'ifsPartNo', + headerAlign: 'center', + align: 'left', + columnLabel: 'IFS物料编码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1PartDesc', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'partDesc', + headerAlign: 'center', + align: 'left', + columnLabel: '物料名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 200 }, { userId: this.$store.state.user.name, @@ -263,6 +300,24 @@ export default { fixed: '', columnWidth: 120 }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1QuoteDate', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'quoteDate', + headerAlign: 'center', + align: 'center', + columnLabel: '报价日期', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, { userId: this.$store.state.user.name, functionId: 5011, @@ -515,6 +570,8 @@ export default { if (data && data.code === 0){ this.dataList = data.rows this.total = data.total + // 加载每个报价的明细首条数据 + this.loadQuoteDetailInfo() if (this.dataList[0] !== undefined) { this.handleSelect(this.dataList[0]) } else { @@ -534,6 +591,23 @@ export default { this.isFilterSearch = false }, + loadQuoteDetailInfo(){ + // 批量加载每个报价的首条明细数据 + this.dataList.forEach(quote => { + queryQuoteGroupDetail({quoteId: quote.id}).then(({data}) => { + if (data && data.code === 0 && data.rows && data.rows.length > 0) { + const firstDetail = data.rows[0] + // 使用$set确保响应式更新 + this.$set(quote, 'plmPartNo', firstDetail.plmPartNo) + this.$set(quote, 'ifsPartNo', firstDetail.ifsPartNo) + this.$set(quote, 'partDesc', firstDetail.partDesc) + } + }).catch(() => { + // 忽略错误,只是显示为空 + }) + }) + }, + handleSelect(row){ if (row){ this.currentQuote = {...row} @@ -1012,6 +1086,8 @@ export default { if (data && data.code === 0){ this.dataList = data.page.list this.total = data.page.totalCount + // 加载每个报价的明细首条数据 + this.loadQuoteDetailInfo() }else { this.$message.warning(data.msg) }