Browse Source

修复运营数据

master
Klein Blue 2 years ago
parent
commit
fba9c52735
4 changed files with 44 additions and 8 deletions
  1. 6
    0
      src/styles/index.scss
  2. 23
    7
      src/utils/mixins.js
  3. 1
    0
      src/views/tongji/gongshiyingyun.vue
  4. 14
    1
      src/views/tongji/yingyun.vue

+ 6
- 0
src/styles/index.scss View File

@@ -152,3 +152,9 @@ div:focus {
text-align: center;
font-size: 13px;
}
.He {
cursor: pointer;
}
.He:hover{
color: rgba(2,167,240);
}

+ 23
- 7
src/utils/mixins.js View File

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

+ 1
- 0
src/views/tongji/gongshiyingyun.vue View File

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

+ 14
- 1
src/views/tongji/yingyun.vue View File

@@ -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 = "";

Loading…
Cancel
Save