|
|
@@ -7,10 +7,8 @@
|
|
|
<div class="title-left">
|
|
|
<div class="title">充值记录</div>
|
|
|
<div class="title-detail">总余额:{{total_balance}}元</div>
|
|
|
- <div class="title-detail">总充值:{{total_recharge}}元</div>
|
|
|
- <div class="title-detail">线上:{{online_recharge}}元</div>
|
|
|
- <div class="title-detail">线下:{{offline_recharge}}元</div>
|
|
|
- <div class="title-detail">总交易笔数:{{total_number}}笔</div>
|
|
|
+ <div class="title-detail">总充值:{{recharge.total}}元【线上:{{recharge.online}}元,线下:{{recharge.offline}}元】</div>
|
|
|
+ <div class="title-detail">总交易笔数:{{number.total}}笔【线上:{{number.online}}笔,线下:{{number.offline}}笔】</div>
|
|
|
</div>
|
|
|
<div class="title-right">
|
|
|
<el-button type="primary" @click="handler_download_excel">导出表单</el-button>
|
|
|
@@ -25,9 +23,8 @@
|
|
|
<el-button type="warning" @click="btn_search">查询</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="时间筛选:">
|
|
|
- <el-date-picker v-model="search_datatime" type="datetimerange" align="right"
|
|
|
- start-placeholder="开始日期" end-placeholder="结束日期" @change="search_datetime_change"
|
|
|
- :default-time="['12:00:00', '08:00:00']" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ <el-date-picker v-model="search_datatime" type="datetimerange" align="right" start-placeholder="开始日期" end-placeholder="结束日期"
|
|
|
+ @change="search_datetime_change" :default-time="['12:00:00', '08:00:00']" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
format="yyyy-MM-dd HH:mm:ss" clearable>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
@@ -42,8 +39,8 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table :data="tableData" height="510" style="width: 100%" :cell-style="cell_style"
|
|
|
- v-loading="loading" :header-cell-style="header_cell_style">
|
|
|
+ <el-table :data="tableData" height="510" style="width: 100%" :cell-style="cell_style" v-loading="loading"
|
|
|
+ :header-cell-style="header_cell_style">
|
|
|
<el-table-column label="序号" align="center" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{(pagination.currentPage - 1) * pagination.pageSize + scope.$index + 1}}</span>
|
|
|
@@ -101,8 +98,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="pagination-table">
|
|
|
- <el-pagination @current-change="currentPageChange"
|
|
|
- :current-page.sync="pagination.currentPage" :page-size="pagination.pageSize"
|
|
|
+ <el-pagination @current-change="currentPageChange" :current-page.sync="pagination.currentPage" :page-size="pagination.pageSize"
|
|
|
layout="prev, pager, next, jumper" :total="pagination.total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
@@ -123,10 +119,16 @@
|
|
|
data() {
|
|
|
return {
|
|
|
total_balance: 0.0.toFixed(2), // 总余额
|
|
|
- total_recharge: 0.0.toFixed(2), // 总充值
|
|
|
- online_recharge: 0.0.toFixed(2), // 线上充值
|
|
|
- offline_recharge: 0.0.toFixed(2), // 线下充值
|
|
|
- total_number: 0, // 总交易笔数
|
|
|
+ recharge: {
|
|
|
+ online: 0.0.toFixed(2), // 线上充值
|
|
|
+ offline: 0.0.toFixed(2), // 线下充值
|
|
|
+ total: 0.0.toFixed(2) // 线上+线下 的总充值
|
|
|
+ },
|
|
|
+ number: {
|
|
|
+ online: 0, // 线上总笔数
|
|
|
+ offline: 0, // 线下总笔试
|
|
|
+ total: 0 // 线上+线下 的总交易笔数
|
|
|
+ },
|
|
|
formLabelWidth: '120px',
|
|
|
// 表格单元格样式
|
|
|
cell_style: {
|
|
|
@@ -222,19 +224,35 @@
|
|
|
*/
|
|
|
get_three_data() {
|
|
|
this.get_condtion();
|
|
|
-
|
|
|
+
|
|
|
getThreeData(this.cond_data).then((res) => {
|
|
|
// console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
- this.total_balance = res.TotalYe.toFixed(2) // 总余额
|
|
|
- this.total_recharge = res.zongRecharge.toFixed(2) // 总消费
|
|
|
- this.total_number = res.zongRecord // 总交易笔数
|
|
|
+ if (typeof res.zongRo == 'undefined') {
|
|
|
+ res.zongRo = 0; // 测试数据,以防undefined,上线需删除
|
|
|
+ }
|
|
|
+ if (typeof res.zongRo == 'undefined') {
|
|
|
+ res.numRo = 0; // 测试数据,以防undefined,上线需删除
|
|
|
+ }
|
|
|
+ this.total_balance = res.TotalYe.toFixed(2); // 总余额
|
|
|
+ // 总充值
|
|
|
+ this.recharge = {
|
|
|
+ online: res.zongRecharge.toFixed(2), // 线上总充值
|
|
|
+ offline: res.zongRo.toFixed(2), // 线下总充值
|
|
|
+ total: res.zongRecharge + res.zongRo // 线上+线下 的总充值
|
|
|
+ };
|
|
|
+ // 总交易笔数
|
|
|
+ this.number = {
|
|
|
+ online: res.zongRecord, // 线上总交易笔数
|
|
|
+ offline: res.numRo, // 线下总交易笔数
|
|
|
+ total: res.zongRecord + res.numRo // 线上+线下 的总交易笔数
|
|
|
+ };
|
|
|
} else {
|
|
|
- this.$message.error(res.message)
|
|
|
+ this.$message.error(res.message);
|
|
|
}
|
|
|
}).catch((err) => {
|
|
|
// console.log(err);
|
|
|
- this.$message.error(err.message)
|
|
|
+ this.$message.error(err.message);
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
|
@@ -243,7 +261,7 @@
|
|
|
get_table_data(param) {
|
|
|
this.loading = true
|
|
|
this.get_condtion();
|
|
|
-
|
|
|
+
|
|
|
let data = this.cond_data;
|
|
|
if (param == 'search') {
|
|
|
data.page = 1
|
|
|
@@ -292,7 +310,7 @@
|
|
|
if (this.formInline.state !== '') {
|
|
|
data.state = this.formInline.state
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.cond_data = data;
|
|
|
},
|
|
|
/**
|
|
|
@@ -521,4 +539,4 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|