12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <script>
- var pageNo=1;
- $(function(){
- userId = getParam('userId');
- loadPages();
- })
- /*获取页数*/
- function loadPages() {
- $.post("getUserChargeRecordList.do",{"userId":userId},function(resp) {
- $('.page').empty();
- var totalCnt = resp.data.totalCnt;
- var GG = {
- "kk":function(dd){
- pageNo = dd;
- loadData();
- $(".page").prepend("<span class=\"page_all\">共 "+resp.data.totalCnt+" 条</span>");
- }
- }
- $("#page").initPage(totalCnt,1,GG.kk);
- });
- }
- /*获取数据*/
- function loadData() {
- $.post("getUserChargeRecordList.do",{"page":pageNo,"userId":userId}, function(resp){
- $("#bodyData").empty();
- var listArray = resp.data.list;
- for (var i=0;i<listArray.length;i++) {
- var item = listArray[i];
- var line = "<tr><td>"+((item.amt == null)?"":"¥"+item.amt)+"</td>"
- +"<td>"+((item.name == null)?"":item.name)+"</td>"
- +"<td>"+((item.state == 0)?"待支付":"已支付")+"</td>"
- +"<td>"+((item.way == null)?"":item.way)+"</td>"
- +"<td>"+((item.indate == null)?"":formatAllDateToSecond(new Date(item.indate)))+"</td>"
- +"</tr>";
- $("#bodyData").append(line);
- }
- });
- }
- </script>
- <div class="section">
- <div class="section_top">
- <p>
- <a>用户管理 > 余额详情</a>
- </p>
- </div>
- <div class="add_item">
- <button onclick="returnPage()" class=" btn btn-default blackborder pull-right">返回</button>
- </div>
- <div class="information">
- <div class="scrollTable">
- <table class="table table-striped table-bordered table-hover clicktoCheckbox">
- <thead>
- <tr style="background:#ededed;">
- <th>余额</th>
- <th>充值</th>
- <th>状态</th>
- <th>支付方式</th>
- <th>日期</th>
- </tr>
- </thead>
- <tbody id="bodyData" class="td_btn">
- </tbody>
- </table>
- </div>
-
- <ul class="page" maxshowpageitem="5" pagelistcount="15" id="page"></ul>
- </div>
- </div>
- <script>
- var mainHeight = $(window).height()-320+"px";
- $(".scrollTable").css({"max-height":mainHeight});
- </script>
|