Commit f35e7221 authored by 王悦's avatar 王悦

年度营收报表

parent e644d1fc
...@@ -507,7 +507,6 @@ tr._item_list td:last-child { ...@@ -507,7 +507,6 @@ tr._item_list td:last-child {
:total="total" :total="total"
:pageSize="msg.pageSize" :pageSize="msg.pageSize"
:pageIndex="msg.pageIndex" :pageIndex="msg.pageIndex"
:handleCurrentChange="handleCurrentChanges"
:row-height="30" :row-height="30"
:column-cell-class-name="columnCellClass" :column-cell-class-name="columnCellClass"
@on-custom-comp="customCompFunc" @on-custom-comp="customCompFunc"
...@@ -695,7 +694,7 @@ export default { ...@@ -695,7 +694,7 @@ export default {
if (!this.msg.LineTeamId) this.msg.LineTeamId = 0; if (!this.msg.LineTeamId) this.msg.LineTeamId = 0;
if (!this.msg.TCID) this.msg.TCID = 0; if (!this.msg.TCID) this.msg.TCID = 0;
if (this.msg.QStartDate == "") this.msg.QStartDatetartDate = "2019-01-01"; if (this.msg.QStartDate == "") this.msg.QStartDatetartDate = "2019-01-01";
this.apipost('financestatistics_post_GetYearReportList', {}, res=>{ this.apipost('financestatistics_post_GetYearReportList', this.msg, res=>{
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let allDataList = res.data.data let allDataList = res.data.data
this.DataList = res.data.data.list this.DataList = res.data.data.list
...@@ -730,12 +729,14 @@ export default { ...@@ -730,12 +729,14 @@ export default {
isResize: true, isResize: true,
result: "", result: "",
filterMultiple: false, filterMultiple: false,
formatter: this.moneyFormat,
type: "text", type: "text",
isFrozen: true, isFrozen: true,
}, },
{ {
field: "RemarkValue", field: "RemarkValue",
title: allDataList.NowYear, title: allDataList.NowYear,
formatter: this.moneyFormat,
width: 80, width: 80,
titleAlign: "left", titleAlign: "left",
columnAlign: "left", columnAlign: "left",
...@@ -754,6 +755,7 @@ export default { ...@@ -754,6 +755,7 @@ export default {
{ {
field: "RemarkValue", field: "RemarkValue",
title: allDataList.NowYear, title: allDataList.NowYear,
formatter: this.moneyFormat,
width: 100, width: 100,
titleAlign: "left", titleAlign: "left",
columnAlign: "left", columnAlign: "left",
...@@ -762,6 +764,7 @@ export default { ...@@ -762,6 +764,7 @@ export default {
{ {
field: "NRemarkValue", field: "NRemarkValue",
title: allDataList.NYear, title: allDataList.NYear,
formatter: this.moneyFormat,
width: 100, width: 100,
titleAlign: "left", titleAlign: "left",
columnAlign: "left", columnAlign: "left",
...@@ -785,12 +788,34 @@ export default { ...@@ -785,12 +788,34 @@ export default {
} }
}) })
}, },
moneyFormat(rowData, rowIndex, pagingIndex, field) {
if (field === "BRemarkValue") return this.priceFormat(rowData.BRemarkValue);
if (field === "RemarkValue") return this.priceFormat(rowData.RemarkValue);
if (field === "NRemarkValue") return this.priceFormat(rowData.NRemarkValue);
},
priceFormat(value) {
if (value == null) {
return 0.0;
}
let nStr = value.toFixed(2);
nStr += "";
let x = nStr.split(".");
let x1 = x[0];
let x2 = x.length > 1 ? "." + x[1] : "";
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, "$1" + "," + "$2");
}
return x1 + x2;
},
method5: function() { method5: function() {
this.loading = true;
this.GetLocalFile( this.GetLocalFile(
"financestatistics_post_OutToExcelYearReportList", "financestatistics_post_OutToExcelYearReportList",
this.msg, this.msg,
"年度营收报表.xls" "年度营收报表.xls"
); );
this.loading = false;
}, },
columnCellClass(rowIndex, columnName, rowData) { columnCellClass(rowIndex, columnName, rowData) {
if (columnName === "Compare1" || columnName === "Compare2") { if (columnName === "Compare1" || columnName === "Compare2") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment