<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: 150px;
	}
</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/dispatcher/libApplyInfoList.html}" method="post">
			<ul class="seachform">

				<li>
					<label>图书馆名称：</label>
					<input type="text" id="leagueName" name="leagueName" th:value="${search.get('leagueName')}" class="scinput date_width " placeholder="图书馆">
				</li>
				<li>
					<input type="button" class="scbtn" value="查询" />
					<input type="button" id="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>
				<th>审核留言</th>
				<th>操作</th>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
				<td th:text="${itemStat.count}"></td>
				<td th:text="${item.get('league_name')}"></td>
				<td th:text="${item.get('batch_id')}"></td>
				<td  th:text="${item.get('title')}"></td>
				<td th:text="${item.get('publish')}"></td>

				<td th:text="${item.get('pai_date')}"></td>
				<td th:text="${item.get('book_src')}"></td>
				<td th:text="${item.get('create_time')}"></td>
				<td th:text="${item.get('state')}"></td>
				<td th:text="${item.get('audit_msg')}"></td>
				<td>
					<a th:if="${item.get('state')==null}"  href="javascript:;"   th:onclick="'updateById(\''+${item.id}+'\')'"   class="tablelink">审核</a>
				</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>
<script type="text/javascript">
	$("#button").on('click',function(){
		document.getElementById("seachform").action = "[[${sysUrl}]]/sys/dispatcher/exportLibApplyDetail";
		$("#seachform").submit();
		window.setTimeout(function(){
			document.getElementById("seachform").action = "[[${sysUrl}]]/sys/dispatcher/libApplyInfoList.html";
		},3000);

	});

	function updateById(id){
		layer.open({
			type: 2,
			title: "审核留言",
			closeBtn: 1, //不显示关闭按钮
			shift: 0.8,
			//offset: '100px',
			area: ['55%', '55%'],
			content: "[[${sysUrl}]]/sys/dispatcher/libApplyEdit.html?id="+id
		});
	}
</script>
</html>