<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/qdSales/qdSalesList.html}" method="post">
	<ul class="seachform">
			<li>
				<label>开始时间</label>
				<input type="text" id="beginDate" name="beginDate"  onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endDate\')}'})" th:value="${search.startTime }" 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.endTime }" class="scinput date_width" placeholder="结束时间">
			</li>
			<li>
				<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>
		<li>
		<label>企业付款状态</label>
					<select class="scinput select_width" name="stat"  style="width: 100px;">
					    <option value=""  th:selected="${ search.get('stat') eq '' }"  >全部</option>
						<option value="1" th:selected="${ search.get('stat') eq '1' }" >打款成功</option>
						<option value="2" th:selected="${ search.get('stat') eq '2' }" >打款失败</option>
					</select>
		</li>
			<label>&nbsp;</label>
			<li>
			<input type="button" class="scbtn" value="查询" />
		</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>
		        <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('league_name')}"></td>
				<td th:text="${liblist.get('name')}"></td>
				<td th:text="${liblist.get('details')}"></td>
				<td th:text="${liblist.get('sales_fee')}"></td>
				<td th:text="${liblist.get('stat')}"></td>
				<td th:text="${liblist.get('child_name')}" ></td>
				<td th:text="${liblist.get('order_no')}" ></td>
				<td th:text="${#calendars.format(liblist.get('create_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>
<script type="text/javascript">
$("#button").on('click',function(){
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/report/exportQdSales";
	$("#seachform").submit();
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/qdSales/qdSalesList.html";
});
</script>
</body>