house_historyOrder.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <script>
  2. var pageNo=1;
  3. $(function(){
  4. var mainHeight = $(window).height()-320+"px";
  5. $(".scrollTable").css({"max-height":mainHeight});
  6. userId = getParam('userId');
  7. loadPages();
  8. })
  9. /*获取页数*/
  10. function loadPages() {
  11. $.post("getVparkOrderList.do",{"userId":userId},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("getVparkOrderList.do",{"page":pageNo,"userId":userId}, 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.orderType == 0)?"停车落锁":"取消预订")+"</td>"
  34. +"<td>"+((item.identity == null)?"":item.identity)+"</td>"
  35. +"<td>"+((item.starttime == null)?"":formatAllDateParam(new Date(item.starttime)))+"</td>"
  36. +"<td>"+((item.endtime == null)?"":formatAllDateParam(new Date(item.endtime)))+"</td>"
  37. +"<td>"+((item.cost == null)?"":"¥"+item.cost)+"</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="returnPage()" class=" btn btn-default blackborder pull-right">返回</button>
  52. </div>
  53. <div class="information">
  54. <div class="scrollTable">
  55. <table class="table table-striped table-bordered table-hover clicktoCheckbox">
  56. <thead>
  57. <tr style="background:#ededed;">
  58. <th>地址</th>
  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>