<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8"
	contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="<c:url value='/scripts/lib/layui/layui.css'/>" rel="stylesheet" type="text/css" />
	<link href="<c:url value='/styles/vehicleClean/home.css'/>" rel="stylesheet" type="text/css" />
	<link href="<c:url value='/styles/deptList.css'/>" 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 src="${ctx }/scripts/lib/jquery-1.8.2.min.js"></script>

</head>

<body>
	<input type="hidden" value="${virAccountInfo}" id="virAccountInfo">
	<input type="hidden" value="${ctx}" id="contextPath">
	<%-- 如果isAdmin为true,该用户为admin,对应多个项目,页面展示项目搜索框 --%>
	<input type="hidden" id="isAdmin" value="${isAdmin}">

	<%-- 如果isAdmin为false,该用户为项目管理员,对应一个项目,页面隐藏项目搜索框,后台返回该项目对象 --%>
	<input type="hidden" id="org" value="${org}">

	<div class="content">
		<div class="layui-tab layui-tab-card">
			<div class="form_content">
				<div class="layui-form-item" id="conditionform">
					<c:if test="${isAdmin == true}">
						<div class="layui-inline">
							<label class="layui-form-label txt_brown fs14">项目</label>
							<div class="layui-input-inline">
								<input class="default-select orgId layui-input" name="orgId" id="orgId" autocomplete="off" placeholder="请选择项目" />
								<span class="select_wrap _hide"></span>
							</div>
						</div>
					</c:if>
					<c:if test="${!isAdmin}">
						<c:if test="${fn:length(virAccountInfo) == 0}">
							<input class="default-select orgId single-orgid" type="hidden" id="orgId" name="orgId" value="${org.name}" org__id="${org.id}">
						</c:if>
						<c:if test="${not empty virAccountInfo}">
							<div class="layui-inline">
								<label class="layui-form-label txt_brown fs14">项目</label>
								<div class="layui-input-inline">
									<input class="default-select orgId layui-input single-orgid" disabled id="orgId" name="orgId" value="${org.name}" org__id="${org.id}">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label txt_brown fs14">公司名称</label>
								<div class="layui-input-inline">
									<input class="default-select company-id layui-input" disabled name="companyId" id="companyId" autocomplete="off" placeholder="请选择企业" value="${virAccountInfo.virName}" com__id="${virAccountInfo.virId}"/>
								</div>
							</div>	
						</c:if>
					</c:if>
					<c:if test="${fn:length(virAccountInfo) == 0}">
						<div class="layui-inline">
							<label class="layui-form-label txt_brown fs14">公司名称</label>							
								<div class="layui-input-inline">
									<input class="default-select company-id layui-input" name="companyId" id="companyId" autocomplete="off" placeholder="请选择企业" />
									<span class="select_wrap _hide"></span>
								</div>						
						</div>
					</c:if>
					<div class="layui-inline">
						<label class="layui-form-label txt_brown fs14">部门</label>
						<div class="layui-input-inline">
							<input class="default-select apart-id layui-input" name="apartId" id="apartId" autocomplete="off" placeholder="请选择部门" />
							<span class="select_wrap _hide"></span>
						</div>
					</div>
					<div class="layui-inline changeBtn">
						<button class="bl_yellow fs16 search-btn">查询</button>
						<button class="bt_blue fs16 set-btn">重置</button>
					</div>
				</div>
				<div class="btnList">
					<button class="bt_blue btn1 add-ele-btn">+新增</button>
					<c:if test="${fn:length(virAccountInfo) == 0}">
						<c:if test="${isAdmin == true}">
							<button class="btn-export-white export-wp export-btn" type="button">导入 </button>
						</c:if>
						<c:if test="${!isAdmin}">
							<button class="btn-export-white export-wp export-wp-no" type="button">导入
						</c:if>
						<button class="bt_blue_big" id="importTemplate">下载模板</button>
					</c:if>
				</div>
				<div class="tables">
					<table class="layui-hide" id="LAY_table_user" lay-filter="user"></table>
				</div>
			</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/cjqt.js?2019-1-15'/>"></script>
	<script type="text/javascript" src="<c:url value='/scripts/admin/deptList.js?2019-3-22'/>"></script>

</body>

</html>