<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> 
</head>
<style>
	.tablelink{margin-right:10px;}
	.stylecss{
	      color: red;
	}
	.select_width{
	     width: 70px;
	}
	.date_width{
	     width: 100px;
	}
</style>
<body>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li><a href="#">后台系统管理</a></li>
		<li><a th:href="@{/sys/problem/viplist.html}">旧卡选择</a></li>
	</ul>
</div>
<div class="rightinfo">
	<form id="seachform" th:action="@{/sys/problem/viplist.html}" method="post">
	<ul class="seachform">
		  <li>
			<label>孩子姓名</label>
			<input name="child_name" type="text" class="scinput" th:value="${search.get('child_name')} == null  ? '': ${search.get('child_name')}"/>
		</li>
		<li>
			<label>卡号</label>
			<input name="flow_id" type="text" class="scinput" th:value="${search.get('flow_id')} == null  ? '': ${search.get('flow_id')}"/>
		</li>
		<li>
			<label>&nbsp;</label>
			<input type="button" class="scbtn" value="查询" />
		</li>
	</ul>
	</form>
	<table class="tablelist">
		<thead>
		    <tr>
		    <th style="width: 50px;">序号</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="${itemStat.count}" ></td>
					<td th:text="${item.get('parent_name')}"></td>
					<td th:text="${item.get('child_name')}"></td>
					<td th:text="${item.get('flow_id')}"></td>
					<td th:text="${#calendars.format(item.get('activate_time'),'yyyy-MM-dd HH:mm:ss')}" ></td>
					<td  class="imgtd">
							<img  th:if="${item.get('img_url') !=null && item.get('img_url') !='' }" th:src="${imgUrl}+''+${item.get('img_url')}" style="width: 50px;height: 50px;" />
					</td>
					<td  class="imgtd">
							<img  th:if="${item.get('qrcode_url') !=null && item.get('qrcode_url') !='' }" th:src="${imgUrl}+''+${item.get('qrcode_url')}" style="width: 50px;height: 50px;" />
					</td>
					<td>
					   <a href="javascript:;" style="text-align:center;color: red; margin-right: 10px;" th:onclick="'updateVip(\''+${item.get('id')}+'\');'">更换会员卡</a>
					</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">
function updateVip(id){
	layer.open({
	    type: 2,
	    title: "更换会员卡",
	    closeBtn: 1, //不显示关闭按钮
	    shift: 0.8,
	    //offset: '100px',
	      area: ['80%', '90%'],
	    content: '[[${sysUrl}]]/sys/problem/updateviplist.html?ids='+id
	});
}
</script>
</html>