|
@@ -411,12 +411,14 @@
|
|
|
|
|
|
function getSummaries(param) {
|
|
function getSummaries(param) {
|
|
const { columns, data } = param;
|
|
const { columns, data } = param;
|
|
|
|
+ console.log(23, param);
|
|
|
|
+
|
|
const sums = [];
|
|
const sums = [];
|
|
columns.forEach((column, index) => {
|
|
columns.forEach((column, index) => {
|
|
if (index === 0) {
|
|
if (index === 0) {
|
|
sums[index] = "合计";
|
|
sums[index] = "合计";
|
|
return;
|
|
return;
|
|
- } else if (index === 1) {
|
|
|
|
|
|
+ } else if (index === 1 ) {
|
|
sums[index] = "";
|
|
sums[index] = "";
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -424,6 +426,7 @@
|
|
|
|
|
|
if (!values.every((value) => isNaN(value))) {
|
|
if (!values.every((value) => isNaN(value))) {
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ console.log(23,prev, curr);
|
|
const value = Number(curr);
|
|
const value = Number(curr);
|
|
if (!isNaN(value)) {
|
|
if (!isNaN(value)) {
|
|
return (Number(prev) + Number(curr)).toFixed(2);
|
|
return (Number(prev) + Number(curr)).toFixed(2);
|