<!-- include '../header' -->
<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>/js/humanResource.js"></script>
<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/jquery.validator.css"> 
<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/jquery.validator.min.js"></script>
<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/zh-CN.js"></script>
<script src="<?= WEB_SITE_GLOBAL ?>js/hr.validator.js"></script>
<body>
	<div class="mainLayout">
		<div class="mainMenu">
			<div class="menuItem">
				<a href="#" class="mLogo">CLD</a>
				<ul>
					<!-- include '../menu' -->
				</ul>
			</div>
			
		</div>
		<div class="warpContent">
			<div class="subMenu fL">
				<div class="menuItem">
					<!-- include 'hrMenu' -->
				</div>
			</div>
			<div class="adminContent autoHeight">
				<legend>员工列表</legend>
				<div class="demandCate">
				
				<form action="/hrEmployeeApprovalsSetting" id="hrEmployee" method="get" >
					<ul class="cateList">
						<li>
							<select name="pendStatus" node-pendStatus  class="select">
								<option <!-- if {{pendStatus}} == 'OTJOB'  --> selected <!-- endif --> value="OTJOB">在职</option>
								<option <!-- if {{pendStatus}} == 'LVJOB'  --> selected <!-- endif --> value="LVJOB" >离职</option>
								<option <!-- if {{pendStatus}} == 'ALL'  --> selected <!-- endif --> value="ALL" >全部</option>
							</select>
						</li>
						<li>
							<select name="nature" node-nature class="select">
								<option <!-- if {{nature}} == 'ALL'  --> selected <!-- endif --> value="ALL">全部</option>
								<option <!-- if {{nature}} == 'FORMAL'  --> selected <!-- endif --> value="FORMAL">正式</option>
								<option <!-- if {{nature}} == 'TRIAL'  --> selected <!-- endif --> value="TRIAL">试用</option>
								<option <!-- if {{nature}} == 'PRACTICE'  --> selected <!-- endif --> value="PRACTICE">实习</option>
							</select>
						</li>
						<li>
							<select name='cid_did'  node-cid_did class="select">
								<option <!-- if 'ALL' == {{cid_did}}  --> selected <!-- endif --> value="ALL">所有组织</option>
								<!-- loop categoryList -->
								<option <!-- if {{categoryList' value.cidKey}}.'_'.{{categoryList' value.didKey}} == {{cid_did}}  --> selected <!-- endif -->  value="{{categoryList' value.cidKey}}_<!-- if !empty({{categoryList' value.did}}) -->{{categoryList' value.didKey}}<!-- endif -->">{{categoryList' value.title}}<!-- if !empty({{categoryList' value.did}}) -->/{{categoryList' value.departmentName}}<!-- endif --></option>
								<!-- endloop -->
							</select>
						</li>
						<li>
							<div class="search">
								<div class="input-append">
									<input class="span3" name="MebSea" value='{{MebSea}}' placeholder="姓名、工号" type="text" style="width:100px">
									<button class="btn btn-small" node-irmmebsea="" type="submit">搜索</button>
								</div>
							</div>
						</li>
						<li>
							本月({{monthstart}}-{{monthend}})：在职{{onJobCount}}&nbsp;入职&nbsp;<a href="#">{{inJobCount}}</a>&nbsp;离职&nbsp;<a>{{leaveJobCount}}</a>
						</li>
						<li>
							<label class="checkbox"><input type="checkbox" checked node-employeeInfo> 设置权限</label>
						</li>
						
	  			</ul>
	  			</form>
	  			
	  		</div>
	  		
				<div class="saeaList" >
				
				
				
				
				<!--权限-->
					<table class="table table-hover">
						<tbody>
						<tr class="thead"><th width="80">工号</th><th>姓名</th><th>手机</th><th>QQ</th><th>办事处/部门</th><th>岗位</th><th>聘用状态</th><th>入职时间</th><th>主权限</th><th>通讯录权限</th></tr>
						<!-- loop stafflist -->
						<tr>
						<td>{{stafflist' value.jobNumber}}</td>
						<td><a href="#employeeInfo" node-employeeInfo node-sidKey="{{staffList' value.sidKey}}" data-toggle="modal">{{stafflist' value.username}}</a></td>
						<td>{{stafflist' value.telephone}}</td>
						<td>{{stafflist' value.qq}}</td>
						<td>{{stafflist' value.category}}
						<!-- if {{stafflist' value.departmentID}}!=0  -->
						/{{stafflist' value.departmentName.departmentName}}
						<!-- endif -->
						</td>
						<td>{{stafflist' value.position}}</td>
						<td>
							
							<!-- if {{stafflist' value.nature}}==1 -->
							正式
							<!-- elseif {{stafflist' value.nature}}==2 -->
							实习
							<!-- elseif {{stafflist' value.nature}}==3 -->
							试用
							<!-- elseif {{stafflist' value.nature}}==4 -->
							离职
							<!-- endif -->
							
						</td>
						<td>{{stafflist' value.hiredate}}</td>
						<td>
						
						{{forMatAccess(stafflist' value.cldAccessArray)}}
						
						<a href="#authority" employee-access node-sidKey="{{staffList' value.sidKey}}" select-data='{{staffList' value.cldAccess}}' data-toggle="modal">编辑</a></td>
						<td>{{countArray(stafflist' value.didArray)}} 个省份 <a href="#province" employee-district node-sidKey="{{staffList' value.sidKey}}"  data-toggle="modal">编辑</a></td>
						</tr>
						<!-- endloop -->
						
						</tbody>
					</table>
				
				
				
				
					
					
				</div>
				
			</div>
		</div>
	</div>
	<!--弹出（更新员工信息）-->
	<div class="modal hide fade" id="employeeInfo">
	<form method="post" action="/staffUpdate" id="staffUpdate">
	<input type="hidden" name="sidKey" id='sidKey'  value="">
	<input type="hidden" name="employeeInfo"   value="employeeInfo">
		<div class="modal-dialog modal-xlg">
			<div class="modal-content">
			<div id='EMPLOYEENC'>
			</div>
			
			<div class="modal-footer">
				<input type="submit" class="button" value="确定更新">
				<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
			</div>
			
			</div>
		</div>
		</form>
	</div>
	
	
	
	
	
	<!--弹出（设置主权限）-->
	<div class="modal hide fade" id="authority">
	<form  action="/hrEmployeeAccess" method="post" id="staffAccess" >
		<input type="hidden" name="sidKey" id='sidKeyAccess'  value="">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h3>设置主权限</h3>
				</div>
				<div class="modal-body saeaList">
					<label class="checkbox inline"><input name='access[]' id='Access_INFORMATION' value='INFORMATION' type="checkbox"> 信息中心</label>
					<label class="checkbox inline"><input name='access[]' id='Access_DIRECTORIES' value='DIRECTORIES' type="checkbox"> 通讯录</label>
					<label class="checkbox inline"><input name='access[]' id='Access_LOCK' value='LOCK' type="checkbox"> 在线锁库</label>
					<label class="checkbox inline"><input name='access[]' id='Access_RECEIPTS' value='RECEIPTS' type="checkbox"> 报销单</label>
					<label class="checkbox inline"><input name='access[]' id='Access_INVOICE' value='INVOICE' type="checkbox"> 发票申请</label>
					<label class="checkbox inline"><input name='access[]' id='Access_HR' value='HR' type="checkbox"> 人资管理 </label>
					<label class="checkbox inline"><input name='access[]' id='Access_BUILD' value='BUILD' type="checkbox"> 建筑计价 </label>
				</div>
				<div class="modal-footer">
					<input type="submit" class="button" value="确定">
					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
				</div>
			</div>
		</div>
		</form>
	</div>
	
	<!--弹出（设置主权限）-->
	<div class="modal hide fade" id="province">
	<form name="userDistrict" action="/addUserDistrictAuthor" method="post">
<input type="hidden" name="sidKey" id='sidKeyDistrict' value="{{staffInfo.0.sidKey}}">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h3>设置通讯录 权限</h3>
				</div>
				
					 
				<div class="modal-body saeaList" id='StaffDistrictHtml'>
				
				
				
				<!-- loop districtList -->
			    	<label class="checkbox inline">
					  <input type="checkbox" name="didKey[]" value="{{districtList' value.didKey}}"> {{districtList' value.name}}
					</label>
				<!-- endloop -->
				
					
				</div>
				<div class="modal-footer">
					<input type="submit" class="button" value="确定">
					
					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
				</div>
			</div>
		</div>
		</form>
	</div>
<script type="text/javascript">autoFlashHeight();</script>
</body>
