<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/bookList/materielOffList.html}" method="post">
		<input type="hidden" name="type" id="reportType" />
		<ul class="seachform">
			<li>
				<label>开始时间</label>
				<input type="text" id="GT_offTime" name="GT_offTime" autocomplete="off"   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" th:value="${search.GT_offTime }" class="scinput date_width " placeholder="开始时间">
			</li>


			<li>
				<label>结束时间</label>
				<input type="text" id="LT_offTime" name="LT_offTime"  autocomplete="off"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" th:value="${search.LT_offTime }" 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 style=" width: 360px;"> <table style="width: 100%;">
					<thead><tr><th>物料名称</th><th>物料数量</th></tr></thead></table></th>
				<th>操作</th>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
					<td th:text="${itemStat.count}"></td>
					<td th:text="${item.offFlow}"></td>
					<td th:text="${#calendars.format(item.offTime,'yyyy-MM-dd HH:mm')}"></td>
					<td th:text="${item.offNum}"></td>
				<td>
					<table style="width: 100%;">
						<tbody>
						<tr th:each="item2:${item.tempInfoList}" th:if="${item}">
							<td th:text="${item2.materielName}" style=" width: 180px;"></td>
							<td th:text="${item2.materielCount}"></td>
						</tr>
						</tbody>
					</table>
				</td>
				<td><a th:href="@{/sys/bookList/materielOffDetailList.html(offId=${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(){
		$("#reportType").val(7);
		document.getElementById("seachform").action = "[[${sysUrl}]]/sys/bookList/exportDetail";
		$("#seachform").submit();
		window.setTimeout(function(){
			document.getElementById("seachform").action = "[[${sysUrl}]]/sys/bookList/materielOffList.html";
		},3000);
	});
</script>


</html>