list.html
张创琦
<!DOCTYPE html><html lang="en" xmlns:th="http://www.thymeleaf.org"><head><meta charset="UTF-8"/><title>userList</title><link rel="stylesheet" th:href="@{/css/bootstrap.css}"/><script type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}"></script><script type="text/javascript" src="/js/My97DatePicker/lang/zh-cn.js"></script><script type="text/javascript" th:src="@{/js/jquery/jquery-1.10.2.min.js}"></script></head><body class="container"><br/><h1>账单列表</h1><br/><br/><div class="with:80%"><!-- TODO 回显查询数据 --><form class="form-inline" id="qf" th:action="@{/bill/list}" method="post"><div class="form-group"><label for="typeId" class="control-label">类型</label><select name="typeId" id="typeId" class="form-control"><option value="">全部</option><option th:each="t:${types}" th:value="${t.id}" th:text="${t.name}" th:selected="(${bill.typeId} == ${t.id})"></option></select></div><div class="form-group"><label for="date1" class="control-label" >开始时间</label><input type="text" class="form-control" name="date1" id="date1" placeholder="开始时间" th:value="${bill.date1} ? ${#dates.format(bill, date1, 'yyyy-MM-dd')}" onclick="WdatePicker()"/></div><div class="form-group"><label for="date2" class="control-label">结束时间</label><input type="text" class="form-control" name="date2" id="date2" placeholder="结束时间" th:value="${bill.date2} ? ${#dates.format(bill, date2, 'yyyy-MM-dd')}" onclick="WdatePicker()"/></div><div class="form-group"><input type="submit" value="查询" class="btn btn-info" /> <input type="reset" value="重置" class="btn btn-info" /> <a href="/bill/toAdd" th:href="@{/bill/toAdd}" class="btn btn-info">添加</a></div></form></div><br/><div class="with:80%"><table class="table table-striped table-bordered"><thead><tr><th>#</th><th>标题</th><th>时间</th><th>金额</th><th>类别</th><th>说明</th><th>操作</th></tr></thead><tbody><!-- TODO 回显查询结果 --><tr th:each="b, bstatus : ${list}" th:style="${bstatus.odd} ? 'background-color: #A3C6C8' "><th scope="row" th:text="${b.id}">id</th><td th:text="${b.title}">name</td><td th:text="${b.billTime} ? ${#dates.format(b.billTime, 'yyyy-MM-dd')}">time</td><td th:text="${b.price}">price</td><td th:text="${b.typeName}">typeName</td><td th:text="${b.explain}">explain</td><td><!-- 处于报错状态 --><a th:href="|/bill/delete/${b.id}|">删除</a> <a th:href="|/bill/toUpdate/${b.id}|">修改</a></td></tr></tbody></table></div></body></html>
