后台-充值明细-分区
(cherry picked from commit ce063dc77e0f5be34a03939f9474062f448b0230)
This commit is contained in:
@@ -1,213 +1,253 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<form id="form2" action="" method="post" target="_blank">
|
||||
<input type="hidden" name="erbanNo" id="exportErbanNo">
|
||||
<input type="hidden" name="channel" id="exportChannel">
|
||||
<input type="hidden" name="startTime" id="exportStartTime">
|
||||
<input type="hidden" name="endTime" id="exportEndTime">
|
||||
<input type="hidden" name="status" id="exportStatus">
|
||||
<input type="hidden" name="newUser" id="exportNewUser">
|
||||
<input type="hidden" name="appChannel" id="exportAppChannel">
|
||||
</form>
|
||||
<section class="content">
|
||||
<div id="toolbar">
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="qErbanNo">平台号:</label>
|
||||
<input type="text" class="form-control" name="erbanNo" id="qErbanNo">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">渠道:</label>
|
||||
<input type="text" class="form-control" name="channel" id="qChannel">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">时间:</label>
|
||||
<input type="text" class="form-control datetime" name="startTime" id="qStartTime">
|
||||
<label for="qChannel">-</label>
|
||||
<input type="text" class="form-control datetime" name="endTime" id="qEndTime">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qStatus">状态:</label>
|
||||
<select class="form-control" name="status" id="qStatus">
|
||||
<option value="">全部</option>
|
||||
<option value="1">发起充值</option>
|
||||
<option value="2">充值成功</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qNewUser">新用户:</label>
|
||||
<select class="form-control" name="newUser" id="qNewUser">
|
||||
<option value="">全部</option>
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">app渠道</label>
|
||||
<input type="text" class="form-control" name="appChannel" id="qAppChannel">
|
||||
</div>
|
||||
</form>
|
||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
||||
<button id="btnExport" class="btn btn-sm btn-primary">导出</button>
|
||||
</div>
|
||||
<!-- .content -->
|
||||
<div class="content" id="table"></div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<form id="form2"
|
||||
action=""
|
||||
method="post"
|
||||
target="_blank">
|
||||
<input type="hidden"
|
||||
name="erbanNo"
|
||||
id="exportErbanNo">
|
||||
<input type="hidden"
|
||||
name="channel"
|
||||
id="exportChannel">
|
||||
<input type="hidden"
|
||||
name="startTime"
|
||||
id="exportStartTime">
|
||||
<input type="hidden"
|
||||
name="endTime"
|
||||
id="exportEndTime">
|
||||
<input type="hidden"
|
||||
name="status"
|
||||
id="exportStatus">
|
||||
<input type="hidden"
|
||||
name="newUser"
|
||||
id="exportNewUser">
|
||||
<input type="hidden"
|
||||
name="appChannel"
|
||||
id="exportAppChannel">
|
||||
</form>
|
||||
<section class="content">
|
||||
<div id="toolbar">
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="qErbanNo">平台号:</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="erbanNo"
|
||||
id="qErbanNo">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">渠道:</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="channel"
|
||||
id="qChannel">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">时间:</label>
|
||||
<input type="text"
|
||||
class="form-control datetime"
|
||||
name="startTime"
|
||||
id="qStartTime">
|
||||
<label for="qChannel">-</label>
|
||||
<input type="text"
|
||||
class="form-control datetime"
|
||||
name="endTime"
|
||||
id="qEndTime">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qStatus">状态:</label>
|
||||
<select class="form-control"
|
||||
name="status"
|
||||
id="qStatus">
|
||||
<option value="">全部</option>
|
||||
<option value="1">发起充值</option>
|
||||
<option value="2">充值成功</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qNewUser">新用户:</label>
|
||||
<select class="form-control"
|
||||
name="newUser"
|
||||
id="qNewUser">
|
||||
<option value="">全部</option>
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">app渠道</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="appChannel"
|
||||
id="qAppChannel">
|
||||
</div>
|
||||
</form>
|
||||
<button id="btnSearch"
|
||||
class="btn btn-sm btn-primary">查询</button>
|
||||
<button id="btnExport"
|
||||
class="btn btn-sm btn-primary">导出</button>
|
||||
</div>
|
||||
<!-- .content -->
|
||||
<div class="content"
|
||||
id="table"></div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "ChargeRecordView",
|
||||
setup() {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
name: "ChargeRecordView",
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData () {
|
||||
$(function () {
|
||||
$('.datetime').datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii:00',
|
||||
autoclose: true
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
$(function () {
|
||||
$('.datetime').datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii:00',
|
||||
autoclose: true
|
||||
});
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' },
|
||||
{ field: 'uid', title: 'uid', align: 'center', width: '5%' },
|
||||
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
|
||||
{ field: 'createTime', title: '创建时间', align: 'center', valign: 'middle', width: '10%' },
|
||||
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
||||
{ field: 'localCurrencyCode', title: '当地货币代码', align: 'center', width: '5%' },
|
||||
{ field: 'localAmount', title: '当地金额', align: 'center', width: '5%' },
|
||||
{ field: 'chargeRecordId', title: '商户订单号', align: 'center', width: '5%' },
|
||||
{ field: 'pingxxChargeId', title: '第三方订单号', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'status', title: '状态', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 2) {
|
||||
return '充值成功';
|
||||
} else {
|
||||
return '发起充值';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'newUser', title: '是否新用户', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
return '是';
|
||||
} else {
|
||||
return '否';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{ field: 'appChannel', title: 'app渠道', align: 'center', width: '5%' },
|
||||
],
|
||||
undefinedText: "-",
|
||||
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 = {
|
||||
pageNumber: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
erbanNo: $('#qErbanNo').val(),
|
||||
channel: $('#qChannel').val(),
|
||||
startTime: $('#qStartTime').val(),
|
||||
endTime: $('#qEndTime').val(),
|
||||
status: $('#qStatus').val(),
|
||||
newUser: $('#qNewUser').val(),
|
||||
appChannel: $('#qAppChannel').val(),
|
||||
};
|
||||
return param;
|
||||
},
|
||||
ajax: function (request) { //使用ajax请求
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: '/admin/chargeRecord/list',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: request.data,
|
||||
success: function (res) {
|
||||
apiResult(res);
|
||||
request.success({
|
||||
rows: res.data.records,
|
||||
total: res.data.total
|
||||
});
|
||||
},
|
||||
error: function (req) {
|
||||
serverError(req);
|
||||
}
|
||||
})
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
function serverError(req) {
|
||||
$("#tipMsg").text(req.responseJSON.message);
|
||||
$("#tipModal").modal('show');
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' },
|
||||
{ field: 'uid', title: 'uid', align: 'center', width: '5%' },
|
||||
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
|
||||
{ field: 'partitionName', title: '分区', align: 'center', width: '5%' },
|
||||
{ field: 'createTime', title: '创建时间', align: 'center', valign: 'middle', width: '10%' },
|
||||
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
||||
{ field: 'localCurrencyCode', title: '当地货币代码', align: 'center', width: '5%' },
|
||||
{ field: 'localAmount', title: '当地金额', align: 'center', width: '5%' },
|
||||
{ field: 'chargeRecordId', title: '商户订单号', align: 'center', width: '5%' },
|
||||
{ field: 'pingxxChargeId', title: '第三方订单号', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'status', title: '状态', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 2) {
|
||||
return '充值成功';
|
||||
} else {
|
||||
return '发起充值';
|
||||
}
|
||||
|
||||
function apiResult(json) {
|
||||
if (json.code == 200 && json.message == 'success') {
|
||||
return true;
|
||||
}
|
||||
$("#tipMsg").text("请求失败,错误信息:" + json.message);
|
||||
$("#tipModal").modal('show');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'newUser', title: '是否新用户', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
return '是';
|
||||
} else {
|
||||
return '否';
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
$('#btnExport').on('click', function () {
|
||||
var form = $("#form2");
|
||||
form.attr("action", "/admin/chargeRecord/exportChargeDetail");
|
||||
$('#exportErbanNo').val($('#qErbanNo').val());
|
||||
$('#exportChannel').val($('#qChannel').val());
|
||||
$('#exportStartTime').val($('#qStartTime').val());
|
||||
$('#exportEndTime').val($('#qEndTime').val());
|
||||
$('#exportStatus').val($('#qStatus').val());
|
||||
$('#exportNewUser').val($('#qNewUser').val());
|
||||
$('#exportAppChannel').val($('#qAppChannel').val());
|
||||
}
|
||||
},
|
||||
{ field: 'appChannel', title: 'app渠道', align: 'center', width: '5%' },
|
||||
],
|
||||
undefinedText: "-",
|
||||
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 = {
|
||||
pageNumber: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
erbanNo: $('#qErbanNo').val(),
|
||||
channel: $('#qChannel').val(),
|
||||
startTime: $('#qStartTime').val(),
|
||||
endTime: $('#qEndTime').val(),
|
||||
status: $('#qStatus').val(),
|
||||
newUser: $('#qNewUser').val(),
|
||||
appChannel: $('#qAppChannel').val(),
|
||||
};
|
||||
return param;
|
||||
},
|
||||
ajax: function (request) { //使用ajax请求
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: '/admin/chargeRecord/list',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: request.data,
|
||||
success: function (res) {
|
||||
apiResult(res);
|
||||
request.success({
|
||||
rows: res.data.records,
|
||||
total: res.data.total
|
||||
});
|
||||
},
|
||||
error: function (req) {
|
||||
serverError(req);
|
||||
}
|
||||
})
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
form.submit();
|
||||
})
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
});
|
||||
function serverError (req) {
|
||||
$("#tipMsg").text(req.responseJSON.message);
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
function apiResult (json) {
|
||||
if (json.code == 200 && json.message == 'success') {
|
||||
return true;
|
||||
}
|
||||
$("#tipMsg").text("请求失败,错误信息:" + json.message);
|
||||
$("#tipModal").modal('show');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
$('#btnExport').on('click', function () {
|
||||
var form = $("#form2");
|
||||
form.attr("action", "/admin/chargeRecord/exportChargeDetail");
|
||||
$('#exportErbanNo').val($('#qErbanNo').val());
|
||||
$('#exportChannel').val($('#qChannel').val());
|
||||
$('#exportStartTime').val($('#qStartTime').val());
|
||||
$('#exportEndTime').val($('#qEndTime').val());
|
||||
$('#exportStatus').val($('#qStatus').val());
|
||||
$('#exportNewUser').val($('#qNewUser').val());
|
||||
$('#exportAppChannel').val($('#qAppChannel').val());
|
||||
|
||||
form.submit();
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user