list.html

张创琦

  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.thymeleaf.org">
  3. <head>
  4. <meta charset="UTF-8"/>
  5. <title>userList</title>
  6. <link rel="stylesheet" th:href="@{/css/bootstrap.css}"/>
  7. <script type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}"></script>
  8. <script type="text/javascript" src="/js/My97DatePicker/lang/zh-cn.js"></script>
  9. <script type="text/javascript" th:src="@{/js/jquery/jquery-1.10.2.min.js}"></script>
  10. </head>
  11. <body class="container">
  12. <br/>
  13. <h1>账单列表</h1>
  14. <br/><br/>
  15. <div class="with:80%">
  16. <!-- TODO 回显查询数据 -->
  17. <form class="form-inline" id="qf" th:action="@{/bill/list}" method="post">
  18. <div class="form-group">
  19. <label for="typeId" class="control-label">类型</label>
  20. <select name="typeId" id="typeId" class="form-control">
  21. <option value="">全部</option>
  22. <option th:each="t:${types}" th:value="${t.id}" th:text="${t.name}" th:selected="(${bill.typeId} == ${t.id})"></option>
  23. </select>
  24. </div>
  25. <div class="form-group">
  26. <label for="date1" class="control-label" >开始时间</label>
  27. <input type="text" class="form-control" name="date1" id="date1" placeholder="开始时间" th:value="${bill.date1} ? ${#dates.format(bill, date1, 'yyyy-MM-dd')}" onclick="WdatePicker()"/>
  28. </div>
  29. <div class="form-group">
  30. <label for="date2" class="control-label">结束时间</label>
  31. <input type="text" class="form-control" name="date2" id="date2" placeholder="结束时间" th:value="${bill.date2} ? ${#dates.format(bill, date2, 'yyyy-MM-dd')}" onclick="WdatePicker()"/>
  32. </div>
  33. <div class="form-group">
  34. <input type="submit" value="查询" class="btn btn-info" />
  35. &nbsp; &nbsp;
  36. <input type="reset" value="重置" class="btn btn-info" />
  37. &nbsp; &nbsp;
  38. <a href="/bill/toAdd" th:href="@{/bill/toAdd}" class="btn btn-info">添加</a>
  39. </div>
  40. </form>
  41. </div>
  42. <br/>
  43. <div class="with:80%">
  44. <table class="table table-striped table-bordered">
  45. <thead>
  46. <tr>
  47. <th>#</th>
  48. <th>标题</th>
  49. <th>时间</th>
  50. <th>金额</th>
  51. <th>类别</th>
  52. <th>说明</th>
  53. <th>操作</th>
  54. </tr>
  55. </thead>
  56. <tbody>
  57. <!-- TODO 回显查询结果 -->
  58. <tr th:each="b, bstatus : ${list}" th:style="${bstatus.odd} ? 'background-color: #A3C6C8' ">
  59. <th scope="row" th:text="${b.id}">id</th>
  60. <td th:text="${b.title}">name</td>
  61. <td th:text="${b.billTime} ? ${#dates.format(b.billTime, 'yyyy-MM-dd')}">time</td>
  62. <td th:text="${b.price}">price</td>
  63. <td th:text="${b.typeName}">typeName</td>
  64. <td th:text="${b.explain}">explain</td>
  65. <td>
  66. <!-- 处于报错状态 -->
  67. <a th:href="|/bill/delete/${b.id}|">删除</a> &nbsp; &nbsp; &nbsp;
  68. <a th:href="|/bill/toUpdate/${b.id}|">修改</a>
  69. </td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. </div>
  74. </body>
  75. </html>