index.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li class="active"><a href="javascript:;">茶室预约列表</a></li>
  7. </ul>
  8. <form class="well form-inline margin-top-20" method="post" action="{:url('AdminLockBook/index')}">
  9. 状态:
  10. <select class="form-control" name="is_use" style="width: 140px;">
  11. <option value=''>全部</option>
  12. <option value='1' <eq name="is_use" value="1">selected</eq>>到场</option>
  13. <option value='2' <eq name="is_use" value="2">selected</eq>>未到场</option>
  14. </select> &nbsp;&nbsp;
  15. 茶室名:
  16. <input type="text" class="form-control" name="lock_name" style="width: 200px;"
  17. value="{$lock_name|default=''}" placeholder="请输入茶室名...">
  18. 用户名:
  19. <input type="text" class="form-control" name="user_name" style="width: 200px;"
  20. value="{$user_name|default=''}" placeholder="请输入用户名...">
  21. <input type="submit" class="btn btn-primary" value="搜索"/>
  22. <a class="btn btn-danger" href="{:url('AdminLockBook/index')}">清空</a>
  23. </form>
  24. <form class="js-ajax-form" action="" method="post">
  25. <div class="table-actions">
  26. <button class="btn btn-primary btn-sm set_status">置为到场</button>
  27. </div>
  28. <table class="table table-hover table-bordered table-list">
  29. <thead>
  30. <tr>
  31. <th width="15">
  32. <label>
  33. <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
  34. </label>
  35. </th>
  36. <th width="50">ID</th>
  37. <th width="200">茶室名称</th>
  38. <th width="120">用户名</th>
  39. <th width="200">开始时间</th>
  40. <th width="200">结束时间</th>
  41. <th width="200">预约时间</th>
  42. <th width="120">状态</th>
  43. </tr>
  44. </thead>
  45. <foreach name="list" item="vo">
  46. <tr>
  47. <td>
  48. <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids"
  49. value="{$vo.id}" title="ID:{$vo.id}">
  50. </td>
  51. <td><b>{$vo.id}</b></td>
  52. <td>{$vo.lock_name}</td>
  53. <td>{$vo.user_name}</td>
  54. <td>{:date('Y-m-d H:i:s',$vo['start_time'])}</td>
  55. <td>{:date('Y-m-d H:i:s',$vo['end_time'])}</td>
  56. <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
  57. <td>{$vo.is_use_text}</td>
  58. </tr>
  59. </foreach>
  60. </table>
  61. <ul class="pagination">{$page|default=''}</ul>
  62. </form>
  63. </div>
  64. <script src="__STATIC__/js/admin.js"></script>
  65. <script>
  66. function reloadPage(win) {
  67. win.location.reload();
  68. }
  69. $('.set_status').click(function () {
  70. var arr = [];
  71. $('input[name="ids"]:checked').each(function(i){
  72. arr[i] = $(this).val();
  73. });
  74. Wind.css('layer');
  75. Wind.use("layer", function () {
  76. if (arr.length === 0) {
  77. layer.msg('请选择一条记录');
  78. return false;
  79. }
  80. $.post('{:url("setStatus")}',{ids:arr},function(data){
  81. reloadPage(window);
  82. },'json')
  83. });
  84. return false;
  85. });
  86. </script>
  87. </body>
  88. </html>