各区【充值统计】增加V5_Play,今日充值数据/累计充值数据增加V5_Play,以及重构以上页面
This commit is contained in:
67
src/api/users/ChargeRecordPartitionStatisticsView.js
Normal file
67
src/api/users/ChargeRecordPartitionStatisticsView.js
Normal file
@@ -0,0 +1,67 @@
|
||||
import request from "@/utils/request";
|
||||
// 各分区充值统计-列表
|
||||
export const getChargeRecordPartitionDetail = query => {
|
||||
return request({
|
||||
url: '/admin/chargeRecord/partitionDetail',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 各分区充值统计-导出
|
||||
export const exportPartitionDetail = query => {
|
||||
return request({
|
||||
url: `/admin/chargeRecord/exportPartitionDetail`,
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
// 今日充值统计-列表
|
||||
export const getChargeRecordDailtList = query => {
|
||||
return request({
|
||||
url: '/admin/chargeRecord/dailylist',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 今日充值统计-今日充值数据
|
||||
export const getChargeRecordDailyTotal = query => {
|
||||
return request({
|
||||
url: '/admin/chargeRecord/dailytotal',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 今日充值统计-明细
|
||||
export const getChargeRecordDailyDetail = query => {
|
||||
return request({
|
||||
url: '/admin/chargeRecord/dailydetail',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 累计充值数据 - 列表
|
||||
export const getChargeRecordTotalList = query => {
|
||||
return request({
|
||||
url: '/admin/chargeRecord/totallist',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 累计充值数据 - 明细
|
||||
export const getChargeRecordTotalDetail = query => {
|
||||
return request({
|
||||
url: '/admin/chargeRecord/totaldetail',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 累计充值数据 - 导出
|
||||
export const exportChargeRecordTotalExport = query => {
|
||||
return request({
|
||||
url: '/admin/chargeRecord/totalexport',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
};
|
@@ -1,162 +1,167 @@
|
||||
<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">
|
||||
<input type="number"
|
||||
name="partitionId"
|
||||
value="2"
|
||||
hidden />
|
||||
<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 class="box">
|
||||
<div class="inquire">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="dataTime"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</section>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button class="primary" type="primary" @click="confirmExportExcel()"
|
||||
>导出</el-button
|
||||
>
|
||||
<!-- 表格数据 -->
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column prop="v5payUsd" align="center" label="
|
||||
V5play充值美元" />
|
||||
<el-table-column prop="googleUsd" align="center" label="google充值美元" />
|
||||
<el-table-column prop="razerUsd" align="center" label="razer充值" />
|
||||
<el-table-column
|
||||
prop="payermaxUsd"
|
||||
align="center"
|
||||
label="payermax充值美元"
|
||||
/>
|
||||
<el-table-column prop="myCardUsd" align="center" label="myCard充值美元" />
|
||||
<el-table-column
|
||||
prop="startPayUsd"
|
||||
align="center"
|
||||
label="startPay充值美元"
|
||||
/>
|
||||
<el-table-column prop="iosUsd" align="center" label="ios充值美元" />
|
||||
<el-table-column prop="companyUsd" align="center" label="对公打款美元" />
|
||||
<el-table-column prop="totalUsd" align="center" label="总充值美元" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "ChargeRecordArPartitionStatisticsView",
|
||||
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: 'date', title: '日期', align: 'center', width: '14%' },
|
||||
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
|
||||
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
||||
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pagination: false,
|
||||
search: false,
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
partitionId: 2,
|
||||
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>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import {getChargeRecordPartitionDetail,exportPartitionDetail} from '@/api/users/ChargeRecordPartitionStatisticsView.js'
|
||||
import { formatDate } from "@/utils/relDate";
|
||||
|
||||
<style scoped></style>
|
||||
const dataTime = ref([]);
|
||||
const formData = reactive({
|
||||
beginDate: "",
|
||||
endDate: "",
|
||||
partitionId:2
|
||||
});
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
});
|
||||
// 查询
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
if (dataTime.value && dataTime.value.length > 0) {
|
||||
formData.beginDate = dateFormat(dataTime.value[0], "yyyy-MM-dd");
|
||||
formData.endDate = dateFormat(dataTime.value[1], "yyyy-MM-dd");
|
||||
} else {
|
||||
formData.beginDate = dataTime.value;
|
||||
formData.endDate = dataTime.value;
|
||||
}
|
||||
getChargeRecordPartitionDetail(formData).then((res) => {
|
||||
tableData.data = res;
|
||||
tableData.loading = false;
|
||||
});
|
||||
};
|
||||
// 导出
|
||||
const confirmExportExcel = async () => {
|
||||
// Object.assign(formData, { pageSize: 10000, pageNo: 1 });
|
||||
try {
|
||||
const res = await exportPartitionDetail(formData);
|
||||
if (res) {
|
||||
ElMessage({
|
||||
message: "导出成功",
|
||||
type: "success",
|
||||
});
|
||||
let time = formatDate(new Date());
|
||||
let alink = document.createElement("a");
|
||||
alink.download = `分区充值统计${time}.xls`;
|
||||
alink.style.display = "none";
|
||||
const blob = new Blob([res]);
|
||||
alink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(alink);
|
||||
alink.click();
|
||||
URL.revokeObjectURL(alink.href);
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage({
|
||||
message: error.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 设置默认日期范围(今天到7天前)
|
||||
const setDefaultDateRange = () => {
|
||||
const today = new Date();
|
||||
const sevenDaysAgo = new Date();
|
||||
sevenDaysAgo.setDate(today.getDate() - 7);
|
||||
|
||||
dataTime.value = [
|
||||
dateFormat(sevenDaysAgo, "yyyy-MM-dd"),
|
||||
dateFormat(today, "yyyy-MM-dd")
|
||||
];
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
setDefaultDateRange();
|
||||
getData();
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
@@ -1,226 +1,206 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<div id="toolbar">
|
||||
<form class="col-sm-12"
|
||||
id="searchForm"
|
||||
action="/admin/chargeRecord/dailyexport"
|
||||
method="get"
|
||||
target="_blank">
|
||||
<div class="box">
|
||||
<h4>
|
||||
今日充值数据:<span class="totalAmount" style="color: red">{{
|
||||
DailyTotal.amount
|
||||
}}</span
|
||||
>(总金额)/
|
||||
<span class="totalCount" style="color: red">{{ DailyTotal.count }}</span
|
||||
>(总笔数)
|
||||
<span style="color: red">(单位:美元)</span>
|
||||
</h4>
|
||||
<!-- 表格数据 -->
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="timeStr" align="center" label="日期" />
|
||||
<el-table-column prop="v5payAmount" align="center" label="V5play支付">
|
||||
<template #default="{ row }">
|
||||
{{ row.v5payAmount !== null ? row.v5payAmount : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="googleAmount" align="center" label="google支付">
|
||||
<template #default="{ row }">
|
||||
{{ row.googleAmount !== null ? row.googleAmount : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="razerAmount" align="center" label="razer充值">
|
||||
<template #default="{ row }">
|
||||
{{ row.razerAmount !== null ? row.razerAmount : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="payermaxAmount"
|
||||
align="center"
|
||||
label="payermax支付"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ row.payermaxAmount !== null ? row.payermaxAmount : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="myCardAmount" align="center" label="MyCard支付">
|
||||
<template #default="{ row }">
|
||||
{{ row.myCardAmount !== null ? row.myCardAmount : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="startPayAmount"
|
||||
align="center"
|
||||
label="startPay支付"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ row.startPayAmount !== null ? row.startPayAmount : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="iosPayAmount" align="center" label="ios支付">
|
||||
<template #default="{ row }">
|
||||
{{ row.iosPayAmount !== null ? row.iosPayAmount : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="companyAccount" align="center" label="充值打公帐">
|
||||
<template #default="{ row }">
|
||||
{{ row.companyAccount !== null ? row.companyAccount : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="detailPageFun(scope.row)"
|
||||
size="default"
|
||||
>明细</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 明细弹窗 -->
|
||||
<el-dialog v-model="dailydetailDialog" :title="dialogTitle" width="30%" center>
|
||||
<el-table
|
||||
:data="dailydetailTable"
|
||||
style="width: 100%"
|
||||
ref="multipleTable"
|
||||
>
|
||||
<el-table-column prop="channel" align="center" label="渠道" />
|
||||
<el-table-column prop="amount" align="center" label="充值金额" />
|
||||
<el-table-column prop="count" align="center" label="充值笔数" />
|
||||
</el-table>
|
||||
|
||||
</form>
|
||||
<div class="col-sm-12 pull-left">
|
||||
<h4>
|
||||
今日充值数据:<span class="totalAmount"
|
||||
style="color: red">0</span>(总金额)/
|
||||
<span class="totalCount"
|
||||
style="color: red">0</span>(总笔数)
|
||||
<span style="color: red">(单位:美元)</span>
|
||||
</h4>
|
||||
</div>
|
||||
<!-- <div class="col-sm-3 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>
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="modal fade"
|
||||
id="recordDetail"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog"
|
||||
role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"><span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"
|
||||
id="modalLabel"></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="detailtable"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="dailydetailDialog = false">
|
||||
关闭
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "ChargeRecordDailyStatisticsView",
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData () {
|
||||
$(function () {
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'timeStr', title: '日期', align: 'center', width: '5%' },
|
||||
/*{field: 'wxAmount', title: '微信支付', align: 'center', width: '5%'},
|
||||
{field: 'wxWapAmount', title: '微信H5支付', align: 'center', width: '5%'},
|
||||
{field: 'wxPubAmount', title: '微信公众号', align: 'center', width: '5%'},
|
||||
{field: 'wxMicroMallPubAmount', title: '微商城公众号', align: 'center', width: '5%'},
|
||||
{field: 'wxPub2Amount', title: '平台公众号', align: 'center', width: '5%'},
|
||||
{field: 'wxPub2H5Amount', title: '平台公众号H5支付', align: 'center', width: '5%'},
|
||||
{field: 'alipayAmount', title: '支付宝', align: 'center', width: '5%'},
|
||||
{field: 'alipayWapAmount', title: '支付宝H5', align: 'center', width: '5%'},
|
||||
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
|
||||
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/
|
||||
{ field: 'googleAmount', title: 'google支付', align: 'center', width: '5%' },
|
||||
{ field: 'razerAmount', title: 'razer充值', align: 'center', width: '14%' },
|
||||
{ field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%' },
|
||||
{ field: 'myCardAmount', title: 'MyCard支付', align: 'center', width: '5%' },
|
||||
{ field: 'startPayAmount', title: 'startPay支付', align: 'center', width: '5%' },
|
||||
{ field: 'iosPayAmount', title: 'ios支付', align: 'center', width: '5%' },
|
||||
{ field: 'companyAccount', title: '充值打公账', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'time',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
return '<button id="btnDetail" name="btnDetail" class="btn btn-sm btn-success opt-detail" data-id=' + val + '>' +
|
||||
'<i class="glyphicon glyphicon-edit"></i> 明细</button>';
|
||||
}
|
||||
}
|
||||
],
|
||||
undefinedText: 0,
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [20, 50, 100, 200, 300, 500],
|
||||
search: false,
|
||||
sidePagination: "client", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
pageNum: params.pageNumber,
|
||||
pageSize: params.pageSize
|
||||
};
|
||||
return param;
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
url: '/admin/chargeRecord/dailylist',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
getTotalStatis();
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
// 导出EXCEL
|
||||
$('#btnExport').on('click', function () {
|
||||
$("#searchForm").submit();
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
$("#table").on("click", '.opt-detail', function () {
|
||||
|
||||
$("#recordDetail").modal('show');
|
||||
var time = $(this).attr("data-id");
|
||||
|
||||
var date = new Date().format("yyyy-MM-dd ");
|
||||
$("#modalLabel").html(date + parseTime(time));
|
||||
|
||||
$('#detailtable').bootstrapTable('destroy');
|
||||
$('#detailtable').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
||||
{ field: 'amount', title: '充值金额', align: 'center', width: '5%' },
|
||||
{ field: 'count', title: '充值笔数', align: 'center', width: '5%' },
|
||||
|
||||
],
|
||||
undefinedText: 0,
|
||||
height: 600,
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: false,
|
||||
pageList: [20, 50, 100, 200, 300, 500],
|
||||
search: false,
|
||||
sidePagination: "client", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
pageNum: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
time: time
|
||||
};
|
||||
return param;
|
||||
},
|
||||
url: '/admin/chargeRecord/dailydetail',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
function parseTime (val) {
|
||||
if (val < 10) {
|
||||
return '0' + val + ':00-0' + val + ':59';
|
||||
} else {
|
||||
return val + ':00-' + val + ':59';
|
||||
}
|
||||
}
|
||||
function getTotalStatis () {
|
||||
$.get('/admin/chargeRecord/dailytotal', function (res) {
|
||||
</script>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import {
|
||||
getChargeRecordDailtList,
|
||||
getChargeRecordDailyTotal,
|
||||
getChargeRecordDailyDetail,
|
||||
} from "@/api/users/ChargeRecordPartitionStatisticsView.js";
|
||||
import { formatDate } from "@/utils/relDate";
|
||||
const formData = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 30,
|
||||
});
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
});
|
||||
const DailyTotal = ref({});
|
||||
const dialogTitle = ref('');
|
||||
const dailydetailDialog = ref(false);
|
||||
const dailydetailTable = ref([]);
|
||||
// 查询
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
getChargeRecordDailtList(formData).then((res) => {
|
||||
if (res.code == 200) {
|
||||
console.log(res.data);
|
||||
if (res.data) {
|
||||
$('.totalAmount').html(res.data.amount);
|
||||
$('.totalCount').html(res.data.count);
|
||||
}
|
||||
tableData.data = res.data;
|
||||
tableData.loading = false;
|
||||
// tableData.total = res.data.total;
|
||||
} else {
|
||||
tableData.loading = false;
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
//明细
|
||||
const detailPageFun = (val) => {
|
||||
getChargeRecordDailyDetail({ time: val.time }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
dailydetailTable.value = res.data;
|
||||
let date = new Date().format('yyyy-MM-dd');
|
||||
dialogTitle.value = date + ' ' + val.timeStr;
|
||||
dailydetailDialog.value = true;
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getData();
|
||||
getChargeRecordDailyTotal().then((res) => {
|
||||
if (res.code == 200) {
|
||||
DailyTotal.value = res.data;
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
@@ -1,162 +1,167 @@
|
||||
<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">
|
||||
<input type="number"
|
||||
name="partitionId"
|
||||
value="16"
|
||||
hidden />
|
||||
<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 class="box">
|
||||
<div class="inquire">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="dataTime"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</section>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button class="primary" type="primary" @click="confirmExportExcel()"
|
||||
>导出</el-button
|
||||
>
|
||||
<!-- 表格数据 -->
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column prop="v5payUsd" align="center" label="
|
||||
V5play充值美元" />
|
||||
<el-table-column prop="googleUsd" align="center" label="google充值美元" />
|
||||
<el-table-column prop="razerUsd" align="center" label="razer充值" />
|
||||
<el-table-column
|
||||
prop="payermaxUsd"
|
||||
align="center"
|
||||
label="payermax充值美元"
|
||||
/>
|
||||
<el-table-column prop="myCardUsd" align="center" label="myCard充值美元" />
|
||||
<el-table-column
|
||||
prop="startPayUsd"
|
||||
align="center"
|
||||
label="startPay充值美元"
|
||||
/>
|
||||
<el-table-column prop="iosUsd" align="center" label="ios充值美元" />
|
||||
<el-table-column prop="companyUsd" align="center" label="对公打款美元" />
|
||||
<el-table-column prop="totalUsd" align="center" label="总充值美元" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "ChargeRecordEn2PartitionStatisticsView",
|
||||
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: 'date', title: '日期', align: 'center', width: '14%' },
|
||||
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
|
||||
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
||||
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pagination: false,
|
||||
search: false,
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
partitionId: 16,
|
||||
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>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import {getChargeRecordPartitionDetail,exportPartitionDetail} from '@/api/users/ChargeRecordPartitionStatisticsView.js'
|
||||
import { formatDate } from "@/utils/relDate";
|
||||
|
||||
<style scoped></style>
|
||||
const dataTime = ref([]);
|
||||
const formData = reactive({
|
||||
beginDate: "",
|
||||
endDate: "",
|
||||
partitionId:16
|
||||
});
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
});
|
||||
// 查询
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
if (dataTime.value && dataTime.value.length > 0) {
|
||||
formData.beginDate = dateFormat(dataTime.value[0], "yyyy-MM-dd");
|
||||
formData.endDate = dateFormat(dataTime.value[1], "yyyy-MM-dd");
|
||||
} else {
|
||||
formData.beginDate = dataTime.value;
|
||||
formData.endDate = dataTime.value;
|
||||
}
|
||||
getChargeRecordPartitionDetail(formData).then((res) => {
|
||||
tableData.data = res;
|
||||
tableData.loading = false;
|
||||
});
|
||||
};
|
||||
// 导出
|
||||
const confirmExportExcel = async () => {
|
||||
// Object.assign(formData, { pageSize: 10000, pageNo: 1 });
|
||||
try {
|
||||
const res = await exportPartitionDetail(formData);
|
||||
if (res) {
|
||||
ElMessage({
|
||||
message: "导出成功",
|
||||
type: "success",
|
||||
});
|
||||
let time = formatDate(new Date());
|
||||
let alink = document.createElement("a");
|
||||
alink.download = `分区充值统计${time}.xls`;
|
||||
alink.style.display = "none";
|
||||
const blob = new Blob([res]);
|
||||
alink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(alink);
|
||||
alink.click();
|
||||
URL.revokeObjectURL(alink.href);
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage({
|
||||
message: error.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 设置默认日期范围(今天到7天前)
|
||||
const setDefaultDateRange = () => {
|
||||
const today = new Date();
|
||||
const sevenDaysAgo = new Date();
|
||||
sevenDaysAgo.setDate(today.getDate() - 7);
|
||||
|
||||
dataTime.value = [
|
||||
dateFormat(sevenDaysAgo, "yyyy-MM-dd"),
|
||||
dateFormat(today, "yyyy-MM-dd")
|
||||
];
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
setDefaultDateRange();
|
||||
getData();
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
@@ -1,162 +1,167 @@
|
||||
<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">
|
||||
<input type="number"
|
||||
name="partitionId"
|
||||
value="1"
|
||||
hidden />
|
||||
<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 class="box">
|
||||
<div class="inquire">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="dataTime"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</section>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button class="primary" type="primary" @click="confirmExportExcel()"
|
||||
>导出</el-button
|
||||
>
|
||||
<!-- 表格数据 -->
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column prop="v5payUsd" align="center" label="
|
||||
V5play充值美元" />
|
||||
<el-table-column prop="googleUsd" align="center" label="google充值美元" />
|
||||
<el-table-column prop="razerUsd" align="center" label="razer充值" />
|
||||
<el-table-column
|
||||
prop="payermaxUsd"
|
||||
align="center"
|
||||
label="payermax充值美元"
|
||||
/>
|
||||
<el-table-column prop="myCardUsd" align="center" label="myCard充值美元" />
|
||||
<el-table-column
|
||||
prop="startPayUsd"
|
||||
align="center"
|
||||
label="startPay充值美元"
|
||||
/>
|
||||
<el-table-column prop="iosUsd" align="center" label="ios充值美元" />
|
||||
<el-table-column prop="companyUsd" align="center" label="对公打款美元" />
|
||||
<el-table-column prop="totalUsd" align="center" label="总充值美元" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "ChargeRecordEnPartitionStatisticsView",
|
||||
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: 'date', title: '日期', align: 'center', width: '14%' },
|
||||
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
|
||||
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
||||
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pagination: false,
|
||||
search: false,
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
partitionId: 1,
|
||||
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>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import {getChargeRecordPartitionDetail,exportPartitionDetail} from '@/api/users/ChargeRecordPartitionStatisticsView.js'
|
||||
import { formatDate } from "@/utils/relDate";
|
||||
|
||||
<style scoped></style>
|
||||
const dataTime = ref([]);
|
||||
const formData = reactive({
|
||||
beginDate: "",
|
||||
endDate: "",
|
||||
partitionId:1
|
||||
});
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
});
|
||||
// 查询
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
if (dataTime.value && dataTime.value.length > 0) {
|
||||
formData.beginDate = dateFormat(dataTime.value[0], "yyyy-MM-dd");
|
||||
formData.endDate = dateFormat(dataTime.value[1], "yyyy-MM-dd");
|
||||
} else {
|
||||
formData.beginDate = dataTime.value;
|
||||
formData.endDate = dataTime.value;
|
||||
}
|
||||
getChargeRecordPartitionDetail(formData).then((res) => {
|
||||
tableData.data = res;
|
||||
tableData.loading = false;
|
||||
});
|
||||
};
|
||||
// 导出
|
||||
const confirmExportExcel = async () => {
|
||||
// Object.assign(formData, { pageSize: 10000, pageNo: 1 });
|
||||
try {
|
||||
const res = await exportPartitionDetail(formData);
|
||||
if (res) {
|
||||
ElMessage({
|
||||
message: "导出成功",
|
||||
type: "success",
|
||||
});
|
||||
let time = formatDate(new Date());
|
||||
let alink = document.createElement("a");
|
||||
alink.download = `分区充值统计${time}.xls`;
|
||||
alink.style.display = "none";
|
||||
const blob = new Blob([res]);
|
||||
alink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(alink);
|
||||
alink.click();
|
||||
URL.revokeObjectURL(alink.href);
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage({
|
||||
message: error.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 设置默认日期范围(今天到7天前)
|
||||
const setDefaultDateRange = () => {
|
||||
const today = new Date();
|
||||
const sevenDaysAgo = new Date();
|
||||
sevenDaysAgo.setDate(today.getDate() - 7);
|
||||
|
||||
dataTime.value = [
|
||||
dateFormat(sevenDaysAgo, "yyyy-MM-dd"),
|
||||
dateFormat(today, "yyyy-MM-dd")
|
||||
];
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
setDefaultDateRange();
|
||||
getData();
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
@@ -1,253 +1,221 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<div id="toolbar">
|
||||
<div class="col-sm-12">
|
||||
<div class="pull-left">
|
||||
<form id="searchForm"
|
||||
class="col-sm-pull-12"
|
||||
action="/admin/chargeRecord/totalexport"
|
||||
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>
|
||||
<span style="color: red">(单位:美元)</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="inquire">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="dataTime"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</section>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button class="primary" type="primary" @click="confirmExportExcel()"
|
||||
>导出</el-button
|
||||
>
|
||||
<span style="color: red;">(单位:美元)</span>
|
||||
<!-- 表格数据 -->
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="timeStr" align="center" label="日期" />
|
||||
<el-table-column prop="v5payAmount" align="center" label="V5play支付" />
|
||||
<el-table-column prop="googleAmount" align="center" label="google支付" />
|
||||
<el-table-column prop="razerAmount" align="center" label="razer充值" />
|
||||
<el-table-column
|
||||
prop="payermaxAmount"
|
||||
align="center"
|
||||
label="payermax支付"
|
||||
/>
|
||||
<el-table-column prop="myCardAmount" align="center" label="MyCard支付" />
|
||||
<el-table-column
|
||||
prop="startPayAmount"
|
||||
align="center"
|
||||
label="startPay支付"
|
||||
/>
|
||||
<el-table-column prop="iosPayAmount" align="center" label="ios支付" />
|
||||
<el-table-column
|
||||
prop="companyAccount"
|
||||
align="center"
|
||||
label="充值打公帐"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="totalAmount"
|
||||
align="center"
|
||||
label="总计充值金额数"
|
||||
/>
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="detailPageFun(scope.row)"
|
||||
size="default"
|
||||
>明细</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
:current-page="formData.pageNum"
|
||||
:page-size="formData.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100, 200]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
<!-- 明细弹窗 -->
|
||||
<el-dialog v-model="dailydetailDialog" :title="dialogTitle" width="30%" center>
|
||||
<el-table
|
||||
:data="dailydetailTable"
|
||||
style="width: 100%"
|
||||
ref="multipleTable"
|
||||
>
|
||||
<el-table-column prop="channel" align="center" label="渠道" />
|
||||
<el-table-column prop="amount" align="center" label="充值金额" />
|
||||
<el-table-column prop="count" align="center" label="充值笔数" />
|
||||
</el-table>
|
||||
|
||||
<div class="modal fade"
|
||||
id="recordDetail"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog"
|
||||
role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"><span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"
|
||||
id="modalLabel"></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="detailtable"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="dailydetailDialog = false">
|
||||
关闭
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "ChargeRecordTotalStatisticsView",
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData () {
|
||||
$(function () {
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'timeStr', title: '日期', align: 'center', width: '5%' },
|
||||
/*{field: 'wxAmount', title: '微信支付', align: 'center', width: '5%'},
|
||||
{field: 'wxWapAmount', title: '微信H5支付', align: 'center', width: '5%'},
|
||||
{field: 'wxPubAmount', title: '微信公众号', align: 'center', width: '5%'},
|
||||
{field: 'alipayAmount', title: '支付宝', align: 'center', width: '5%'},
|
||||
{field: 'alipayV2Amount', title: '支付宝V2', align: 'center', width: '5%'},
|
||||
{field: 'wxMicroMallPubAmount', title: '微商城公众号', align: 'center', width: '5%'},
|
||||
{field: 'wxPub2Amount', title: '平台公众号', align: 'center', width: '5%'},
|
||||
{field: 'wxPub2H5Amount', title: '平台公众号H5支付', align: 'center', width: '5%'},
|
||||
{field: 'alipayWapAmount', title: '支付宝H5', align: 'center', width: '5%'},
|
||||
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
|
||||
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/
|
||||
{ field: 'googleAmount', title: 'google支付', align: 'center', width: '5%' },
|
||||
{ field: 'razerAmount', title: 'razer充值', align: 'center', width: '14%' },
|
||||
{ field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%' },
|
||||
{ field: 'myCardAmount', title: 'myCard支付', align: 'center', width: '5%' },
|
||||
{ field: 'startPayAmount', title: 'startPay支付', align: 'center', width: '5%' },
|
||||
{ field: 'iosPayAmount', title: 'ios支付', align: 'center', width: '5%' },
|
||||
{ field: 'companyAccount', title: '充值打公账', align: 'center', width: '5%' },
|
||||
{ field: 'totalAmount', title: '总计充值金额数', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'timeStr',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
return '<button id="btnDetail" name="btnDetail" class="btn btn-sm btn-success opt-detail" data-id=' + val + '>' +
|
||||
'<i class="glyphicon glyphicon-edit"></i> 明细</button>';
|
||||
}
|
||||
}
|
||||
],
|
||||
undefinedText: 0,
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [20, 50, 100, 200, 300, 500],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
pageNum: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
beginDate: $('#beginDate').val(),
|
||||
endDate: $('#endDate').val()
|
||||
};
|
||||
return param;
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
url: '/admin/chargeRecord/totallist',
|
||||
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');
|
||||
});
|
||||
var chargeStart = $('#beginDate').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
var chargeEnd = $('#endDate').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
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").on("click", '.opt-detail', function () {
|
||||
|
||||
$("#recordDetail").modal('show');
|
||||
var time = $(this).attr("data-id");
|
||||
|
||||
$("#modalLabel").html(time);
|
||||
|
||||
$('#detailtable').bootstrapTable('destroy');
|
||||
$('#detailtable').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
||||
{ field: 'amount', title: '充值金额', align: 'center', width: '5%' },
|
||||
{ field: 'count', title: '充值笔数', align: 'center', width: '5%' }
|
||||
|
||||
],
|
||||
undefinedText: 0,
|
||||
height: 600,
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: false,
|
||||
pageList: [20, 50, 100, 200, 300, 500],
|
||||
search: false,
|
||||
sidePagination: "client", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
pageNum: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
time: time
|
||||
};
|
||||
return param;
|
||||
},
|
||||
url: '/admin/chargeRecord/totaldetail',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import {
|
||||
getChargeRecordTotalList,
|
||||
getChargeRecordTotalDetail,
|
||||
exportChargeRecordTotalExport,
|
||||
} from "@/api/users/ChargeRecordPartitionStatisticsView.js";
|
||||
import { formatDate } from "@/utils/relDate";
|
||||
const dataTime = ref([]);
|
||||
const formData = reactive({
|
||||
beginDate: "",
|
||||
endDate: "",
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
});
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
<style scoped></style>
|
||||
const dialogTitle = ref('');
|
||||
const dailydetailDialog = ref(false);
|
||||
const dailydetailTable = ref([]);// 查询
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
if (dataTime.value && dataTime.value.length > 0) {
|
||||
formData.beginDate = dateFormat(dataTime.value[0], "yyyy-MM-dd");
|
||||
formData.endDate = dateFormat(dataTime.value[1], "yyyy-MM-dd");
|
||||
} else {
|
||||
formData.beginDate = dataTime.value;
|
||||
formData.endDate = dataTime.value;
|
||||
}
|
||||
getChargeRecordTotalList(formData).then((res) => {
|
||||
tableData.data = res.rows;
|
||||
tableData.loading = false;
|
||||
tableData.total = res.total;
|
||||
});
|
||||
};
|
||||
//明细
|
||||
const detailPageFun = (val) => {
|
||||
getChargeRecordTotalDetail({ time: val.timeStr }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
dailydetailTable.value = res.data;
|
||||
dialogTitle.value =val.timeStr;
|
||||
dailydetailDialog.value = true;
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
});
|
||||
};
|
||||
// 导出
|
||||
const confirmExportExcel = async () => {
|
||||
try {
|
||||
const res = await exportChargeRecordTotalExport(formData);
|
||||
if (res) {
|
||||
ElMessage({
|
||||
message: "导出成功",
|
||||
type: "success",
|
||||
});
|
||||
let time = formatDate(new Date());
|
||||
let alink = document.createElement("a");
|
||||
alink.download = `累计充值数据 ${time}.xls`;
|
||||
alink.style.display = "none";
|
||||
const blob = new Blob([res]);
|
||||
alink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(alink);
|
||||
alink.click();
|
||||
URL.revokeObjectURL(alink.href);
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage({
|
||||
message: error.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
@@ -1,162 +1,167 @@
|
||||
<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">
|
||||
<input type="number"
|
||||
name="partitionId"
|
||||
value="8"
|
||||
hidden />
|
||||
<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 class="box">
|
||||
<div class="inquire">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="dataTime"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</section>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button class="primary" type="primary" @click="confirmExportExcel()"
|
||||
>导出</el-button
|
||||
>
|
||||
<!-- 表格数据 -->
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column prop="v5payUsd" align="center" label="
|
||||
V5play充值美元" />
|
||||
<el-table-column prop="googleUsd" align="center" label="google充值美元" />
|
||||
<el-table-column prop="razerUsd" align="center" label="razer充值" />
|
||||
<el-table-column
|
||||
prop="payermaxUsd"
|
||||
align="center"
|
||||
label="payermax充值美元"
|
||||
/>
|
||||
<el-table-column prop="myCardUsd" align="center" label="myCard充值美元" />
|
||||
<el-table-column
|
||||
prop="startPayUsd"
|
||||
align="center"
|
||||
label="startPay充值美元"
|
||||
/>
|
||||
<el-table-column prop="iosUsd" align="center" label="ios充值美元" />
|
||||
<el-table-column prop="companyUsd" align="center" label="对公打款美元" />
|
||||
<el-table-column prop="totalUsd" align="center" label="总充值美元" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "ChargeRecordTrPartitionStatisticsView",
|
||||
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: 'date', title: '日期', align: 'center', width: '14%' },
|
||||
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
|
||||
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
||||
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pagination: false,
|
||||
search: false,
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
partitionId: 8,
|
||||
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>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import {getChargeRecordPartitionDetail,exportPartitionDetail} from '@/api/users/ChargeRecordPartitionStatisticsView.js'
|
||||
import { formatDate } from "@/utils/relDate";
|
||||
|
||||
<style scoped></style>
|
||||
const dataTime = ref([]);
|
||||
const formData = reactive({
|
||||
beginDate: "",
|
||||
endDate: "",
|
||||
partitionId:8
|
||||
});
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
});
|
||||
// 查询
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
if (dataTime.value && dataTime.value.length > 0) {
|
||||
formData.beginDate = dateFormat(dataTime.value[0], "yyyy-MM-dd");
|
||||
formData.endDate = dateFormat(dataTime.value[1], "yyyy-MM-dd");
|
||||
} else {
|
||||
formData.beginDate = dataTime.value;
|
||||
formData.endDate = dataTime.value;
|
||||
}
|
||||
getChargeRecordPartitionDetail(formData).then((res) => {
|
||||
tableData.data = res;
|
||||
tableData.loading = false;
|
||||
});
|
||||
};
|
||||
// 导出
|
||||
const confirmExportExcel = async () => {
|
||||
// Object.assign(formData, { pageSize: 10000, pageNo: 1 });
|
||||
try {
|
||||
const res = await exportPartitionDetail(formData);
|
||||
if (res) {
|
||||
ElMessage({
|
||||
message: "导出成功",
|
||||
type: "success",
|
||||
});
|
||||
let time = formatDate(new Date());
|
||||
let alink = document.createElement("a");
|
||||
alink.download = `分区充值统计${time}.xls`;
|
||||
alink.style.display = "none";
|
||||
const blob = new Blob([res]);
|
||||
alink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(alink);
|
||||
alink.click();
|
||||
URL.revokeObjectURL(alink.href);
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage({
|
||||
message: error.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 设置默认日期范围(今天到7天前)
|
||||
const setDefaultDateRange = () => {
|
||||
const today = new Date();
|
||||
const sevenDaysAgo = new Date();
|
||||
sevenDaysAgo.setDate(today.getDate() - 7);
|
||||
|
||||
dataTime.value = [
|
||||
dateFormat(sevenDaysAgo, "yyyy-MM-dd"),
|
||||
dateFormat(today, "yyyy-MM-dd")
|
||||
];
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
setDefaultDateRange();
|
||||
getData();
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
@@ -1,162 +1,167 @@
|
||||
<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">
|
||||
<input type="number"
|
||||
name="partitionId"
|
||||
value="4"
|
||||
hidden />
|
||||
<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 class="box">
|
||||
<div class="inquire">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="dataTime"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</section>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button class="primary" type="primary" @click="confirmExportExcel()"
|
||||
>导出</el-button
|
||||
>
|
||||
<!-- 表格数据 -->
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column prop="v5payUsd" align="center" label="
|
||||
V5play充值美元" />
|
||||
<el-table-column prop="googleUsd" align="center" label="google充值美元" />
|
||||
<el-table-column prop="razerUsd" align="center" label="razer充值" />
|
||||
<el-table-column
|
||||
prop="payermaxUsd"
|
||||
align="center"
|
||||
label="payermax充值美元"
|
||||
/>
|
||||
<el-table-column prop="myCardUsd" align="center" label="myCard充值美元" />
|
||||
<el-table-column
|
||||
prop="startPayUsd"
|
||||
align="center"
|
||||
label="startPay充值美元"
|
||||
/>
|
||||
<el-table-column prop="iosUsd" align="center" label="ios充值美元" />
|
||||
<el-table-column prop="companyUsd" align="center" label="对公打款美元" />
|
||||
<el-table-column prop="totalUsd" align="center" label="总充值美元" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "ChargeRecordZhPartitionStatisticsView",
|
||||
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: 'date', title: '日期', align: 'center', width: '14%' },
|
||||
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'razerUsd', title: 'razer充值1', align: 'center', width: '14%' },
|
||||
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
||||
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
||||
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pagination: false,
|
||||
search: false,
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
partitionId: 4,
|
||||
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>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import {getChargeRecordPartitionDetail,exportPartitionDetail} from '@/api/users/ChargeRecordPartitionStatisticsView.js'
|
||||
import { formatDate } from "@/utils/relDate";
|
||||
|
||||
<style scoped></style>
|
||||
const dataTime = ref([]);
|
||||
const formData = reactive({
|
||||
beginDate: "",
|
||||
endDate: "",
|
||||
partitionId:4
|
||||
});
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
});
|
||||
// 查询
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
if (dataTime.value && dataTime.value.length > 0) {
|
||||
formData.beginDate = dateFormat(dataTime.value[0], "yyyy-MM-dd");
|
||||
formData.endDate = dateFormat(dataTime.value[1], "yyyy-MM-dd");
|
||||
} else {
|
||||
formData.beginDate = dataTime.value;
|
||||
formData.endDate = dataTime.value;
|
||||
}
|
||||
getChargeRecordPartitionDetail(formData).then((res) => {
|
||||
tableData.data = res;
|
||||
tableData.loading = false;
|
||||
});
|
||||
};
|
||||
// 导出
|
||||
const confirmExportExcel = async () => {
|
||||
// Object.assign(formData, { pageSize: 10000, pageNo: 1 });
|
||||
try {
|
||||
const res = await exportPartitionDetail(formData);
|
||||
if (res) {
|
||||
ElMessage({
|
||||
message: "导出成功",
|
||||
type: "success",
|
||||
});
|
||||
let time = formatDate(new Date());
|
||||
let alink = document.createElement("a");
|
||||
alink.download = `分区充值统计${time}.xls`;
|
||||
alink.style.display = "none";
|
||||
const blob = new Blob([res]);
|
||||
alink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(alink);
|
||||
alink.click();
|
||||
URL.revokeObjectURL(alink.href);
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage({
|
||||
message: error.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 设置默认日期范围(今天到7天前)
|
||||
const setDefaultDateRange = () => {
|
||||
const today = new Date();
|
||||
const sevenDaysAgo = new Date();
|
||||
sevenDaysAgo.setDate(today.getDate() - 7);
|
||||
|
||||
dataTime.value = [
|
||||
dateFormat(sevenDaysAgo, "yyyy-MM-dd"),
|
||||
dateFormat(today, "yyyy-MM-dd")
|
||||
];
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
setDefaultDateRange();
|
||||
getData();
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user