From 1f854d852545a8c1225600515d79a2027f45a929 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Wed, 7 May 2025 16:23:52 +0800 Subject: [PATCH] 20240507 --- .../modules/quote/detail/quoteDetail.vue | 43 +++++++++++++-- .../modules/quote/detail/quoteGroupDetail.vue | 55 ++++++++++++++++--- src/views/modules/quote/detail/tpCost.vue | 43 +++++++++++++-- 3 files changed, 125 insertions(+), 16 deletions(-) diff --git a/src/views/modules/quote/detail/quoteDetail.vue b/src/views/modules/quote/detail/quoteDetail.vue index bcd48e0..e7037fe 100644 --- a/src/views/modules/quote/detail/quoteDetail.vue +++ b/src/views/modules/quote/detail/quoteDetail.vue @@ -100,7 +100,7 @@ export default { saveQuoteDetail:{ }, - numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','weighted','weighted2'], + numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','weighted','weighted2'], dataList:[], saveLoading:false, queryLoading:false, @@ -112,7 +112,7 @@ export default { type: [{required: true, message: '请选择TP类型', trigger: ['blur','change']}], costModel: [{required: true, message: '请选择Cost Model', trigger: ['blur','change']}], }, - columns: [ + columnList: [ { userId: this.$store.state.user.name, functionId: 5011, @@ -293,6 +293,24 @@ export default { fixed: '', columnWidth: 75 }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table2TotalCost', + tableId: '5011Table2', + tableName: '报价详情信息表', + columnProp: 'totalCostUSD', + headerAlign: 'center', + align: 'right', + columnLabel: 'Total Cost(USD/KCT)', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 75 + }, { userId: this.$store.state.user.name, functionId: 5011, @@ -381,7 +399,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 290 + columnWidth: 215 }, ], partVisible:false, @@ -664,6 +682,23 @@ export default { } } }, + computed:{ + columns:{ + get(){ + let val = this.dataList.every(item=>!isNaN(item.adjustToolCost) && item.adjustToolCost > 0); + if (val){ + return this.columnList + } + return this.columnList.filter(item=>item.columnProp !== 'adjustToolCost') + }, + } + }, + beforeUpdate() { + this.$nextTick(() => { + this.$refs.table1.doLayout() + // this.$refs.table2.doLayout() + }) + }, created() { this.quoteDetail.profitRate = this.quote.markup this.quoteDetail.quoteProfitRate = this.quote.markup @@ -680,7 +715,7 @@ export default { - +