house_useRecord.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <script>
  2. var identity;
  3. $(function(){
  4. var mainHeight = $(window).height()-320+"px";
  5. $(".scrollTable").css({"max-height":mainHeight});
  6. identity = getParam('identity');
  7. loadPages();
  8. })
  9. /*获取页数*/
  10. function loadPages() {
  11. $.post("getPointUseRecord.do",{"identity":identity},function(resp) {
  12. $('.page').empty();
  13. var totalCnt = resp.data.totalCnt;
  14. var GG = {
  15. "kk":function(dd){
  16. pageNo = dd;
  17. loadData();
  18. $(".page").prepend("<span class=\"page_all\">共&nbsp;"+resp.data.totalCnt+"&nbsp;条</span>");
  19. }
  20. }
  21. $("#page").initPage(totalCnt,1,GG.kk);
  22. });
  23. }
  24. /*获取数据*/
  25. function loadData() {
  26. $.post("getPointUseRecord.do",{"page":pageNo,"identity":identity}, function(resp){
  27. $("#bodyData").empty();
  28. var listArray = resp.data.list;
  29. for (var i=0;i<listArray.length;i++) {
  30. var item = listArray[i];
  31. var line = "<tr><td>"+((item.address == null)?"":item.address)+"</td>"
  32. +"<td>"+((item.orderIdentity == null)?"":item.orderIdentity)+"</td>"
  33. +"<td>"+((item.identity == null)?"":item.identity)+"</td>"
  34. +"<td>"+((item.orderType == null)?"":item.orderType == 1?"正常落锁":"取消预订")+"</td>"
  35. +"<td>"+((item.starttime == null)?"":formatAllDateToSecond(new Date(item.starttime)))+"</td>"
  36. +"<td>"+((item.endtime == null)?"":formatAllDateToSecond(new Date(item.endtime)))+"</td>"
  37. +"</tr>";
  38. $("#bodyData").append(line);
  39. }
  40. });
  41. }
  42. </script>
  43. <div class="section">
  44. <div class="section_top">
  45. <p>
  46. <a>物业管理 > 车位使用记录</a>
  47. </p>
  48. </div>
  49. <div class="add_item">
  50. <button onclick="returnPage()" class=" btn btn-default blackborder pull-right">返回</button>
  51. <!-- <button onclick="loadData()" class="pull-right btn btn-default blackborder btn_search">搜索</button> -->
  52. <!-- <input id="inputKeyword" class="pull-right" placeholder="优惠券名称或类型" type="text"/> -->
  53. </div>
  54. <div class="information">
  55. <div class="scrollTable">
  56. <table class="table table-striped table-bordered table-hover clicktoCheckbox">
  57. <thead>
  58. <tr style="background:#ededed;">
  59. <th>地址</th>
  60. <th>订单标识</th>
  61. <th>车位标识</th>
  62. <th>订单类型</th>
  63. <th>开始时间</th>
  64. <th>结束时间</th>
  65. </tr>
  66. </thead>
  67. <tbody id="bodyData" class="td_btn">
  68. </tbody>
  69. </table>
  70. </div>
  71. <ul class="page" maxshowpageitem="5" pagelistcount="15" id="page"></ul>
  72. </div>
  73. </div>
  74. <script>
  75. var mainHeight = $(window).height()-320+"px";
  76. $(".scrollTable").css({"max-height":mainHeight});
  77. </script>