<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="/favicon.ico">
<LINK rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/skin/default/skin.css" rel="stylesheet" type="text/css" id="skin" />
<link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/style.css" rel="stylesheet" type="text/css" />

<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>机器信息列表</title>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
		商品管理 <span class="c-gray en">&gt;</span> 机器信息列表 <a
			class="btn btn-success radius r mr-20"
			style="line-height: 1.6em; margin-top: 3px"
			href="javascript:location.replace(location.href);" title="刷新"><i  
			class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="pd-20">
	<form action="${pageContext.request.contextPath }/admin/rent/machineInfoList" method="post">
<%-- 			<input name="goodsInfoGoodname" id="goodsInfoGoodname" value="${Goodname }" placeholder="商品名称/商品简介" style="width: 300px" class="input-text" type="text"> --%>
			剩余时间:
			<span class="select-box" style="width:180px;">
				<select class="select" name="stopDate" size="1">
					<option value="0"  >请选择</option>
					<option value="1"  ${stopDate==1?'selected':''}>1-10天</option>
					<option value="2"  ${stopDate==2?'selected':''}>10-30天</option>
					<option value="3"  ${stopDate==3?'selected':''}>1-3个月</option>
					<option value="4"  ${stopDate==4?'selected':''}>3-6个月</option>
					<option value="5"  ${stopDate==5?'selected':''}>6-12个月</option>
				</select>
			</span>
			剩余水量:
			<span class="select-box" style="width:180px;">
			<select class="select" name="initState" size="1">
					<option value="0"  >请选择</option>
					<option value="1"  ${initState==1?'selected':''}>1-500升</option>
					<option value="2"  ${initState==2?'selected':''}>500-1000升</option>
					<option value="3"  ${initState==3?'selected':''}>1000-1500升</option>
					<option value="4"  ${initState==4?'selected':''}>1500-2000升</option>
					<option value="5"  ${initState==5?'selected':''}>2000-2500升</option>
				</select>
			</span>
			设备ID:	<input  id="machineDeviceId" value="${machineDeviceId }" name="machineDeviceId" class="input-text" style="width: 120px;" type="text">
			Mac:<input  id="machineMac" value="${machineMac }" name="machineMac" class="input-text" style="width: 120px;" type="text">
			<span class="select-box" style="width:180px;">
				<select class="select" name="machineInitState" size="1">
					<option value="" >激活状态</option>
					<option value="1"  ${machineInitState==1?'selected':''}>已激活</option>
					<option value="2"  ${machineInitState==2?'selected':''}>未激活</option>
				</select>
			</span>
			<button name="" id="submitBtn"  class="btn btn-success" type="submit">
				<i class="Hui-iconfont"></i> 搜索
			</button>
		</form>
	<form id="agentMachineform" >
		<table class="table table-border table-bordered table-bg">
			<thead>
				<tr>
					<th scope="col" colspan="9">机器信息列表</th>
				</tr>
				<tr class="text-c">
					<th width="150">订单号</th>
					<th width="90">机器所属人</th>
					<th width="90">设备id</th>
					<!-- <th width="90">机器二维码</th> -->
					<th width="100">机器mac</th>
					<th width="100">剩余水量</th>
					<th width="100">TDS</th>
					<th width="100">水量更新时间</th>
					<th width="100">到期时间</th>
					<!-- <th width="100">机器下一条指令</th> -->
					<th width="100">机器连接状态</th>
					<th width="100">激活状态</th>
					<th width="100">机器状态</th>
					<th width="100">激活机器码</th>
					<th width="100">创建时间</th>
				</tr>
			</thead>
			<tbody>
				<c:if test="${! (empty machineInfoList) }">
					<c:forEach items="${machineInfoList }" var="infolist">
						<tr class="text-c">
							<td>${infolist.machineOrderId}</td>
							<td class="nick-name-td">${infolist.machineOpenid}</td>
							<td>${infolist.machineDeviceId}</td>
							<%-- <td>${infolist.machineQrcode }</td> --%>
							<td>${infolist.machineMac}</td>
							<td>${infolist.machineSurplusWater}</td>
							<td>${infolist.machineTDS}</td>
							<td><fmt:formatDate value="${infolist.machineUpdateTime}" pattern="YYYY-MM-dd HH:mm" /></td>
							<td><fmt:formatDate value="${infolist.machineStopDate}" pattern="YYYY-MM-dd HH:mm" /></td>
							<%-- <td>${infolist.machineNextCommand}</td> --%>
							<td>${infolist.machineConnectState==1?'已连接':'未连接'}</td>
							<td>${infolist.machineInitState==1?'已激活':'未激活'}</td>
							<td>${infolist.machineState==1?'正常使用':'停止使用'}</td>
							<td>${infolist.machineInitCode}</td>
							<td><fmt:formatDate value="${infolist.machineCreateTime}" pattern="YYYY-MM-dd HH:mm" /></td>
							
					</c:forEach>
				</c:if>
			</tbody>
		</table>
		<div align="right" class="mt-10 mb-10 mr-10">
			<%@include file="/common/other/paper/pager.jsp"%>
  		</div>
  		</form>
	</div>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script> 
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script> 
	<script type="text/javascript">
	/* $(document).ready(function(){
		$('#beginDate').datepicker();//时间控件
        $('#endDate').datepicker();
	}); */
    $(function() {
        var $td = $(".nick-name-td");
        if ($td.length > 0) {
            for (var i = 0; i < $td.length; i++) {
                var t = decodeURI($($td[i]).text());
                $($td[i]).text(t);
            }
        }
    });
</script>
</body>
</html>