<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/deviceActivList.html}" method="post">
	  <input type="hidden" name="reportType" id="reportType" />
	<ul class="seachform">
			<li>
				<label>开始imei</label>
				<input type="text" id="imei" name="GTE_imei" th:value="${search.get('GTE_imei')}" class="scinput date_width " placeholder="开始imei号">
			</li>
			<li>
				<label>结束imei</label>
				<input type="text" id="imei" name=LTE_imei th:value="${search.get('LTE_imei')}" class="scinput date_width" placeholder="结束imei号">
			</li>
			
			<li>
			 <label>批次编号</label>
			  <input name="EQ_batchCode" type="text" class="scinput" th:value="${search.get('EQ_batchCode')}"/>
		    </li>
		    <li>
			 <label>快递单号</label>
			  <input name="EQ_emsNumber" type="text" class="scinput" th:value="${search.get('EQ_emsNumber')}"/>
		    </li>
		    
		    <li>
			 <label>备注</label>
			  <input name="LIKE_remarks" type="text" class="scinput" th:value="${search.get('LIKE_remarks')}"/>
		    </li>
			<li>
				<label>小塾号</label>
				<input type="text" id="seachDerver" name="seachDerver" th:value="${search.get('seachDerver')}" class="scinput date_width " placeholder="小塾号">
			</li>

	</ul>
	
		<ul class="seachform">
		
			 <li>
				<label>确认状态</label>
				<select class="scinput select_width"  name="EQ_status"   style="width: 150px;" >
					<option value="">全部</option>
					<option th:selected="${search.get('EQ_status') eq '1' ? true : false}" value="1">待收货(现商户)</option>
					<option th:selected="${search.get('EQ_status') eq '2' ? true : false}" value="2">已收货(现商户)</option>
					<option th:selected="${search.get('EQ_status') eq '3' ? true : false}" value="3">待收货(退回)</option>
					<option th:selected="${search.get('EQ_status') eq '4' ? true : false}" value="4">已收货(退回)</option>
					<option th:selected="${search.get('EQ_status') eq '5' ? true : false}" value="5">无效</option>
				</select>
			</li>
		    
		
		     <li>
				<label>流通状态</label>
				<select class="scinput select_width"  name="EQ_type"   style="width: 150px;" >
					<option value="">全部</option>
					<option th:selected="${search.get('EQ_type') eq '1' ? true : false}" value="1">出售</option>
					<option th:selected="${search.get('EQ_type') eq '2' ? true : false}" value="2">租赁</option>
					<option th:selected="${search.get('EQ_type') eq '3' ? true : false}" value="3">损坏</option>
					<option th:selected="${search.get('EQ_type') eq '4' ? true : false}" value="4">内部使用</option>
				</select>
			</li>
		    
		     <li>
				<label>是否跨区</label>
				<select class="scinput select_width"  name="EQ_isSpan"   style="width: 150px;" >
					<option value="">全部</option>
					<option value="1"  th:selected="${search.get('EQ_isSpan') eq '1' ? true : false}">未跨</option>
					<option value="2"  th:selected="${search.get('EQ_isSpan') eq '2'  ? true : false}">已跨</option>
				</select>
			</li>
			
			<li>
				<label>我的商户</label>
				<select class="scinput select_width"  name="EQ_orgCode"   style="width: 150px;" >
					<option value="">全部</option>
					<option th:each="item:${poslist}"  th:selected="${search.get('EQ_orgCode') eq item.orgCode ? true : false}" th:value="${item.orgCode}">[[${item.unitName}]]</option>
				</select>
			</li>
		<li>
			<input type="button" class="scbtn" value="查询" />
		</li>

	</ul>
	
	
	</form>

	<table class="tablelist">
		<thead>
		    <tr>
				<th>imei号</th>
				<th>设备号</th>
				<th>simcard</th>
		        <th>现商户</th>
		        <th>现商户名称</th>
		        <th>现状态</th>
<!-- 		    	<th>设备名称</th> -->
		    	<th>小塾号</th>
<!-- 		    	<th>设备型号</th> -->
		        <th>设备颜色</th>
<!-- 		        <th>设备代码</th> -->
		        <th>是否跨区</th>
		        <th>批次编号</th>
		        <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.imei}"></td>
					<td th:text="${item.derver}"></td>
					<td th:text="${item.simcard}"></td>
					<td th:text="${item.pos_code}"></td>
					<td th:text="${item.unit_name}"></td>
					<td  th:switch="${item.status}">
					   <span th:case="1">待收货(现商户)</span>
					   <span th:case="2">已收货(现商户)</span>
					   <span th:case="3" style="color: red">待收货(退回)</span>
					   <span th:case="4" style="color: red">已收货(退回)</span>
					   <span th:case="5">无效</span>
					</td>
<!-- 					<td th:text="${item.device_name}"></td> -->
					<td th:text="${item.device_number}"></td>
<!-- 					<td th:text="${item.device_model}"></td> -->
	
					<td th:text="${item.device_color}"></td>
<!-- 					<td th:text="${item.device_code}"></td> -->
					
					<td  th:switch="${item.is_span}">
					   <span th:case="1">无</span>
					   <span th:case="2" style="color:  red;">已跨</span>  
					</td>
					<td th:text="${item.batch_code}"></td>
					<td th:text="${item.ems_number}"></td>
					<td  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 style="color: red"  th:text="${item.child_name}"></td>
					<td style="color: red"  th:text="${item.parent_name}"></td>
					<td style="color: red"  th:text="${item.grade}"></td>
					<td style="color: red"  th:text="${item.school}"></td>
					<td style="color: red"  th:text="${item.updated_date}"></td>
				<td style="color: red"  th:text="${item.end_time}"></td>
					<td  th:text="${item.remarks}"></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(){
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/fx/exportDevice";
	$("#seachform").submit();
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/fx/deviceActivList.html";
});
</script>


</html>