|
|
|
@ -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) |
|
|
|
} |
|
|
|
|