<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>楼层房间号配置</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>

<!-- Theme style -->
<link href="<c:url value='/scripts/lib/layui/layui.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/styles/AdminLTE.css?2019-1-3'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/styles/manage/roomSetting.css?2019-1-3'/>" rel="stylesheet" type="text/css" /> 
<script type="text/javascript" src="<c:url value='/scripts/lib/jquery-1.8.2.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/scripts/lib/layui/layui.js'/>"></script>
<script type="text/javascript" src="<c:url value='/scripts/lib/template-native.js'/>"></script>
<script type="text/javascript" src="<c:url value='/scripts/admin/cjqt.js'/>"></script>
</head>
<body>

	<div class="bread-wp">
		系统管理  >  楼层房间号配置
	</div>
	<form:form style="display:none" id="conditionform" action="${ctx}/admin/floor/getFloorAndRoomList" method="POST"></form:form>
	<input type="hidden" value="${ctx}" id="contextPath">

	<%-- 因为js中无法直接调用自定义的权限校验标签 --%>
	<%-- 判断当前用户是否有相应权限,如果有权限则在JSP页面新增隐藏input标签,方便js代码调用 --%>

	<%-- 是否有修改权限 --%>
	<perm:hasPermission permCode="pc:organization:floor:edit">
		<input type="hidden" value="1" id="perm-edit" />
	</perm:hasPermission>
	<%-- 是否有删除权限 --%>
	<perm:hasPermission permCode="pc:organization:floor:delete">
		<input type="hidden" value="1" id="perm-delete" />
	</perm:hasPermission>

	<div class="right-content">

		<div class="main-content-mode-wp">
			<form:form  id="conditionform"  class="clearfloat">

				<c:if test="${fn:length(orgs) > 1}">
					<div class="part-wp">
						<span class="search-tips">请选择校区</span>
						<input class="default-select orgId" name="orgId" id="orgId" org__id="${orgs[0].id}" value="${orgs[0].name}" autocomplete="off" />
		              	<span class="select_wrap _hide"></span>
<!-- 						<select class="orgId default-select" id="orgId" name="orgId" >

						</select> -->
					</div>
				</c:if>
				<c:if test="${fn:length(orgs) == 1}">
					<input type="hidden" name="orgId" class="orgIds" value="${orgs[0].id}" org__id="${orgs[0].id}">
				</c:if>
				<div class="part-wp" style="margin-left: 10px;">
					<span class="search-tips">选择楼宇</span>
					<select id ="buildId" class="default-select" style="width:300px">
						<c:forEach items="${buildList }" var="buildList">
							<option value="${buildList.id }">${buildList.name }</option>
						</c:forEach>
					</select>
				</div>
				<button class="search-btn btn-red" type="button">查询</button>
			</form:form>
			<perm:hasPermission permCode="pc:organization:floor:add">
				<button class="btn-red add-floors-btn">添加楼层</button>
			</perm:hasPermission>
			<table class="layui-hide" id="LAY_table_user" lay-filter="user"></table> 
			<%-- <div class="table-wrapper">
				<table class="table table-hover">
					<thead>
						<tr>
							<th>
								<div class="floor-name">楼层</div>
							</th>
							<th>
								<div class="floor-list">房间号</div>
							</th>
							<th>
								<div class="floors-operate">操作</div>
							</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${floorAndRoomList}" var="item">
							 <tr>
								<td class="td-change-floor">
									<div class="floor-name">
										<span class="floor-name-span" data-floorid = "${item.floorId}" data-floornum = "${fn:length(item.roomList)}" >${item.floorName}</span>
										<input class="floor-name-text" type="text"  data-floorid = "${item.floorId}" data-floornum = "${fn:length(item.roomList)}" value="${item.floorName}"/>楼
									</div>
								</td>
								<td class="floors" >
									<c:forEach items="${item.roomList}" var="room">
										<span class="num">${room}</span> 
										<span class="num">${room.roomName}</span>  
									</c:forEach>		
								</td>
								<td>
									<div class="floors-operate">
										<span class="edit-btn" data-floorid = "${item.floorId}">编辑</span>
										<span class="del-btn" data-floorid = "${item.floorId}">删除</span>
									</div>
									
								</td>
							</tr>
						</c:forEach>	
						<tr class="add-btn">
								<td class="add-line">添加</td>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
							</tr>
					</tbody>
				</table>
			</div>			 --%>	
		</div>
	</div>
	
	<script type="text/html" id="indexTpl">
    {{d.LAY_TABLE_INDEX+1}}
</script>
<script type="text/javascript" src="<c:url value='/scripts/admin/manage/roomSetting.js?2019-3-3'/>"></script>

</body>
</html>