@@ -152,3 +152,9 @@ div:focus { | |||
text-align: center; | |||
font-size: 13px; | |||
} | |||
.He { | |||
cursor: pointer; | |||
} | |||
.He:hover{ | |||
color: rgba(2,167,240); | |||
} |
@@ -19,16 +19,32 @@ export default { | |||
} | |||
}, | |||
Formatter(row, column, cellValue, index) { | |||
// console.log('value',row,column,cellValue,index); | |||
let ee = parseFloat(cellValue); | |||
if(ee){ | |||
return ee.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,") | |||
} | |||
return cellValue ==undefined? "0.00":cellValue | |||
}, | |||
RatioFormatter(row, column, cellValue, index) { | |||
// console.log('value',row,column,cellValue,index); | |||
RatioFormatter(row, column, cellValue, index,value) { | |||
return cellValue ==undefined? "0.00%":cellValue | |||
}, | |||
// All_moneyFormatter(row, column, cellValue, index) { | |||
// console.log('value',row,column,cellValue,index); | |||
// return cellValue | |||
// }, | |||
CompanyOperation(value) { | |||
let num = 0.0; | |||
let ee = parseFloat(value.all_money); | |||
if (isNaN(ee)) { | |||
return num.toFixed(2); | |||
} else { | |||
return ee.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,") | |||
} | |||
}, | |||
Companyheji(value) { | |||
let num = 0.0; | |||
let ee = parseFloat(value.heji); | |||
if (isNaN(ee)) { | |||
return num.toFixed(2); | |||
} else { | |||
return ee.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,") | |||
} | |||
}, | |||
} | |||
} |
@@ -32,6 +32,7 @@ | |||
property="all_money" | |||
width="115" | |||
align="right" | |||
:formatter="CompanyOperation" | |||
></el-table-column> | |||
<template v-for="(item, index) in project_head_filter"> | |||
<el-table-column |
@@ -37,7 +37,7 @@ | |||
:cell-style="tableCellStyle" | |||
:cell-class-name="customerstyle" | |||
:header-row-class-name="headclass" | |||
:header-cell-class-name="headerClassName" | |||
> | |||
<el-table-column | |||
fixed | |||
@@ -54,6 +54,7 @@ | |||
property="all_money" | |||
width="115" | |||
align="right" | |||
:formatter="CompanyOperation" | |||
></el-table-column> | |||
<template v-for="(item, index) in gongsi_all_head"> | |||
<el-table-column | |||
@@ -84,6 +85,7 @@ | |||
property="heji" | |||
width="115" | |||
align="right" | |||
:formatter="Companyheji" | |||
></el-table-column> | |||
<el-table-column | |||
fixed="right" | |||
@@ -433,6 +435,17 @@ export default { | |||
this.companyDetail = true; | |||
} | |||
}, | |||
headerClassName({column}){ | |||
if ( | |||
column.label != "月份" && | |||
column.label != "总计" && | |||
column.label != "比率" && | |||
column.label != "合计比率" && | |||
column.label != "合计" | |||
) { | |||
return "He" | |||
} | |||
}, | |||
returnPage() { | |||
this.companyDetail = false; | |||
this.companyname_select = ""; |