|
@@ -60,7 +60,7 @@
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<div class="mymain-container">
|
|
<div class="mymain-container">
|
|
<div class="table">
|
|
<div class="table">
|
|
- <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe show-summary :summary-method="$getSummaries">
|
|
|
|
|
|
+ <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe show-summary :summary-method="getSummaries">
|
|
<el-table-column align="left" label="序号" type="index" width="80" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="left" label="序号" type="index" width="80" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="left" label="月份" prop="month" min-width="100" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="left" label="月份" prop="month" min-width="100" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="left" label="对账状态" prop="isReconciliation" min-width="100" show-overflow-tooltip>
|
|
<el-table-column align="left" label="对账状态" prop="isReconciliation" min-width="100" show-overflow-tooltip>
|
|
@@ -99,7 +99,7 @@
|
|
<el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="right" label="收付款金额" prop="amount" min-width="130" show-overflow-tooltip>
|
|
<el-table-column align="right" label="收付款金额" prop="amount" min-width="130" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{ scope.row.amount | numToFixed }}
|
|
|
|
|
|
+ {{(scope.row.amountType == 'OUT'? -scope.row.amount:scope.row.amount) | numToFixed }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<!-- <el-table-column
|
|
<!-- <el-table-column
|
|
@@ -131,6 +131,7 @@ import {
|
|
getWalletCustomerList,
|
|
getWalletCustomerList,
|
|
} from "@/api/finance/account_list";
|
|
} from "@/api/finance/account_list";
|
|
import AccountListDetail from "./components/account_list-detail";
|
|
import AccountListDetail from "./components/account_list-detail";
|
|
|
|
+import { numToFixed } from "@/filters";
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
AccountListDetail,
|
|
AccountListDetail,
|
|
@@ -176,6 +177,37 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //合计
|
|
|
|
+ getSummaries(param) {
|
|
|
|
+ const { columns, data } = param;
|
|
|
|
+ const sums = [];
|
|
|
|
+ columns.forEach((column, index) => {
|
|
|
|
+ if (index === 0) {
|
|
|
|
+ sums[index] = "合计";
|
|
|
|
+ }
|
|
|
|
+ if (index === 10) {
|
|
|
|
+ let arr = [];
|
|
|
|
+ data.forEach((v) => {
|
|
|
|
+ if (v.amountType == "OUT") {
|
|
|
|
+ arr.push(-v.amount);
|
|
|
|
+ } else {
|
|
|
|
+ arr.push(v.amount);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ let a = arr.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return prev + curr;
|
|
|
|
+ } else {
|
|
|
|
+ return prev;
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index] = numToFixed(a);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return sums;
|
|
|
|
+ },
|
|
//清空
|
|
//清空
|
|
clearFn() {
|
|
clearFn() {
|
|
this.$refs.searchForm.resetFields();
|
|
this.$refs.searchForm.resetFields();
|
|
@@ -226,10 +258,10 @@ export default {
|
|
//获取列表
|
|
//获取列表
|
|
async getDataList(data) {
|
|
async getDataList(data) {
|
|
let res = await getFinanceStandingBookList(data);
|
|
let res = await getFinanceStandingBookList(data);
|
|
- res.data.records.forEach((item) => {
|
|
|
|
- item.sums1 = [];
|
|
|
|
- item.sums2 = ["amount"];
|
|
|
|
- });
|
|
|
|
|
|
+ // res.data.records.forEach((item) => {
|
|
|
|
+ // item.sums1 = [];
|
|
|
|
+ // item.sums2 = ["amount"];
|
|
|
|
+ // });
|
|
this.dataList = res.data.records;
|
|
this.dataList = res.data.records;
|
|
this.listTotal = res.data.total;
|
|
this.listTotal = res.data.total;
|
|
},
|
|
},
|