分区充值统计
(cherry picked from commit 5f2cb18b6a89696b8285173ed4862629e1b0f73c)
This commit is contained in:
154
src/views/users/ChargeRecordPartitionStatisticsView.vue
Normal file
154
src/views/users/ChargeRecordPartitionStatisticsView.vue
Normal file
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<section class="content-body">
|
||||
<div id="toolbar">
|
||||
<div class="col-sm-12">
|
||||
<div class="pull-left">
|
||||
<form id="searchForm"
|
||||
class="col-sm-pull-12"
|
||||
action="/admin/chargeRecord/exportPartitionDetail"
|
||||
method="get"
|
||||
target="_blank">
|
||||
<div class="col-sm-11">
|
||||
<label for="beginDate"
|
||||
class="col-sm-2 control-label">开始日期:</label>
|
||||
<div class="col-sm-4"><input type="text"
|
||||
class="form-control"
|
||||
name="beginDate"
|
||||
id="beginDate"
|
||||
placeholder="必填"></div>
|
||||
<label for="endDate"
|
||||
class="col-sm-2 control-label">结束日期:</label>
|
||||
<div class="col-sm-4"><input type="text"
|
||||
class="form-control"
|
||||
name="endDate"
|
||||
id="endDate"
|
||||
placeholder="必填"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<button id="btnSearch"
|
||||
class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-search"></i>查询
|
||||
</button>
|
||||
<button id="btnExport"
|
||||
class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-export"></i>导出
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "ChargeRecordPartitionStatisticsView",
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData () {
|
||||
|
||||
$(function () {
|
||||
var chargeStart = $('#beginDate').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
chargeStart.datepicker("setDate", new Date(new Date() - 7 * 24 * 60 * 60 * 1000))
|
||||
|
||||
var chargeEnd = $('#endDate').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
chargeEnd.datepicker("setDate", new Date())
|
||||
|
||||
chargeStart.on('changeDate', function () {
|
||||
var date = $('#beginDate').datepicker('getDate');
|
||||
chargeEnd.datepicker('setStartDate', date);
|
||||
});
|
||||
chargeEnd.on('changeDate', function () {
|
||||
var date = $('#endDate').datepicker('getDate');
|
||||
chargeStart.datepicker('setEndDate', date);
|
||||
});
|
||||
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'partitionName', title: '分区', align: 'center', width: '25%' },
|
||||
{ field: 'googleGold', title: 'google充值金币', align: 'center', width: '25%' },
|
||||
{ field: 'payermaxGold', title: 'payermax充值金币', align: 'center', width: '25%' },
|
||||
{ field: 'myCardGold', title: 'myCard充值金币', align: 'center', width: '25%' },
|
||||
{ field: 'iosGold', title: 'ios充值金币', align: 'center', width: '25%' },
|
||||
{ field: 'totalGold', title: '总充值金币', align: 'center', width: '25%' },
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pagination: false,
|
||||
search: false,
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
beginDate: $('#beginDate').val(),
|
||||
endDate: $('#endDate').val()
|
||||
};
|
||||
return param;
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
url: '/admin/chargeRecord/partitionDetail',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
// 导出EXCEL
|
||||
$('#btnExport').on('click', function () {
|
||||
if (!$('#beginDate').val() || !$('#endDate').val()) {
|
||||
$("#tipMsg").text("请输入必填的信息");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
$("#searchForm").submit();
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
if (!$('#beginDate').val() || !$('#endDate').val()) {
|
||||
$("#tipMsg").text("请输入必填的信息");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
Reference in New Issue
Block a user