house_amtDetail.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <script>
  2. var pageNo=1;
  3. $(function(){
  4. userId = getParam('userId');
  5. loadPages();
  6. })
  7. /*获取页数*/
  8. function loadPages() {
  9. $.post("getUserChargeRecordList.do",{"userId":userId},function(resp) {
  10. $('.page').empty();
  11. var totalCnt = resp.data.totalCnt;
  12. var GG = {
  13. "kk":function(dd){
  14. pageNo = dd;
  15. loadData();
  16. $(".page").prepend("<span class=\"page_all\">共&nbsp;"+resp.data.totalCnt+"&nbsp;条</span>");
  17. }
  18. }
  19. $("#page").initPage(totalCnt,1,GG.kk);
  20. });
  21. }
  22. /*获取数据*/
  23. function loadData() {
  24. $.post("getUserChargeRecordList.do",{"page":pageNo,"userId":userId}, function(resp){
  25. $("#bodyData").empty();
  26. var listArray = resp.data.list;
  27. for (var i=0;i<listArray.length;i++) {
  28. var item = listArray[i];
  29. var line = "<tr><td>"+((item.amt == null)?"":"¥"+item.amt)+"</td>"
  30. +"<td>"+((item.name == null)?"":item.name)+"</td>"
  31. +"<td>"+((item.state == 0)?"待支付":"已支付")+"</td>"
  32. +"<td>"+((item.way == null)?"":item.way)+"</td>"
  33. +"<td>"+((item.indate == null)?"":formatAllDateToSecond(new Date(item.indate)))+"</td>"
  34. +"</tr>";
  35. $("#bodyData").append(line);
  36. }
  37. });
  38. }
  39. </script>
  40. <div class="section">
  41. <div class="section_top">
  42. <p>
  43. <a>用户管理 > 余额详情</a>
  44. </p>
  45. </div>
  46. <div class="add_item">
  47. <button onclick="returnPage()" class=" btn btn-default blackborder pull-right">返回</button>
  48. </div>
  49. <div class="information">
  50. <div class="scrollTable">
  51. <table class="table table-striped table-bordered table-hover clicktoCheckbox">
  52. <thead>
  53. <tr style="background:#ededed;">
  54. <th>余额</th>
  55. <th>充值</th>
  56. <th>状态</th>
  57. <th>支付方式</th>
  58. <th>日期</th>
  59. </tr>
  60. </thead>
  61. <tbody id="bodyData" class="td_btn">
  62. </tbody>
  63. </table>
  64. </div>
  65. <ul class="page" maxshowpageitem="5" pagelistcount="15" id="page"></ul>
  66. </div>
  67. </div>
  68. <script>
  69. var mainHeight = $(window).height()-320+"px";
  70. $(".scrollTable").css({"max-height":mainHeight});
  71. </script>