<!DOCTYPE html>
|
<html lang="zh-cn">
|
|
<head>
|
<meta charset="utf-8">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<title>用户管理-资金详情</title>
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
<link href="css/maincontent.css" rel="stylesheet">
|
<!--[if lt IE 9]>
|
<script src="js/html5shiv.js"></script>
|
<script src="js/respond.min.js"></script>
|
<![endif]-->
|
</head>
|
|
<body>
|
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
</nav>
|
<div id="mainbody">
|
<div id="sidebar">
|
<dl>
|
</dl>
|
</div>
|
<div id="neirong">
|
<div class="erjidh">
|
<div class="erjidh">
|
<ol class="breadcrumb">
|
<li>
|
<a href="" class="curuser"></a>
|
</li>
|
<li class="active">资金详情</li>
|
</ol>
|
</div>
|
</div>
|
<div class="zhuti">
|
<div class="zhutisousuo">
|
<table class="table">
|
<thead>
|
<tr>
|
<th width="33%">标题</th>
|
<th width="33%">金额</th>
|
<th width="34%">创建时间</th>
|
</tr>
|
</thead>
|
</table>
|
</div>
|
<div class="liebiao">
|
<table class="table">
|
<tbody>
|
<tr>
|
<td width="15%" style="text-align:center; line-height:105px;">
|
<div class="biaoti">
|
</div>
|
</td>
|
<td width="15%" style="text-align:center; line-height:105px;">
|
<div class="jine">
|
</div>
|
</td>
|
<td width="15%" style="text-align:center; line-height:105px;">
|
<div class="createtime">
|
</div>
|
</td>
|
</tr>
|
</tbody>
|
</table>
|
</div>
|
</div>
|
<div class="bottom">
|
<div class="page">
|
<ul class="pagination">
|
<li class="disabled pre">
|
<a href="#">«</a>
|
</li>
|
<li>
|
<a href="#" class="next">»</a>
|
</li>
|
</ul>
|
<div class="form-group">
|
<div class="tzan">
|
<button type="button" class="btn btn-primary">跳转</button>
|
</div>
|
<div class="tz">
|
<input class="form-control" type="text" id="customPage" placeholder="页数">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<script src="js/jquery.min.js"></script>
|
<script src="js/bootstrap.min.js"></script>
|
<script src="js/page.js"></script>
|
<script src="js/nav.js"></script>
|
<script src="layer/layer.js"></script>
|
|
<script>
|
var trHTML;
|
var key;
|
$(function(){
|
key = getArgsFromHref(location.href,"key");
|
var uname = getArgsFromHref(location.href,"uname");
|
$(".curuser").text(decodeURI(uname));
|
$(".curuser").attr("href","zijin-yonghu.html?uid="+key+"&uname="+uname);
|
var $tbody = $(".liebiao > .table > tbody");
|
trHTML = $tbody.html();
|
getMoneyRecordData(1);
|
|
});
|
</script>
|
<script>
|
|
|
function getMoneyRecordData(pageIndex) {
|
$.post("api/v1/user/getMoneyRecordList", { "pageIndex": pageIndex , "uid":key }, function(data) {
|
if(data.code == 0) {
|
setMoneyRecordData(data,pageIndex);
|
fillPage(data.data.pe, function(pageIndex) {
|
getMoneyRecordData(pageIndex);
|
});
|
}
|
}, 'json');
|
}
|
|
function setMoneyRecordData(data,pageIndex){
|
pageIndex = pageIndex - 1;
|
var $tbody = $(".liebiao > .table > tbody");
|
$(".liebiao tbody").empty();
|
var pageSize = data.data.pe.pageSize;
|
var totalCount = data.data.pe.totalCount;
|
var len = (pageSize < totalCount - (pageIndex * pageSize)) ? pageSize : totalCount - (pageIndex * pageSize);
|
len = (pageIndex * pageSize) + len;
|
var ii = pageIndex * pageSize;
|
for(var mm = 0; ii < len && ii < totalCount; ii++,mm++) {
|
var title = data.data.moneyRecordList[mm].title;
|
var money = data.data.moneyRecordList[mm].money;
|
var type = data.data.moneyRecordList[mm].type;
|
var createtime = data.data.moneyRecordList[mm].createtime;
|
$tbody.append(trHTML);
|
var $curTr = $tbody.find("tr").eq(mm);
|
$curTr.find(".biaoti").text(title);
|
$curTr.find(".jine").text((type==2?'-':'+') + money);
|
// var mydate = new Date(parseInt(createtime)).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " ");
|
$curTr.find(".createtime").text(getCommonTime(createtime));
|
}
|
}
|
function getArgsFromHref(sHref, sArgName){
|
var args = sHref.split("?");
|
var retval = "";
|
|
if(args[0] == sHref) /*参数为空*/
|
{
|
return retval; /*无需做任何处理*/
|
}
|
var str = args[1];
|
args = str.split("&");
|
for(var i = 0; i < args.length; i ++)
|
{
|
str = args[i];
|
var arg = str.split("=");
|
if(arg.length <= 1) continue;
|
if(arg[0] == sArgName) retval = arg[1];
|
}
|
return retval;
|
}
|
|
function getCommonTime(timestamp) {
|
var newDate = new Date();
|
newDate.setTime(timestamp);
|
return newDate.getFullYear() + "-" + (newDate.getMonth() + 1) + "-" + (newDate.getDate()) + " " + newDate.getHours() + ":" + newDate.getMinutes();
|
}
|
</script>
|
</body>
|
|
</html>
|