<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/finance/littleDetailList.html}" method="post">
	<ul class="seachform">
		<li>
			<label>机构名称</label>
			<input type="text" id="unitName" name="unitName"   th:value="${search.unitName }" class="scinput " placeholder="输入机构关键字">
		</li>
		<li>
			<label>代理级别</label>
			<input type="text" id="level" name="level"   th:value="${search.level }" class="scinput" placeholder="输入代理级别">
		</li>
		<li>
			<label>开始月份</label>
			<input type="text" id="startMonth" name="startMonth" autocomplete="off"   onclick="WdatePicker({dateFmt:'yyyy-MM'})" th:value="${search.startMonth }" class="scinput date_width " placeholder="选择开始月份">
		</li>
		<li>
			<label>结束月份</label>
			<input type="text" id="endMonth" name="endMonth" autocomplete="off"   onclick="WdatePicker({dateFmt:'yyyy-MM'})" th:value="${search.endMonth }" 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 style="color: red">本月消耗：有小塾消费</th>
		    	<th style="color: red">本月消耗：无小塾消费</th>
		    	<th style="color: red">本月消耗：扣币</th>
		    	<th style="color: red">本月消耗：分配</th>
				<th>本月结存</th>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
					<td th:text="${itemStat.count}"></td>
					<td th:text="${item.get('months')}"></td>
					<td th:text="${item.get('level')}"></td>
					<td th:text="${item.get('unit_name')}"></td>
					<td th:text="${item.get('last_left')}"></td>
					<td th:text="${item.get('add_total')}"></td>
					<td th:text="${item.get('cost_count')}"></td>
					<td th:text="${item.get('cost_count0')}"></td>
					<td th:text="${item.get('cost_count1')}"></td>
					<td th:text="${item.get('cost_count2')}"></td>
					<td th:text="${item.get('cost_count3')}"></td>
					<td th:text="${item.get('this_left')}"></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(5);
		document.getElementById("seachform").action = "[[${sysUrl}]]/sys/finance/export3";
		$("#seachform").submit();
		window.setTimeout(function(){
			document.getElementById("seachform").action = "[[${sysUrl}]]/sys/finance/littleDetailList.html";
		},3000);
	});
</script>


</html>