From b5132d27a0fdf032ddf3ea2c5ab1646e176c9d60 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Fri, 9 May 2025 14:16:44 +0800 Subject: [PATCH] 20240509 --- .../quote/detail/primary/quoteDetailCost.vue | 6 ++ .../modules/quote/detail/quoteDetail.vue | 67 +++++++++++++++-- .../modules/quote/detail/quoteGroupDetail.vue | 71 +++++++++++++++++-- src/views/modules/quote/detail/tpCost.vue | 65 +++++++++++++++-- src/views/modules/quote/index.vue | 67 ++++++++++------- 5 files changed, 232 insertions(+), 44 deletions(-) diff --git a/src/views/modules/quote/detail/primary/quoteDetailCost.vue b/src/views/modules/quote/detail/primary/quoteDetailCost.vue index 11b2572..b175fa7 100644 --- a/src/views/modules/quote/detail/primary/quoteDetailCost.vue +++ b/src/views/modules/quote/detail/primary/quoteDetailCost.vue @@ -554,6 +554,12 @@ export default { v-model="quoteDetail.quoteProfitAmount" :step="0" :precision="4" :min="0" disabled/> + + + + +
diff --git a/src/views/modules/quote/detail/quoteDetail.vue b/src/views/modules/quote/detail/quoteDetail.vue index e7037fe..38d2d27 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','totalCostUSD','weighted','weighted2'], + numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','totalPrice','weighted','weighted2','deltaValue'], dataList:[], saveLoading:false, queryLoading:false, @@ -347,6 +347,24 @@ export default { fixed: '', columnWidth: 65 }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table2TotalPrice', + tableId: '5011Table2', + tableName: '报价详情信息表', + columnProp: 'totalPrice', + headerAlign: 'center', + align: 'right', + columnLabel: 'TP for MSH (RMB/KCT) w/o VAT', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, { userId: this.$store.state.user.name, functionId: 5011, @@ -383,6 +401,24 @@ export default { fixed: '', columnWidth: 75 }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table2DeltaValue', + tableId: '5011Table2', + tableName: '报价详情信息表', + columnProp: 'deltaValue', + headerAlign: 'center', + align: 'right', + columnLabel: ' Delta (USD /KCT)', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 75 + }, { userId: this.$store.state.user.name, functionId: 5011, @@ -399,7 +435,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 215 + columnWidth: 355 }, ], partVisible:false, @@ -686,16 +722,35 @@ export default { columns:{ get(){ let val = this.dataList.every(item=>!isNaN(item.adjustToolCost) && item.adjustToolCost > 0); - if (val){ - return this.columnList + let resultArray = this.columnList + if (!val){ + resultArray = resultArray.filter(item=>item.columnProp !== 'adjustToolCost') + } + if (this.quote.quoteType === 'RMB'){ + let filter = ['type','weighted','weighted2','deltaValue'] + resultArray = resultArray.filter(item=> !filter.includes(item.columnProp)) + let row = resultArray[resultArray.length-1] + row.columnWidth = 300; + }else if (this.quote.quoteType === 'USD'){ + let filter = ['totalPrice'] + let width = 140; + if (this.quote.deltaFlag === 'N'){ + filter.push('deltaValue') + width += 60 + } + resultArray = resultArray.filter(item=> !filter.includes(item.columnProp)) + let row = resultArray[resultArray.length-1] + row.columnWidth = width; } - return this.columnList.filter(item=>item.columnProp !== 'adjustToolCost') + return resultArray }, } }, beforeUpdate() { this.$nextTick(() => { - this.$refs.table1.doLayout() + if (this.$refs.table1){ + this.$refs.table1.doLayout() + } // this.$refs.table2.doLayout() }) }, diff --git a/src/views/modules/quote/detail/quoteGroupDetail.vue b/src/views/modules/quote/detail/quoteGroupDetail.vue index 2bf4f4e..b83efb1 100644 --- a/src/views/modules/quote/detail/quoteGroupDetail.vue +++ b/src/views/modules/quote/detail/quoteGroupDetail.vue @@ -98,7 +98,7 @@ export default { saveQuoteDetail:{ }, - numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','weighted','weighted2'], + numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','totalPrice','weighted','weighted2','deltaValue'], dataList:[], saveLoading:false, queryLoading:false, @@ -345,6 +345,24 @@ export default { fixed: '', columnWidth: 65 }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table2TotalPrice', + tableId: '5011Table2', + tableName: '报价详情信息表', + columnProp: 'totalPrice', + headerAlign: 'center', + align: 'right', + columnLabel: 'TP for MSH (RMB/KCT) w/o VAT', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, { userId: this.$store.state.user.name, functionId: 5011, @@ -381,6 +399,24 @@ export default { fixed: '', columnWidth: 75 }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table2DeltaValue', + tableId: '5011Table2', + tableName: '报价详情信息表', + columnProp: 'deltaValue', + headerAlign: 'center', + align: 'right', + columnLabel: ' Delta (USD /KCT)', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 75 + }, { userId: this.$store.state.user.name, functionId: 5011, @@ -397,7 +433,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 215 + columnWidth: 335 }, ], partVisible:false, @@ -661,17 +697,38 @@ export default { columns:{ get(){ let val = this.dataList.every(item=>!isNaN(item.adjustToolCost) && item.adjustToolCost > 0); - if (val){ - return this.columnList + let resultArray = this.columnList + if (!val){ + resultArray = resultArray.filter(item=>item.columnProp !== 'adjustToolCost') } - return this.columnList.filter(item=>item.columnProp !== 'adjustToolCost') + if (this.quote.quoteType === 'RMB'){ + let filter = ['type','weighted','weighted2','deltaValue'] + resultArray = resultArray.filter(item=> !filter.includes(item.columnProp)) + let row = resultArray[resultArray.length-1] + row.columnWidth = 300; + }else if (this.quote.quoteType === 'USD'){ + let filter = ['totalPrice'] + let width = 140; + if (this.quote.deltaFlag === 'N'){ + filter.push('deltaValue') + width += 60 + } + resultArray = resultArray.filter(item=> !filter.includes(item.columnProp)) + let row = resultArray[resultArray.length-1] + row.columnWidth = width; + } + return resultArray }, } }, beforeUpdate() { this.$nextTick(() => { - this.$refs.table1.doLayout() - this.$refs.table2.doLayout() + if (this.$refs.table1){ + this.$refs.table1.doLayout() + } + if (this.$refs.table2){ + this.$refs.table2.doLayout() + } }) } } diff --git a/src/views/modules/quote/detail/tpCost.vue b/src/views/modules/quote/detail/tpCost.vue index c4cad81..0100107 100644 --- a/src/views/modules/quote/detail/tpCost.vue +++ b/src/views/modules/quote/detail/tpCost.vue @@ -19,7 +19,7 @@ export default { return{ queryLoading:false, dataList:[], - numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','weighted','weighted2'], + numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','totalPrice','weighted','weighted2','deltaValue'], columnList:[ { userId: this.$store.state.user.name, @@ -255,6 +255,24 @@ export default { fixed: '', columnWidth: 65 }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table2TotalPrice', + tableId: '5011Table2', + tableName: '报价详情信息表', + columnProp: 'totalPrice', + headerAlign: 'center', + align: 'right', + columnLabel: 'TP for MSH (RMB/KCT) w/o VAT', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, { userId: this.$store.state.user.name, functionId: 5011, @@ -291,6 +309,24 @@ export default { fixed: '', columnWidth: 75 }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table2DeltaValue', + tableId: '5011Table2', + tableName: '报价详情信息表', + columnProp: 'deltaValue', + headerAlign: 'center', + align: 'right', + columnLabel: ' Delta (USD /KCT)', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 75 + }, { userId: this.$store.state.user.name, functionId: 5011, @@ -437,16 +473,35 @@ export default { columns:{ get(){ let val = this.dataList.every(item=>!isNaN(item.adjustToolCost) && item.adjustToolCost > 0); - if (val){ - return this.columnList + let resultArray = this.columnList + if (!val){ + resultArray = resultArray.filter(item=>item.columnProp !== 'adjustToolCost') + } + if (this.quoteDetail.quoteType === 'RMB'){ + let filter = ['type','weighted','weighted2','deltaValue'] + resultArray = resultArray.filter(item=> !filter.includes(item.columnProp)) + let row = resultArray[resultArray.length-1] + row.columnWidth = 420; + }else if (this.quoteDetail.quoteType === 'USD'){ + let filter = ['totalPrice'] + let width = 260; + if (this.quoteDetail.deltaFlag === 'N'){ + filter.push('deltaValue') + width += 60 + } + resultArray = resultArray.filter(item=> !filter.includes(item.columnProp)) + let row = resultArray[resultArray.length-1] + row.columnWidth = width; } - return this.columnList.filter(item=>item.columnProp !== 'adjustToolCost') + return resultArray }, } }, beforeUpdate() { this.$nextTick(() => { - this.$refs.table1.doLayout() + if (this.$refs.table1){ + this.$refs.table1.doLayout() + } // this.$refs.table2.doLayout() }) }, diff --git a/src/views/modules/quote/index.vue b/src/views/modules/quote/index.vue index b5e19e6..df92ce3 100644 --- a/src/views/modules/quote/index.vue +++ b/src/views/modules/quote/index.vue @@ -62,6 +62,8 @@ export default { costModel: "UFIDA", markup:0, chipPrice:'', + quoteType:'USD', + deltaFlag:'N', }, quoteForm:{ }, @@ -556,14 +558,11 @@ export default { updateQuote(params).then(({data})=>{ if (data && data.code === 0){ this.saveVisible = false - this.currentQuote = { - ...this.currentQuote - } this.$message.success(data.msg) }else { this.$message.warning(data.msg) } - this.handleSearch(); + this.handleSearch(0); this.saveLoading = false }).catch((error)=>{ this.$message.error(error) @@ -861,7 +860,12 @@ export default { }, 'saveQuote.currency'(newVal, oldVal){ this.saveQuote.currency = newVal.toUpperCase() - } + }, + 'saveQuote.quoteType'(newVal, oldVal){ + if (newVal === 'RMB'){ + this.saveQuote.deltaFlag = 'N' + } + }, }, activated() { if (this.$route.params.ids){ @@ -905,16 +909,22 @@ export default { - + - + - - + + + + + + + + @@ -954,11 +964,13 @@ export default { - - - - - + + + 币种 + + + + @@ -971,18 +983,6 @@ export default { - - - - - - 币种 - - - - - - @@ -1006,6 +1006,21 @@ export default { + + + + + + + + + + + + + Delta (USD/KCT) + +