<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/fx/merchantCapList.html}" method="post">
	<ul class="seachform">
		<li>
			<label>所有商户：</label>
			<select class="scinput select_width"  name="merchantId"   style="width: 150px;" >
				<option value="">全部</option>
				<option th:each="item:${poslist}"  th:selected="${search.get('merchantId') eq item.id ? true : false}" th:value="${item.id}">[[${item.unitName}]]</option>
			</select>
		</li>

		 <li>
		 <label>开始日期：</label>
		  <input style="width: 150px;" name="signTime" type="text" class="scinput"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',autoPickDate:true})" th:value="${search.get('signTime')}" autocomplete="off"  placeholder="开始日期" />
	    </li>
	    
	    <li>
		 <label>结束日期：</label>
		  <input style="width: 150px;" name="endSignTime" type="text" class="scinput"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',autoPickDate:true})" th:value="${search.get('endSignTime')}" autocomplete="off"  placeholder="结束日期" />
	    </li>
		<li>
			<input type="button" class="scbtn" value="查询" />
		</li>
	</ul>
	</form>
	
	<ul class="seachform">
		<li>
			<input type="button" id="button" class="scbtn" value="导出明细" />
		</li>
	</ul>
	
	<table class="tablelist">
		<thead>
		    <tr>
		    	<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="${item.pos_code}"></td>
					<td th:text="${item.unit_name}"></td>
					<td th:text="${item.lib_service}"></td>
					
					<td th:text="${item.pr_1}"></td>
					<td th:text="${item.pr_2}"></td>
					<td th:text="${item.pr_3}"></td>
					
					<td th:text="${item.time}" ></td>  
					<td th:switch="${item.cap_type}">
					   <span th:case="1" >充值服务包</span>
					   <span th:case="2" >消耗服务包</span>
					   <span th:case="3" >充值平台管理费</span>
					   <span th:case="4" >消耗平台管理费</span>
					   <span th:case="5" >充值加油包</span>
					   <span th:case="6" >消耗加油包</span>
					</td>
					<td  th:switch="${item.cap_type}">
					   <span th:case="1" >充值</span>
					   <span th:case="2" >消耗</span>
					   <span th:case="3" >充值</span>
					   <span th:case="4" >消耗</span>
					   <span th:case="5" >充值</span>
					   <span th:case="6" >消耗</span>
					</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">

</script>

<script type="text/javascript">
$("#button").on('click',function(){
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/fx/exportMerchantCapList";
	$("#seachform").submit();
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/fx/merchantCapList.html";
});
</script>

</html>