<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: 100px;
	}
</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/libYDlist.html}" method="post">
	<ul class="seachform">
	    <li>
				<label>查询月份</label>
				<input type="text" id="monthDate" name="monthDate"  onclick="WdatePicker({dateFmt:'yyyy-MM',maxDate:'%y-%M'})" th:value="${search.monthDate}" class="scinput date_width " placeholder="月份">
			</li>
		<li>
			<label>姓名</label>
			<input name="child_name" type="text" class="scinput" th:value="${search.get('child_name')}"/>
		</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>&nbsp;</label>
			<input type="button" class="scbtn" value="查询" />
		</li>
		<li>
				<ul class="toolbar">
					<a th:href="@{/sys/lib/libQGlist.html}"><li class="click"><span><img style="width: 24px;height: 24px" th:src="@{/static/sys/images/goto.png}" /></span>返回</li></a>
				</ul>
		</li>
		<li>
			<input type="button" id="button" style="width: 100px;" class="scbtnbution" value="导出明细" />
		</li>
	</ul>
	</form>
	<table class="tablelist">
		<thead>
		    <tr>
		        <th style="width: 50px;">序号</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('child_name')}"></td>
				<td th:text="${liblist.get('frequency')}"></td>
				<td th:text="${liblist.get('qdl')}"></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>
<script type="text/javascript">
$("#button").on('click',function(){
	if($('#monthDate').val()==''){
		layer.msg("请选择时间",{icon:11});
		return false;
	}
	$('#reportType').val(3);
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/report/exportLibYD";
	$("#seachform").submit();
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/lib/libYDlist.html";
});
</script>
</body>