house_owner.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <script>
  2. var pageNo=1;
  3. $(function(){
  4. $("aside>ul>li").eq(6).find("a").css({"background":"#00C1DE"})
  5. $("aside>ul>li").eq(6).siblings('li').find("a").css({"background":"#42485B"})
  6. var mainHeight = $(window).height()-320+"px";
  7. $(".scrollTable").css({"max-height":mainHeight});
  8. loadPages();
  9. })
  10. /*获取页数*/
  11. function loadPages() {
  12. $.post("getAllUserList.do",{},function(resp) {
  13. $('.page').empty();
  14. var totalCnt = resp.data.totalCnt;
  15. var GG = {
  16. "kk":function(dd){
  17. pageNo = dd;
  18. loadData();
  19. $(".page").prepend("<span class=\"page_all\">共&nbsp;"+resp.data.totalCnt+"&nbsp;条</span>");
  20. }
  21. }
  22. $("#page").initPage(totalCnt,1,GG.kk);
  23. });
  24. }
  25. /*获取数据*/
  26. function loadData() {
  27. $.post("getAllUserList.do",{"page":pageNo}, function(resp){
  28. $("#bodyData").empty();
  29. var listArray = resp.data.list;
  30. for (var i=0;i<listArray.length;i++) {
  31. var item = listArray[i];
  32. var line = "<tr><td>"+((item.count == null)?"":item.count)+"</td>"
  33. +"<td>"+((item.nickname == null)?"":item.nickname)+"</td>"
  34. +"<td>"+((item.mobile == null)?"":item.mobile)+"</td>"
  35. +"<td>"+((item.carNo == null)?"":item.carNo)+"</td>"
  36. +"<td>"+((item.address == null)?"":item.address)+"</td>"
  37. +"<td style=\"padding-top:8px\">"+((item.money == null)?"":"¥"+item.money)+"</td>"
  38. +"</tr>";
  39. $("#bodyData").append(line);
  40. }
  41. });
  42. }
  43. </script>
  44. <div class="section">
  45. <div class="section_top">
  46. <p>
  47. <a>业主管理</a>
  48. </p>
  49. </div>
  50. <div class="add_item">
  51. <button onclick="location.href='addOwner.html'" class=" btn btn-default blackborder ">添加业主</button>
  52. <!-- <select class="form-control pull-right" style="width:200px;" > -->
  53. <!-- <option>--全部--</option> -->
  54. <!-- <option>物业1</option> -->
  55. <!-- </select> -->
  56. <!-- <span class=" pull-right" style="line-height: 35px;">所属物业:</span> -->
  57. </div>
  58. <div class="information">
  59. <div class="scrollTable">
  60. <table class="table table-striped table-bordered table-hover">
  61. <thead>
  62. <tr style="background:#ededed;">
  63. <th>账号</th>
  64. <th>姓名</th>
  65. <th>手机号</th>
  66. <th>车牌号</th>
  67. <th>住址</th>
  68. <th>余额</th>
  69. </tr>
  70. </thead>
  71. <tbody id="bodyData" class="td_btn">
  72. </tbody>
  73. </table>
  74. </div>
  75. <ul class="page" maxshowpageitem="5" pagelistcount="15" id="page"></ul>
  76. </div>
  77. </div>
  78. <script>
  79. var mainHeight = $(window).height()-320+"px";
  80. $(".scrollTable").css({"max-height":mainHeight});
  81. </script>