house_property.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <script>
  2. var pageNo=1;
  3. $(function(){
  4. $("aside>ul>li").eq(5).find("a").css({"background":"#00C1DE"})
  5. $("aside>ul>li").eq(5).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("system/getCommunityPropertyList.do",{},function(resp) {
  13. $('.page').empty();
  14. 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("system/getCommunityPropertyList.do",{"page":pageNo}, function(resp){
  28. $("#bodyData").empty();
  29. listArray = resp.data.list;
  30. for (var i=0;i<listArray.length;i++) {
  31. var item = listArray[i];
  32. var line = "<tr><td>"+((item.username == null)?"":item.username)+"</td>"
  33. +"<td>"+((item.name == null)?"":item.name)+"</td>"
  34. +"<td>"+((item.tel == null)?"":item.tel)+"</td>"
  35. +"<td>"+((item.bankAccount == null)?"":item.bankAccount)+"</td>"
  36. +"<td>"+((item.serviceFee == null)?"":item.serviceFee)+"</td>"
  37. +"<td>"+((item.indate == null)?"":formatCaiDanDate(new Date(item.indate)))+"</td>"
  38. +"<td><a href=\"javascript:modItem("+item.id+")\">修改</a>"
  39. +"<a href=\"javascript:deleteItem("+item.id+")\">删除</a>"
  40. +"<a href=\"javascript:parkSpace("+item.id+")\">车位</a>"
  41. +"</td>"
  42. +"</tr>";
  43. $("#bodyData").append(line);
  44. }
  45. });
  46. }
  47. /*删除物业*/
  48. function deleteItem(id){
  49. if(confirm("是否删除该物业?")){
  50. $.post("delCommunityProperty.do",{"id":id},function(){
  51. refreshList();
  52. });
  53. }
  54. }
  55. /*保留页码刷新列表*/
  56. function refreshList(){
  57. if(listArray.length == 1){
  58. pageNo -= 1;
  59. }
  60. totalCnt -= 1;
  61. $('.page').empty();
  62. $("#page").initPage(totalCnt,pageNo,function(pageNo){
  63. loadData();
  64. $(".page").prepend("<span class=\"page_all\">共&nbsp;"+totalCnt+"&nbsp;条</span>");
  65. });
  66. }
  67. /*修改物业*/
  68. function modItem(id){
  69. location.href="addProperty.html?id="+id;
  70. }
  71. /*查看车位*/
  72. function parkSpace(id){
  73. location.href="#/parkSpace:&id="+id;
  74. }
  75. </script>
  76. <div class="section">
  77. <div class="section_top">
  78. <p >
  79. <a>物业管理</a>
  80. </p>
  81. </div>
  82. <div class="add_item">
  83. <button onclick="location.href='addProperty.html'" class=" btn btn-default blackborder ">添加物业</button>
  84. <!-- <button onclick="loadData()" class="pull-right btn btn-default blackborder btn_search">搜索</button> -->
  85. <!-- <input id="inputKeyword" class="pull-right" placeholder="优惠券名称或类型" type="text"/> -->
  86. </div>
  87. <div class="information">
  88. <div class="scrollTable">
  89. <table class="table table-striped table-bordered">
  90. <thead>
  91. <tr style="background:#ededed;">
  92. <th>账号</th>
  93. <th>营业证名</th>
  94. <th>联系方式</th>
  95. <th>银行账户</th>
  96. <th>服务费率</th>
  97. <th>创建时间</th>
  98. <th>操作</th>
  99. </tr>
  100. </thead>
  101. <tbody id="bodyData" class="td_btn">
  102. </tbody>
  103. </table>
  104. </div>
  105. <ul class="page" maxshowpageitem="5" pagelistcount="15" id="page"></ul>
  106. </div>
  107. </div>