<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>
<link href="sys/css/jquery.searchableSelect.css" th:href="@{/static/sys/css/jquery.searchableSelect.css}" rel="stylesheet"/>
<script src="js/layer/layer.js" th:src="@{/static/sys/js/jquery.searchableSelect.js}"></script>
<link rel="stylesheet" th:href="@{/static/sys/css/home.css}">

</head>
<style>
	.tablelink{margin-right:10px;} 
	.stylecss{
	      color: red;
	}
	.select_width{
	     width: 220px;
	}
	.date_width{
	     width: 150px;
	}
	.tablelist th, td { 
	    white-space: nowrap;
	    text-overflow: ellipsis;
	    overflow: hidden;
	}
</style>
<body>
<div class="rightinfo">
	<form id="seachform" th:action="@{/sys/fx/consumeFxList.html}" method="post">
	  <input type="hidden" name="reportType" id="reportType" />
	  <ul class="seachform">
			<li>
				<label>操作类型</label>
				<select class="scinput select_width"  name="type"   style="width: 150px;" >
					<option value="" th:selected="${search.get('type')+'' eq '' ? true : false} ">全部</option>
					<option value="1" th:selected="${search.get('type')+'' eq '1' ? true : false} ">充值</option>
					<option value="2" th:selected="${search.get('type')+'' eq '2' ? true : false} ">消费</option>
					<option value="3" th:selected="${search.get('type')+'' eq '3' ? true : false} ">服务扣除的</option>
					<option value="4" th:selected="${search.get('type')+'' eq '4' ? true : false} ">上级分配币 </option>
					<option value="5" th:selected="${search.get('type')+'' eq '5' ? true : false} ">向下分配币 </option>
				</select>
			</li>
			<li>
				<label>开始时间</label>
				<input type="text" id="startTime" name="startTime" autocomplete="off" onclick="WdatePicker()"  th:value="${search.get('startTime')}" class="scinput date_width " placeholder="开始时间">
			</li>
			<li>
				<label>结束时间</label>
				<input type="text" id="endTime" name="endTime" autocomplete="off"  onclick="WdatePicker()"  th:value="${search.get('endTime')}" class="scinput date_width " placeholder="开始时间">
			</li>
		    <li>
			 <label>备注</label>
			  <input name="remarks" id="remarks" type="text" class="scinput" th:value="${search.get('remarks')}"/>
		    </li>
		   	<li>
				<label>输出条数</label>
				<input name="pageSize" type="number" class="scinput" th:value="${page.pageSize}"/>
			</li> 
		    <li>
		    	<input name="merchantId" id="merchantId" type="hidden"  th:value="${search.get('merchantId')}"/>
				<input type="button" class="scbtn" value="查询" />
			</li>
			<li>
            	<label>&nbsp;</label>
	            <a href="javascript:;"  th:href="@{/sys/admin/curator/index.html(libId=${merchant.libId})}"><input type="button" class="scbtn" value="返回" /></a>
	        </li>
	</ul>
	</form>
	<ul class="seachform">
		<li>
			<input type="button" id="button" class="scbtn" value="导出明细" />
		</li>
	</ul>
	
	<table class="tablelist">
		<thead>
		    <tr>
				<th style="min-width: 12%">始商户</th>
				<th style="min-width: 12%">始机构</th>
				<th style="min-width: 10%;color: red" >始商户类型</th>
		        <th style="min-width: 12%">至商户</th>
		        <th style="min-width: 12%">至机构</th>
		        <th style="min-width: 10%;color: red" >至商户类型</th>
		        <th style="width: 6%">操作</th>
 		    	<th style="width: 6%">机构塾币</th>
 		    	<th style="width: 6%">平台塾币</th>
<!-- 		        <th>备注</th>  -->
		        <th style="width: 10%">操作时间</th> 
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
					<td th:text="${item.fm_unit_name}"></td>
					<td th:text="${item.fj_league_name}"></td>
					<td style="color: red" th:switch="${item.fm_type}">
					   <span th:case="1">直接签约</span>
					   <span th:case="2">内部消耗</span>
					   <span th:case="3">外部签约</span>
					   <span th:case="4">内部不结算(财务) </span>
					</td>
					<td th:text="${item.tm_unit_name}"></td>
					<td th:text="${item.tj_league_name}"></td>
					<td style="color: red" th:switch="${item.tm_type}">
					   <span th:case="1">直接签约</span>
					   <span th:case="2">内部消耗</span>
					   <span th:case="3">外部签约</span>
					   <span th:case="4">内部不结算(财务)</span>
					</td>
					<td style="color: red" th:switch="${item.type}">
					   <span th:case="1">充值</span>
					   <span th:case="2">消费 </span>
					   <span th:case="3">服务扣除的</span>
					   <span th:case="4">上级分配币 </span>
					</td>
					<td th:text="${item.lib_service}"></td>
					<td th:text="${item.platform_service}"></td>
<!-- 					<td th:text="${item.remarks}"></td>  -->
					<td th:text="${#calendars.format(item.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>

</body>


<script src="sys/js/common.js" th:src="@{/static/js/common_math.js}"></script>

<script type="text/javascript">

$("#button").on('click',function(){
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/fx/exportConsumeList";
	$("#seachform").submit();
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/fx/consumeList.html";
});

$("#EQ_status").change(function(){
	$("#seachform").submit();
});


</script>


</html>