<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/finance/balanceConsumeDetailList.html}" method="post">
	<ul class="seachform">
		<li>
			<label>日期</label>
			<input type="text" id="startMonth" name="startMonth" autocomplete="off"   onclick="WdatePicker({dateFmt:'yyyy-MM'})" th:value="${search.startMonth }" class="scinput date_width " placeholder="选择日期">
		</li>
		
		<li>
			<label>机构名称</label>
			<input type="text" id="unitName" name="unitName"   th:value="${search.unitName }" class="scinput " placeholder="输入商户/机构关键字">
		</li>
		
			<li>
				<input type="button" class="scbtn" value="查询" />
				<input type="button" id="button" class="scbtn" value="导出" />
			</li>
		
	</ul>
	</form>
	<table class="tablelist">
		<thead>
		    <tr>
				<th style="width: 50px;">序号</th>
				<th>签约帐号</th>
				<th>签约商户</th>
				<th style="color: red">非签约商户</th>
		    	<th>签约商户消耗</th>
		    	<th style="color: red">非签约商户消耗</th>
		    	<th>最低消费塾币</th>
		    	<th>服务：签约单价</th>
		    	
		    	<th>总消费塾币数量</th>
<!-- 		    	<th>硬件数量</th> -->
		    	<th>收入合计</th>
		    	<th>成本合计</th>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
					<td th:text="${itemStat.count}"></td>
					<td th:text="${item.get('pos_code')}"></td>
					<td th:text="${item.get('unit_name')}"></td>
					<td th:text="${item.get('external_unit_name')}"></td>
					<td th:text="${item.get('cons_count')}"></td>
					<td th:text="${item.get('external_cons_count')}"></td>
					<td th:text="${item.get('deduct_count')}"></td>
					<td th:text="${item.get('unit_price')}"></td>
					
					<td th:text="${item.get('port_count')}"></td>
<!-- 					<td th:text="${item.get('derver_count')}"></td> -->
					<td th:text="${item.get('unit_price_count')}"></td>
					<td th:text="${item.get('cost_count')}"></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: 12px;margin-top: 30px">
		<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;">成本合计=总消费塾币数量*20元+硬件数量*10元。</span> -->
<!-- 		</li> -->
		<li style="line-height: 25px;color: red;">
			<span style="font-size: 14px;">成本合计=总消费塾币数量*20元</span>
		</li>
	</ul>
	
	
<ul style="margin-bottom: 100px;margin-top:10px;margin-left: 10px;">
	<li style="line-height: 25px;">
		<span style="font-size: 14px;">结算逻辑讲述</span>
	</li>
	<li style="line-height: 25px;color: red;">
		旧商户模式以充值塾币为基础，消费塾币数量。旧商户"签约端口数量"确定此商户的低消人数，"下个结算日"当天0点时会进行系统自动结算，从下至上直行结算扣币，如前商户"签约端口数量"大于当前商户塾币数量，则会扣清所有塾币，不足部分向上级扣除，如上级也不足，则继续向上级扣除，直到足额扣除为止。
	</li>	
</ul>
	
		
</div>
</body>
<script type="text/javascript">
	$("#button").on('click',function(){
		document.getElementById("seachform").action = "[[${sysUrl}]]/sys/finance/export5";
		$("#seachform").submit();
		window.setTimeout(function(){
			document.getElementById("seachform").action = "[[${sysUrl}]]/sys/finance/balanceConsumeDetailList.html";
		},3000);
	});
</script>


</html>