You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
276 lines
11 KiB
276 lines
11 KiB
<!DOCTYPE html>
|
|
<html lang="zh-cn">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<!--#include file="/widget/head.html"-->
|
|
|
|
<style>
|
|
|
|
.col-md-4, .col-md-1 {
|
|
display: inline !important;
|
|
float: left;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="layui-layout-body" layadmin-themealias="default">
|
|
|
|
<div id="wrapper">
|
|
<!-- Navigation -->
|
|
<!--#include file="/widget/nav.html"-->
|
|
<div id="page-wrapper" class="layui-body layadmin-tabsbody-item layui-show layui-fluid layui-row layui-col-space15">
|
|
<div class="layui-card" id="card-page-wrapper">
|
|
<div class="row">
|
|
<div class="container" style="margin-left: 10px">
|
|
<div class="col-md-1" style="width:40px;">
|
|
<p style="font-size: 18px;line-height: 35px;float: right">Uid:</p>
|
|
</div>
|
|
<div class="col-md-4" style="width:200px;">
|
|
<input type="text" class="form-control" id="uid" placeholder="Enter Uid">
|
|
</div>
|
|
<div class="col-md-1" style="width:80px;">
|
|
<p style="font-size: 18px;line-height: 35px;float: right">orderId:</p>
|
|
</div>
|
|
<div class="col-md-4" style="width:220px;">
|
|
<input type="text" class="form-control" id="orderId" placeholder="Enter orderId">
|
|
</div>
|
|
<div class="col-md-1" style="width:95px;">
|
|
<p style="font-size: 18px;line-height: 35px;float: right">orderId3rd:</p>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<input type="text" class="form-control" id="orderId3rd" placeholder="Enter orderId3rd">
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-1" style="width:95px;">
|
|
<p style="font-size: 18px;line-height: 35px;float: right">startTime:</p>
|
|
</div>
|
|
<div class="col-md-4" style="width:200px;">
|
|
<input type="text" class="form-control" id="startTime" placeholder="Enter startTime">
|
|
</div>
|
|
|
|
<div class="col-md-1" style="width:95px;">
|
|
<p style="font-size: 18px;line-height: 35px;float: right">endTime:</p>
|
|
</div>
|
|
<div class="col-md-4" style="width:200px;">
|
|
<input type="text" class="form-control" id="endTime" placeholder="Enter endTime">
|
|
</div>
|
|
<div class="col-md-1" style="width:95px;">
|
|
<p style="font-size: 18px;line-height: 35px;float: right">状态:</p>
|
|
</div>
|
|
<div class="col-md-4" style="width:200px;">
|
|
<select id="status" style="font-size:18px;">
|
|
<option value="-999">所有状态</option>
|
|
<option value="0">初始状态</option>
|
|
<option value="1">支付成功</option>
|
|
<option value="2">加物品成功</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-1">
|
|
<button type="button" class="layui-btn pull-right" id="sele">查询</button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row table-responsive" id="form" style="width: 100%">
|
|
<table class="table table-striped table-bordered table-hover" id="table">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!--#include file="/widget/tail.html"-->
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
var tableIns;
|
|
function tableInsfn(where) {
|
|
tableIns = layui.table.render({
|
|
elem: '#table',
|
|
limit: 10
|
|
, url: Page.SvrIp+'/api/querypayrecord' //数据接口
|
|
, where: where
|
|
, page: true
|
|
, cols: [[
|
|
{ field: 'uid', title: 'uid', width: 80 }
|
|
, {
|
|
field: 'TimeSecond', title: '下单时间', width: 170
|
|
}
|
|
, { field: 'OrderId', title: 'orderId', width: 380 }
|
|
, {
|
|
field: 'ProductId', title: 'productId', width: 100
|
|
}
|
|
|
|
, {
|
|
field: 'Status', title: '状态', width: 100, templet: function (d) {
|
|
switch (d.Status) {
|
|
case "0": return "初始状态";
|
|
case "1": return "支付成功";
|
|
case "2": return "加物品成功";
|
|
}
|
|
}
|
|
}
|
|
, {
|
|
field: 'Diamond', title: 'diamond', width: 80
|
|
}
|
|
, { field: 'DiamondGift', title: 'diamondGift', width: 80 }
|
|
, {
|
|
field: 'Money', title: 'money', width: 80
|
|
}
|
|
, {
|
|
field: 'OrderId3rd', title: 'orderId3rd', width: 200
|
|
}
|
|
|
|
, { field: 'IsTestPay', title: '测试<br/>支付', width: 80 }
|
|
, { field: 'RefundTime', title: 'refundTime', width: 80 }
|
|
, { field: 'Amount', title: '数量', width: 80 }
|
|
, { field: 'Currency', title: 'currency', width: 80 }
|
|
]]
|
|
, parseData: function (res) { //res 即为原始返回的数据
|
|
if (res.ret == 1) {
|
|
location.href = "/pages/login.html";
|
|
}
|
|
var datatab = [];
|
|
for (var i in res.data) {
|
|
var _data = {};
|
|
for (var x in res.data[i]) {
|
|
_data[res.columns[x]] = res.data[i][x];
|
|
}
|
|
datatab.push(_data);
|
|
}
|
|
return {
|
|
"code": 0, //解析接口状态
|
|
"msg": res.msg, //解析提示文本
|
|
"count": res.pagetotal, //解析数据长度
|
|
"data": datatab //解析数据列表
|
|
};
|
|
}
|
|
});
|
|
}
|
|
$(function () {
|
|
initPage('充值查询');
|
|
|
|
layui.laydate.render({
|
|
elem: '#startTime',
|
|
type: "datetime"
|
|
});
|
|
layui.laydate.render({
|
|
elem: '#endTime',
|
|
type: "datetime"
|
|
});
|
|
|
|
});
|
|
|
|
$("#sele").click(function () {
|
|
var uid = $("#uid").val();
|
|
|
|
var orderId = $("#orderId").val();
|
|
if (!uid && !orderId) {
|
|
alert("uid和orderId必须填一个!");
|
|
return false;
|
|
}
|
|
|
|
tableInsfn(
|
|
{
|
|
token: cookie.get("token"),
|
|
uid: uid,
|
|
orderId: orderId,
|
|
orderId3rd: $("#orderId3rd").val(),
|
|
startTime: $("#startTime").val(),
|
|
endTime: $("#endTime").val(),
|
|
status: $("#status").val()
|
|
}
|
|
);
|
|
});
|
|
|
|
$(document).keydown(function (e) {
|
|
if (e.keyCode == 13) {
|
|
$("th").remove();
|
|
$("tbody").remove();
|
|
var uid = $('#uidd').val();
|
|
var token = checkCookie();
|
|
var reg = /^[0-9]*$/;
|
|
if (uid == "" || !reg.test(uid)) {
|
|
alert("请填写有效的uid");
|
|
return false
|
|
}
|
|
$.getJSON(Page.SvrIp+"/api/querypayrecord", {
|
|
token: token,
|
|
uid: uid
|
|
}, function (data) {
|
|
console.log(data.columns)
|
|
$(data.columns).each(function (c, d) {
|
|
console.log(d)
|
|
$("#table").append('<th style="width: 150px" class="text-center">' + d + '</th>')
|
|
});
|
|
//console.log(b.data.length)
|
|
if (data.data.length == 0) {
|
|
$("#table").append('<tr class="odd text-center"><td colspan="6" class="dataTables_empty">无充值记录</td></tr>')
|
|
} else {
|
|
$(data.data).each(function (e, f) {
|
|
console.log(e)
|
|
console.log(f)
|
|
$("#table").append('<tr></tr>')
|
|
$("#table tr").eq(e).append(
|
|
'<td>' + f[0] + '</td><td>' + f[1] +
|
|
'</td><td>' + f[2] + '</td><td>' + f[3] +
|
|
'</td><td>' + f[4] + '</td><td>' + f[5] + '</td>');
|
|
});
|
|
|
|
}
|
|
})
|
|
$('#uidd').val("");
|
|
}
|
|
})
|
|
|
|
$(window).load(function () {
|
|
var c = document.getElementById("pay");
|
|
c.parentNode.setAttribute("class", "gray");
|
|
c.parentNode.parentNode.parentNode.setAttribute("class", "active")
|
|
c.parentNode.parentNode.setAttribute("class", "nav nav-second-level collapse in")
|
|
var b = c.parentNode.parentNode.parentNode.children[0].children[1];
|
|
})
|
|
</script>
|
|
<script src="../js/coupon.js"></script>
|
|
<script type="text/x-handlebars-template" id="box">
|
|
<div class="panel-heading">
|
|
<div class="selectbox pull-right" id="{{chartId}}_datepicker">
|
|
<i class="fa fa-calendar"></i>
|
|
<span>{{startDate}} 至 {{endDate}}</span> <b class="caret"></b>
|
|
</div>
|
|
<div class="pull-right btn-group" data-toggle="buttons">
|
|
<lable class="btn btn-default active" title="图表模式" name="{{chartId}}_mode_chart" style="display:none;">
|
|
<input type="radio"><i class="fa fa-bar-chart-o"></i></input>
|
|
</lable>
|
|
<lable class="btn btn-default" title="表格模式" name="{{chartId}}_mode_table" style="display:none;">
|
|
<input type="radio"><i class="fa fa-table"></i></input>
|
|
</lable>
|
|
</div>
|
|
<div>
|
|
<!-- Nav tabs -->
|
|
<ul class="nav nav-pills multibox-tab">
|
|
{{#each tabs}}
|
|
<li{{#if @first}} class="active" {{/if}}>
|
|
<a href="#{{../chartId}}_tab_{{@index}}" data-toggle="tab" desc="{{this}}">{{this}}</a></li>
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- /.panel-heading -->
|
|
<div class="panel-body">
|
|
<div class="flot-chart mtss-chart">
|
|
<div class="flot-chart-content" id="{{chartId}}_chartZone"></div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|