|
@@ -174,7 +174,6 @@
|
|
import {
|
|
import {
|
|
getK3ReceiptList,
|
|
getK3ReceiptList,
|
|
getK3ReceiptAbandon,
|
|
getK3ReceiptAbandon,
|
|
- getK3ReceiptExport,
|
|
|
|
} from "@/api/finance/receipt_list";
|
|
} from "@/api/finance/receipt_list";
|
|
import ReceiptListDetail from "./components/receipt_list-detail";
|
|
import ReceiptListDetail from "./components/receipt_list-detail";
|
|
import { numToFixed } from "@/filters";
|
|
import { numToFixed } from "@/filters";
|
|
@@ -217,36 +216,23 @@ export default {
|
|
getSummaries(param) {
|
|
getSummaries(param) {
|
|
const { columns, data } = param;
|
|
const { columns, data } = param;
|
|
const sums = [];
|
|
const sums = [];
|
|
|
|
+
|
|
columns.forEach((column, index) => {
|
|
columns.forEach((column, index) => {
|
|
if (index === 0) {
|
|
if (index === 0) {
|
|
sums[index] = "合计";
|
|
sums[index] = "合计";
|
|
}
|
|
}
|
|
|
|
+
|
|
if (index === 7) {
|
|
if (index === 7) {
|
|
- let map1 = data.map((v) => {
|
|
|
|
|
|
+ let arr = [];
|
|
|
|
+ data.forEach((v) => {
|
|
if (v.billType == 2 || v.billType == 3) {
|
|
if (v.billType == 2 || v.billType == 3) {
|
|
- v.amount * -1;
|
|
|
|
- }
|
|
|
|
- return v.amount;
|
|
|
|
- });
|
|
|
|
- console.log(map1);
|
|
|
|
- let aa = map1.reduce((prev, curr) => {
|
|
|
|
- const value = Number(curr);
|
|
|
|
- if (!isNaN(value)) {
|
|
|
|
- return prev + curr;
|
|
|
|
|
|
+ arr.push(-v.amount);
|
|
} else {
|
|
} else {
|
|
- return prev;
|
|
|
|
- }
|
|
|
|
- }, 0);
|
|
|
|
- sums[index] = numToFixed(aa);
|
|
|
|
- }
|
|
|
|
- if (index === 10) {
|
|
|
|
- let map1 = data.map((v) => {
|
|
|
|
- if (v.billType == 2 || v.billType == 3) {
|
|
|
|
- v.amount * -1;
|
|
|
|
|
|
+ arr.push(v.amount);
|
|
}
|
|
}
|
|
- return v.amount;
|
|
|
|
});
|
|
});
|
|
- let a = map1.reduce((prev, curr) => {
|
|
|
|
|
|
+
|
|
|
|
+ let a = arr.reduce((prev, curr) => {
|
|
const value = Number(curr);
|
|
const value = Number(curr);
|
|
if (!isNaN(value)) {
|
|
if (!isNaN(value)) {
|
|
return prev + curr;
|
|
return prev + curr;
|
|
@@ -255,6 +241,7 @@ export default {
|
|
}
|
|
}
|
|
}, 0);
|
|
}, 0);
|
|
sums[index] = numToFixed(a);
|
|
sums[index] = numToFixed(a);
|
|
|
|
+ sums[10] = numToFixed(a);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
return sums;
|
|
return sums;
|