<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>私塾家</title>
<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
<script th:include="sys/common/metaJS" th:remove="tag"></script> 
<script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/sys/js/My97DatePicker/WdatePicker.js}"></script>
</head>
<style>
	.tablelink{margin-right:10px;}
	.stylecss{
	      color: red;
	}
	.select_width{
	     width: 220px;
	}
	.date_width{
	     width: 83px;
	}
</style>
<body>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li><a href="#">阅读吧</a></li>
		<li><a href="#">借阅记录</a></li>
	</ul>
</div>
<div class="rightinfo">
	<form id="seachform" th:action="@{/sys/lib/libUserHistorylist.html}" method="post">
	<ul class="seachform">
		<li>
			<label>书名</label>
			<input name="title" type="text" class="scinput" th:value="${search.get('title')}"/>
		</li>
		
		<li>
			<label>借书人</label>
			<input name="child_name" type="text" class="scinput" th:value="${search.get('child_name')}"/>	
			</li>
			<li>
				<label>借书时间</label>
				<input type="text" id="beginDate" name="beginDate"  onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endDate\')}'})" th:value="${search.beginDate }" class="scinput date_width " placeholder="开始时间">
			</li>
			
			
			<li>
				<label>借书时间</label>
				<input type="text" id="endDate" name="endDate"  onclick="WdatePicker({minDate:'#F{$dp.$D(\'beginDate\')}'})" th:value="${search.endDate }" class="scinput date_width" placeholder="结束时间">
			</li>
		<li th:if="${#lists.size(libList) gt 1 }">
				<label>图书馆</label>
					<select class="scinput select_width"  name="libId"   style="width: 220px;" >
						<option value=""   >全部</option>
						<option th:each="item:${libList}"  th:value="${item.id}"  th:selected="${ search.get('libId') eq item.id }"  th:text="${item.leagueName}"></option>
					</select>
		</li>	
		<li>
		<label>状态</label>
					<select class="scinput" name="state" style="width: 70px;">
					    <option value=""  th:selected="${ search.get('state') eq '' }"  >全部</option>
						<option value="1" th:selected="${ search.get('state') eq '1'}" >在借</option>
						<option value="2" th:selected="${ search.get('state') eq '2' }" >逾期</option>
						<option value="3" th:selected="${ search.get('state') eq '3' }" >已还</option>
					</select>
		</li>
		<li>
			<label>&nbsp;</label>
			<input type="button" class="scbtn" value="查询" />
		</li>
	</ul>
	</form>
	<table class="tablelist">
		<thead>
		    <tr>
		        <th style="width: 50px;">序号</th>
		        <th>书名</th>
		        <th>封面</th>
		        <th>状态</th>
		        <th>二维码</th>
		        <th>借书人</th>
		        <th>卡号</th>
		        <th>借书时间</th>
		        <th>还书时间</th>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="liblist:${list}" >
				<td th:text="${liblistStat.count}" ></td>
				<td th:text="${liblist.get('title')}"></td>
				<td  class="imgtd">
							<img  th:if="${liblist.get('local_image')}!=null" th:src="${imgUrl}+''+${liblist.get('local_image')}" style="width: 50px;height: 50px;" />
					</td>
				<td th:switch="${liblist.get('state')}" >
					    <span th:case="1" >在借</span>
					    <span th:case="2" >逾期</span>
					    <span th:case="3" >已还</span>
				   </td>
				   <td  class="imgtd">
							<img  th:if="${liblist.get('qr_url')}!=null" th:src="${imgUrl}+''+${liblist.get('qr_url')}" style="width: 50px;height: 50px;" />
					</td>	
				<td th:text="${liblist.get('child_name')}"></td>
				<td th:text="${liblist.get('flow_id')}"></td>
				<td th:text="${#calendars.format(liblist.get('create_time'),'yyyy-MM-dd HH:mm:ss')}" ></td>
				<td th:text="${#calendars.format(liblist.get('update_time'),'yyyy-MM-dd HH:mm:ss')}" ></td>
			</tr>
		</tbody>
	</table>
	<!-- 分页 -->
	<div class="pagin">
    	<div class="message">共<i class="blue">[[${page.rowCnt}]]</i>条记录，当前显示第&nbsp;<i class="blue">[[${page.pageNo }]]&nbsp;</i>页</div>
    	<div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
   	</div>
</div>
</body>