<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>
<script src="sys/js/jquery.searchableSelect.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/deviceInList.html}" method="post">
	<ul class="seachform">
		<li>
			<label>供应商</label>
			<select class="scinput select_width"  name="fromMerchantId" id="fromMerchantId"   style="width: 150px;" >
				<option value="">全部</option>
				<option th:each="item:${poslist}" th:if="${item.orgCode !='SSJ-FX'}" th:selected="${search.get('fromMerchantId') eq item.id}" th:value="${item.id}">[[${item.unitName}]]</option>
			</select>
		</li>
		<li>
			<label>收货商</label>
			<select class="scinput select_width"  name="merchantId" id="merchantId"   style="width: 150px;" >
				<option value="">全部</option>
				<option th:each="item:${poslist}" th:if="${item.orgCode !='SSJ-FX'}" th:selected="${search.get('merchantId') eq item.id}" th:value="${item.id}">[[${item.unitName}]]</option>
			</select>
		</li>

		<li>
			<label>开始月份</label>
			<input type="text" id="startMonth" name="startMonth" autocomplete="off"   onclick=" WdatePicker({ dateFmt: 'yyyy-MM', isShowToday: false, isShowClear: false });" 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', isShowToday: false, isShowClear: false });" th:value="${search.endMonth }" class="scinput date_width " 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>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
					<td th:text="${item.get('time')}"></td>
					<td th:text="${item.get('unit_name2')}"></td>
					<td th:text="${item.get('unit_name')}"></td>
				<td th:text="${item.get('content')}"></td>
					<td th:text="${item.get('counta')}"></td>
					<td th:text="${item.get('countb')}"></td>
					<td th:text="${item.get('lefts')}"></td>
					<td th:text="${item.get('total_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>
   	
   	
   	<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>
		<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>
   	
   	

</div>
</body>
<script type="text/javascript">
	$("#button").on('click',function(){
		document.getElementById("seachform").action = "[[${sysUrl}]]/sys/fx/exportDeviceInAndOut?type=1";
		$("#seachform").submit();
		document.getElementById("seachform").action = "[[${sysUrl}]]/sys/fx/deviceInList.html";
	});
	$(function(){
		$('select').searchableSelect();
	});
</script>


</html>