Browse Source

20240507

java8
qiezi 8 months ago
parent
commit
f60d855844
  1. 56
      src/views/modules/quote/detail/quoteDetail.vue
  2. 55
      src/views/modules/quote/detail/quoteGroupDetail.vue
  3. 198
      src/views/modules/quote/detail/tpCost.vue

56
src/views/modules/quote/detail/quoteDetail.vue

@ -129,7 +129,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
columnWidth: 68
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -147,7 +147,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 170
columnWidth: 180
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -165,7 +165,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80
columnWidth: 48
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -201,7 +201,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
columnWidth: 60
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -219,7 +219,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 55
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -237,7 +237,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 55
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -255,9 +255,27 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
}
,{
columnWidth: 55
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2AdjustToolCost',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'adjustToolCost',
headerAlign: 'center',
align: 'right',
columnLabel: 'Tooling Cost',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 55
},
{
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5011, functionId: 5011,
serialNumber: '5011Table2TotalCost', serialNumber: '5011Table2TotalCost',
@ -266,14 +284,14 @@ export default {
columnProp: 'totalCost', columnProp: 'totalCost',
headerAlign: 'center', headerAlign: 'center',
align: 'right', align: 'right',
columnLabel: 'Total Cost',
columnLabel: 'Total Cost(RMB/KCT)',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 70
columnWidth: 75
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -284,14 +302,14 @@ export default {
columnProp: 'quoteProfitRate', columnProp: 'quoteProfitRate',
headerAlign: 'center', headerAlign: 'center',
align: 'right', align: 'right',
columnLabel: 'markup(%)',
columnLabel: 'markup (%)',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 54
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -309,7 +327,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80
columnWidth: 65
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -345,7 +363,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80
columnWidth: 75
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -363,7 +381,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 180
columnWidth: 290
}, },
], ],
partVisible:false, partVisible:false,
@ -662,8 +680,8 @@ export default {
<template v-if="saveAuth"> <template v-if="saveAuth">
<el-button type="primary" v-if="!authFlag" :disabled="quote.status !== '草稿' || !quote.status" @click="handleSaveQuoteDetail(null)">新增</el-button> <el-button type="primary" v-if="!authFlag" :disabled="quote.status !== '草稿' || !quote.status" @click="handleSaveQuoteDetail(null)">新增</el-button>
</template> </template>
<el-table v-loading="queryLoading" border :data="dataList" style="width: 100%;margin-top: 5px" :height="height" @header-dragend="handleColumnResize">
<el-table-column width="80" align="center" label="默认报价行" v-if="quoteGroupDetail && quoteGroupDetail.status === '草稿'">
<el-table key="table" v-loading="queryLoading" border :data="dataList" style="width: 100%;margin-top: 5px" :height="height" @header-dragend="handleColumnResize">
<el-table-column width="50" align="center" label="默认行" v-if="quoteGroupDetail && quoteGroupDetail.status === '草稿'">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-radio <el-radio
class="radio" class="radio"
@ -681,7 +699,7 @@ export default {
:show-overflow-tooltip="item.showOverflowTooltip" :show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align" :align="item.align"
:fixed="item.fixed === ''?false:item.fixed" :fixed="item.fixed === ''?false:item.fixed"
:min-width="item.columnWidth"
:width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="numberProp.includes(item.columnProp)"> <template v-if="numberProp.includes(item.columnProp)">

55
src/views/modules/quote/detail/quoteGroupDetail.vue

@ -127,7 +127,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
columnWidth: 68
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -145,7 +145,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 170
columnWidth: 180
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -163,7 +163,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80
columnWidth: 48
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -199,7 +199,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
columnWidth: 60
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -217,7 +217,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 55
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -235,7 +235,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 55
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -253,9 +253,27 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
}
,{
columnWidth: 55
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2AdjustToolCost',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'adjustToolCost',
headerAlign: 'center',
align: 'right',
columnLabel: 'Tooling Cost',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 55
},
{
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5011, functionId: 5011,
serialNumber: '5011Table2TotalCost', serialNumber: '5011Table2TotalCost',
@ -264,14 +282,14 @@ export default {
columnProp: 'totalCost', columnProp: 'totalCost',
headerAlign: 'center', headerAlign: 'center',
align: 'right', align: 'right',
columnLabel: 'Total Cost',
columnLabel: 'Total Cost(RMB/KCT)',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 70
columnWidth: 75
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -282,14 +300,14 @@ export default {
columnProp: 'quoteProfitRate', columnProp: 'quoteProfitRate',
headerAlign: 'center', headerAlign: 'center',
align: 'right', align: 'right',
columnLabel: 'markup(%)',
columnLabel: 'markup (%)',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 54
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -307,7 +325,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80
columnWidth: 65
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -343,7 +361,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80
columnWidth: 75
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -361,7 +379,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 180
columnWidth: 290
}, },
], ],
partVisible:false, partVisible:false,
@ -645,7 +663,7 @@ export default {
:show-overflow-tooltip="item.showOverflowTooltip" :show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align" :align="item.align"
:fixed="item.fixed === ''?false:item.fixed" :fixed="item.fixed === ''?false:item.fixed"
:min-width="item.columnWidth"
:width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="numberProp.includes(item.columnProp)"> <template v-if="numberProp.includes(item.columnProp)">
@ -790,7 +808,6 @@ export default {
<el-dialog title="报价明细" v-drag :visible.sync="drawerVisible" top="10vh" width="1200px" append-to-body :close-on-click-modal="false"> <el-dialog title="报价明细" v-drag :visible.sync="drawerVisible" top="10vh" width="1200px" append-to-body :close-on-click-modal="false">
<el-table v-loading="queryLoading" <el-table v-loading="queryLoading"
@row-click="quoteGroupDetailRowClick" :row-style="rowStyle" border :data="dataList" style="width: 100%;margin-top: 5px;" height="250px"> @row-click="quoteGroupDetailRowClick" :row-style="rowStyle" border :data="dataList" style="width: 100%;margin-top: 5px;" height="250px">
<el-table-column type="index" width="55" align="center" label="序号"></el-table-column>
<el-table-column <el-table-column
v-for="(item,index) in columns" :key="index" v-for="(item,index) in columns" :key="index"
:sortable="item.columnSortable" :sortable="item.columnSortable"
@ -799,7 +816,7 @@ export default {
:show-overflow-tooltip="item.showOverflowTooltip" :show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align" :align="item.align"
:fixed="item.fixed === ''?false:item.fixed" :fixed="item.fixed === ''?false:item.fixed"
:min-width="item.columnWidth"
:width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>

198
src/views/modules/quote/detail/tpCost.vue

@ -37,7 +37,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
columnWidth: 68
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -55,7 +55,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 210
columnWidth: 180
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -73,7 +73,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80
columnWidth: 48
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -109,7 +109,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
columnWidth: 60
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -127,7 +127,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 55
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -145,7 +145,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 55
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -163,9 +163,27 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
}
,{
columnWidth: 55
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2AdjustToolCost',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'adjustToolCost',
headerAlign: 'center',
align: 'right',
columnLabel: 'Tooling Cost',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 55
},
{
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5011, functionId: 5011,
serialNumber: '5011Table2TotalCost', serialNumber: '5011Table2TotalCost',
@ -174,14 +192,14 @@ export default {
columnProp: 'totalCost', columnProp: 'totalCost',
headerAlign: 'center', headerAlign: 'center',
align: 'right', align: 'right',
columnLabel: 'Total Cost',
columnLabel: 'Total Cost(RMB/KCT)',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 70
columnWidth: 75
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -192,14 +210,14 @@ export default {
columnProp: 'quoteProfitRate', columnProp: 'quoteProfitRate',
headerAlign: 'center', headerAlign: 'center',
align: 'right', align: 'right',
columnLabel: 'markup(%)',
columnLabel: 'markup (%)',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 54
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -217,7 +235,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80
columnWidth: 65
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -253,7 +271,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80
columnWidth: 75
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -271,7 +289,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 260
columnWidth: 448
}, },
], ],
} }
@ -303,79 +321,79 @@ export default {
this.$message.error(error); this.$message.error(error);
}) })
}, },
alignIsNan(key,arr){
for (let i = 0; i < arr.length; i++) {
let item = arr[i];
if (isNaN(item[key])){
return 'left';
}
}
return 'right';
},
flexColumnWidth (str, arr1, flag = 'max') {
str = str + ''
let columnContent = ''
if (flag === 'equal') {
// ()
for (let i = 0; i < arr1.length; i++) {
if (arr1[i][str].length > 0) {
// console.log('[0]:', arr1[0][str])
columnContent = arr1[i][str]
break
}
}
} else {
// ()
let index = 0
for (let i = 0; i < arr1.length; i++) {
if (arr1[i][str] === null) {
continue
}
const now_temp = arr1[i][str] + ''
const max_temp = arr1[index][str] + ''
if (now_temp.length > max_temp.length) {
index = i
}
}
columnContent = arr1[index][str]+''
}
let flexWidth = 0
if (columnContent && columnContent.length > 0){
for (const char of columnContent) {
if ((char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z')) {
// 8
flexWidth += 8
} else if (char >= '\u4e00' && char <= '\u9fa5') {
// 15
flexWidth += 15
} else {
// 8
flexWidth += 8
}
}
}
let flexWidthStr = 0
for (const char of str){
if ((char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z')) {
// 8
flexWidthStr += 8
} else if (char >= '\u4e00' && char <= '\u9fa5') {
// 15
flexWidthStr += 15
} else {
// 8
flexWidthStr += 8
}
}
if (flexWidthStr > flexWidth){
flexWidth = flexWidthStr
}
if (flexWidth < 120) {
//
flexWidth = 120
}
return flexWidth + 'px'
},
// alignIsNan(key,arr){
// for (let i = 0; i < arr.length; i++) {
// let item = arr[i];
// if (isNaN(item[key])){
// return 'left';
// }
// }
// return 'right';
// },
// flexColumnWidth (str, arr1, flag = 'max') {
// str = str + ''
// let columnContent = ''
// if (flag === 'equal') {
// // ()
// for (let i = 0; i < arr1.length; i++) {
// if (arr1[i][str].length > 0) {
// // console.log('[0]:', arr1[0][str])
// columnContent = arr1[i][str]
// break
// }
// }
// } else {
// // ()
// let index = 0
// for (let i = 0; i < arr1.length; i++) {
// if (arr1[i][str] === null) {
// continue
// }
// const now_temp = arr1[i][str] + ''
// const max_temp = arr1[index][str] + ''
// if (now_temp.length > max_temp.length) {
// index = i
// }
// }
// columnContent = arr1[index][str]+''
// }
// let flexWidth = 0
// if (columnContent && columnContent.length > 0){
// for (const char of columnContent) {
// if ((char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z')) {
// // 8
// flexWidth += 8
// } else if (char >= '\u4e00' && char <= '\u9fa5') {
// // 15
// flexWidth += 15
// } else {
// // 8
// flexWidth += 8
// }
// }
// }
// let flexWidthStr = 0
// for (const char of str){
// if ((char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z')) {
// // 8
// flexWidthStr += 8
// } else if (char >= '\u4e00' && char <= '\u9fa5') {
// // 15
// flexWidthStr += 15
// } else {
// // 8
// flexWidthStr += 8
// }
// }
// if (flexWidthStr > flexWidth){
// flexWidth = flexWidthStr
// }
// if (flexWidth < 120) {
// //
// flexWidth = 120
// }
// return flexWidth + 'px'
// },
toFixed(val,fixed){ toFixed(val,fixed){
if (!val || isNaN(val) || !fixed){ if (!val || isNaN(val) || !fixed){
return val return val
@ -414,7 +432,7 @@ export default {
:show-overflow-tooltip="item.showOverflowTooltip" :show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align" :align="item.align"
:fixed="item.fixed === ''?false:item.fixed" :fixed="item.fixed === ''?false:item.fixed"
:min-width="item.columnWidth"
:width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="numberProp.includes(item.columnProp)"> <template v-if="numberProp.includes(item.columnProp)">

Loading…
Cancel
Save