<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>
</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/deviceActCountList.html}" method="post">
	  <input type="hidden" name="reportType" id="reportType" />
		<ul class="seachform">
		    <li>
			  <label>批次编号</label>
			  <input name="batchCode" type="text" class="scinput" th:value="${search.get('batchCode')}"/>
		    </li>
			<li>
				<label>物流状态</label>
				<select class="scinput select_width"  name="type"   style="width: 150px;" >
					<option th:selected="${search.get('type') eq '1' ? true : false}" value="1">分配下级</option>
					<option th:selected="${search.get('type') eq '2' ? true : false}" value="2">退回上级</option>
					<option th:selected="${search.get('type') eq '3' ? true : false}" value="3">设备入库</option>
					<option th:selected="${search.get('type') eq '4' ? true : false}" value="4">退回入库</option>
				</select>
			</li>
			
	
		    <li>
			  <label style="color:red">开始时间</label>
			  <input type="text" readonly="readonly" id="startTime" name="startTime" autocomplete="off"  onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')}'})" th:value="${search.get('startTime') }" class="scinput date_width " placeholder="开始时间">
		    </li>
			<li>
				<label style="color:red">结束时间</label>
				<input type="text" readonly="readonly" id="endTime" name="endTime" autocomplete="off"  onclick="WdatePicker({minDate:'#F{$dp.$D(\'startTime\')}'})" th:value="${search.get('endTime') }" class="scinput date_width" placeholder="结束时间">
			</li>
			<li th:if="${poslist!=null}">
				<label>选择商户</label>
				<select class="scinput select_width"  name="merchantId"   id="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>
				<input type="button" class="scbtn" value="查询" />
			</li>
			
		</ul>
	</form>
	<ul style="margin-bottom: 10px;">
		<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>
		        <th>快递联系号码</th>
		        <th>快递地址</th>
		        <th>快递凭证</th>
		        <th>备注</th> 
		        <th>操作时间</th> 
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >

					<td  th:switch="${item.type}">
						<span th:case="1" style="color:red;">分配下级</span>
						<span th:case="2">退回上级 </span>
						<span th:case="3">设备入库</span>
						<span th:case="4">退回入库</span>
					</td>
					<td style="color:red"><a th:href="${sysUrl+'/sys/fx/deviceActDetailsList?batchCode='+item.batch_code+'&type='+item.type}" style="color:red"   th:text="${item.batch_code}"></a></td>
					<td style="color:red"  th:text="${item.count}"></td>

				<td th:text="${item.fpos_code}"></td>
				<td th:text="${item.funit_name}"></td>
				<td th:text="${item.pos_code}"></td>
				<td th:text="${item.unit_name}"></td>


					<td th:text="${item.ems_number}"></td>
					<td th:text="${item.ems_username}"></td>
					<td th:text="${item.ems_telephone}"></td>
					<td th:text="${item.ems_address}"></td>
					<td>
						<a th:if="${item.ems_img!=null && item.ems_img!='' }" th:href="${imgUrl+item.ems_img}" style="color:red"  target="_blank" >点击查看凭证</a>
						<span th:if="${item.ems_img==null || item.ems_img=='' }">未上传凭证</span>
					</td>
					<td th:text="${item.remarks}"></td>
					<td th:text="${item.create_time}"></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>

<ul style="margin-bottom: 100px;margin-left: 20px;">
		<li style="line-height: 25px;">
			<span style="font-size: 14px;">操作名词解释</span>
		</li>
		<li style="line-height: 25px;color: red;">
			<span style="font-size: 14px;">物流状态：操作库存的物流状态。</span>
		</li>
		<li style="line-height: 25px;color: red;">
			<span style="font-size: 14px;">批次编号：操作库存的批次编号，点击编号可查看此批次的明细列表。</span>
		</li>
		<li style="line-height: 25px;color: red;">
			<span style="font-size: 14px;">批次总量：此批次的总数量。</span>
		</li>
		<li style="line-height: 25px;color: red;">
			<span style="font-size: 14px;">始商户：操作来自的商户。</span>
		</li>
		<li style="line-height: 25px;color: red;">
			<span style="font-size: 14px;">至商户：操作发至的商户。</span>
		</li>
		<li style="line-height: 25px;color: red;">
			<span style="font-size: 14px;">快递：物流快递信息数据。</span>
		</li>


	</ul>



<script type="text/javascript">

$(function(){
	$('#merchantId').searchableSelect();
});

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

</body>

</html>