<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/usercenter/conchList}">小塾列表</a></li>
	</ul>
</div>
<div class="rightinfo">
	<form id="seachform" th:action="@{/sys/usercenter/conchList}" method="post">
		<ul class="seachform">
				<li>
					<label>设备号/IMEI：</label>
					<input name="LIKE_value" type="text" class="scinput" th:value="${search.get('LIKE_value')}"/>
				</li>
				<li>
					<label>使用类型：</label>
					<select class="scinput select_width"  name="use_type" th:switch="${search.get('use_type')}" >
						<option value=""  th:selected="${ search.get('use_type') eq '' }"  >全部</option>
						<option value="1" th:selected="${ search.get('use_type') eq '1' }"  >正式机</option>
						<option value="2" th:selected="${ search.get('use_type') eq '2' }" >试用机</option>
						<option value="3" th:selected="${ search.get('use_type') eq '3' }" >优惠机</option>
					</select>
				</li>
				<li>
					<label>&nbsp;</label>
					<input type="button" class="scbtn" value="查询" />
				</li>
		</ul>
	</form>
	<table class="tablelist">
		<thead>
		<tr>
			<th>设备号</th>
			<th>版本号</th>
			<th>版本类型</th>
			<th>IMEI</th>
			<!--<th>使用者</th>
			<th>使用者家长</th>-->
			<th>使用类型</th>
			<!--<th>试用天数</th>-->
			<th>操作</th>
		</tr>
		</thead>
		<tbody>
		<tr th:each="item:${list}" >
			<td th:text="${item.derver}" ></td>
			<td th:text="${item.version}" ></td>
			<td th:text="${item.version_type}" ></td>
			<td th:text="${item.imei}" ></td>
			<!--<td th:text="${item.child_name}" ></td>
			<td th:text="${item.parent_name}" ></td>-->
			<td th:switch="${item.use_type}">
				<a href="javascript:;" th:case="1">正式机</a>
				<a href="javascript:;" th:case="2">试用机</a>
				<a href="javascript:;" th:case="3" th:text="${item.is_give_invalid == 1 ? '优惠机（不可赠送）' : '优惠机（可赠送）'}">优惠机</a>
			</td>
			<!--<td th:text="${item.use_days}" ></td>-->
			<td>
				<a href="javascript:;" th:onclick="'save(\''+${item.id}+'\')'" class="tablelink">修改</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 save(id){
		layer.open({
			type: 2,
			title: '编辑设备',
			closeBtn: 1, //不显示关闭按钮
			shift: 0.8,
			//offset: '100px',
			area: ['50%', '90%'],
			content: '[[${sysUrl}]]/sys/usercenter/conchEdit.html?id='+id
		});
	}
</script>
</html>