|
@@ -73,14 +73,22 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="app-container_table" :class="showSearch ? 'mt15' : ''">
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
+ <!-- <el-row :gutter="10" class="mb8">
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
<div class="app-container_table_main">
|
|
|
- <el-table ref="tables" v-loading="loading" :data="dataList" border height="100%">
|
|
|
+ <el-table
|
|
|
+ ref="tables"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="dataList"
|
|
|
+ :summary-method="getSummaries"
|
|
|
+ show-summary
|
|
|
+ border
|
|
|
+ max-height="520px"
|
|
|
+ >
|
|
|
<el-table-column label="序号" align="center" type="index" width="60"></el-table-column>
|
|
|
- <el-table-column label="订单号" align="center" prop="orderId" />
|
|
|
- <el-table-column label="订单金额(元)" align="center" prop="invoiceAmount" />
|
|
|
+ <el-table-column label="订单号" align="center" prop="orderId" width="170" />
|
|
|
+ <el-table-column label="订单金额(元)" align="center" prop="invoiceAmount" width="110" />
|
|
|
<el-table-column label="类型" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="dict.type.lookup_type" :value="scope.row.handlerType"/>
|
|
@@ -92,7 +100,7 @@
|
|
|
<span v-else-if="scope.row.invoiceLine == 'pc'">数电普票</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="抬头名称" align="center" prop="name" />
|
|
|
+ <el-table-column label="抬头名称" align="center" prop="name" width="120" />
|
|
|
<el-table-column label="税号" align="center" prop="creditCode" />
|
|
|
<el-table-column label="发票备注" align="center" prop="remark" width="160" show-overflow-tooltip />
|
|
|
<el-table-column label="状态" align="center">
|
|
@@ -223,6 +231,31 @@ export default {
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
|
},
|
|
|
+ getSummaries(param) {
|
|
|
+ const { columns, data } = param;
|
|
|
+ const sums = [];
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = '合计';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const values = data.map(item => Number(item[column.property]));
|
|
|
+ if (!values.every(value => isNaN(value)) && column.property == 'invoiceAmount') {
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + curr;
|
|
|
+ } else {
|
|
|
+ return prev;
|
|
|
+ }
|
|
|
+ }, 0);
|
|
|
+ sums[index] = Number(sums[index].toFixed(2));
|
|
|
+ } else {
|
|
|
+ sums[index] = '';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return sums;
|
|
|
+ },
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|