You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
5.0 KiB
109 lines
5.0 KiB
<!DOCTYPE html>
|
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>简易点菜系统</title>
|
|
<link href="/css/index.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="/css/bootstrap.min.css"
|
|
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
|
<script>
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="frame">
|
|
<span>检索条件</span>
|
|
<form method="post" action="#" th:action="@{/api/index}" th:object="${query}">
|
|
<div class="input-group mt-3">
|
|
<div class="input-group-prepend col-2 pr-2 justify-content-end">
|
|
<span class="input-group-text">桌号</span>
|
|
</div>
|
|
<input type="text" th:field="*{zhuohao}" class="form-control col-4">
|
|
</div>
|
|
<div class="input-group mt-3">
|
|
<div class="input-group-prepend col-2">
|
|
<span class="input-group-text">客人姓名</span>
|
|
</div>
|
|
<input type="text" th:field="*{xingming}" class="form-control col-4">
|
|
<div class="input-group-prepend col-2">
|
|
<span class="input-group-text">联系方式</span>
|
|
</div>
|
|
<input type="text" th:field="*{tel}" class="form-control col-4">
|
|
</div>
|
|
<div class="input-group mt-3">
|
|
<div class="input-group-prepend col-2 pr-2 justify-content-end">
|
|
<span class="input-group-text">预定</span>
|
|
</div>
|
|
<div class="custom-control custom-radio custom-control-inline mt-auto mb-auto">
|
|
<input type="radio" id="customRadioInline1"
|
|
class="custom-control-input" value="true" th:field="*{yuding}">
|
|
<label class="custom-control-label" for="customRadioInline1">有</label>
|
|
</div>
|
|
<div class="custom-control custom-radio custom-control-inline mt-auto mb-auto">
|
|
<input type="radio" id="customRadioInline2" name="yuding" class="custom-control-input" value="false"
|
|
th:field="*{yuding}">
|
|
<label class="custom-control-label" for="customRadioInline2">无</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3 d-flex justify-content-between">
|
|
<a href="/api/order" class="btn btn-secondary col-3">点餐</a>
|
|
<button type="submit" class="btn btn-secondary col-3">检索</button>
|
|
</div>
|
|
</form>
|
|
|
|
|
|
<hr class="border-black"/>
|
|
|
|
<span th:text="${query.yuding?'检索结果(已定)':'检索结果(未定)'}"></span>
|
|
|
|
<table class="table mt-3 table-bordered border-black text-center">
|
|
<thead class="thead-light" th:switch="${query.yuding}">
|
|
<tr th:case="true">
|
|
<th scope="col">桌号</th>
|
|
<th scope="col">客人姓名</th>
|
|
<th scope="col">预定</th>
|
|
<th scope="col">联系方式</th>
|
|
<th scope="col">用餐时间</th>
|
|
<th scope="col">人数</th>
|
|
<th scope="col"></th>
|
|
<th scope="col"></th>
|
|
</tr>
|
|
<tr th:case="false">
|
|
<th scope="col">桌号</th>
|
|
<th scope="col">人数</th>
|
|
<th scope="col"></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody th:switch="${query.yuding}">
|
|
<tr th:case="true" th:each="item:${list}">
|
|
<th scope="row" class="p-3"><a th:href="@{'/api/order/detail/'+${item.zhuohao}}">${item.zhuohao}</a></th>
|
|
<td class="p-3">${item.xingming}</td>
|
|
<td class="p-3">
|
|
<img th:src="@{${item.yuding?'/icon/radioactive.svg':'/icon/radioactive.svg'}}" class="icon"/>
|
|
</td>
|
|
<td class="p-3">${item.tel}</td>
|
|
<td class="p-3">${item.birthday}</td>
|
|
<td class="p-3">${item.renshu}</td>
|
|
<td>
|
|
<a th:href="@{'/api/order/'+${item.zhuohao}}" class="btn btn-secondary">修改</a>
|
|
</td>
|
|
<td>
|
|
<a th:href="@{'/api/order/del/'+${item.zhuohao}}" class="btn btn-secondary">删除</a>
|
|
</td>
|
|
</tr>
|
|
<tr th:case="false" th:each="item:${list}">
|
|
<th scope="row" class="p-3"><a th:href="@{'/api/order/detail/'+${item.zhuohao}}">${item.zhuohao}</a></th>
|
|
<td class="p-3">${item.renshu}</td>
|
|
<td>
|
|
<a href="/api/order" class="btn btn-secondary">点餐</a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |