<!-- include 'header' -->
<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">
					<ul>
						<!-- include 'admin_menu' -->
					</ul>
				</div>
			</div>
			<div class="adminContent autoHeight">
			    <form name="userinfo" action="/adduser" method="post">
		            <legend>添加新员工</legend>
				    <div class="control-group">
		              <label class="control-label">员工名称</label>
		              <div class="controls">
		                <input type="text" name="username">
		              </div>
		            </div>
				    <div class="control-group">
		              <label class="control-label">密码</label>
		              <div class="controls">
		                <input type="password" name="password"  value="">
		              </div>
		            </div>
				    <div class="control-group">
		              <label class="control-label">所在办事处</label>
		              <div class="controls">
		                <select name="cid">
		                <!-- loop category -->
		                <option value="{{category' value.cid}}">{{category' value.title}}</option>
		                <!-- endloop -->
		                </select>
		              </div>
		            </div>
		            
		            <div class="control-group">
		              <label class="control-label">省份权限</label>
		              <div class="controls">
		                <p class="cGroup">
							<!-- loop districtList -->
					    	<label class="checkbox inline">
							  <input type="checkbox" name="didKey[]" value="{{districtList' value.didKey}}"> {{districtList' value.name}}
							</label>
							<!-- endloop -->
				  
								    </p>
								    
		              </div>
		            </div>
		            
					<div class="control-group">
						<label class="control-label">入职时间</label>
						<div class="controls">
							<input type="date" name="hiredate">
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">员工性质</label>
						<div class="controls">
							<select name="nature">
								<option value="1" selected>正式员工</option>
								<option value="2">实习生</option>
							</select>
						</div>
					</div>
				    <input type="submit" class="button" value="添加新员工"></input>
			    </form>
			    <table class="table table-striped">
              <thead>
                <tr>
                  <th>#</th>
                  <th width="60">员工名称</th>
                  <th>所在办事处</th>
                  <th>省份权限</th>
                  
                  
                  <th>手机</th>
                  <th width="120">APP登录</th>
				  <th width="90">入职时间</th>
                  <th width="80">操作</th>
                </tr>
              </thead>
              <tbody>
              <!-- loop stafflist -->
                <tr>
                  <td>{{staff' value.sid}}</td>
                  <td>{{staff' value.username}}<!-- if {{staff' value.nature}} == 2 -->（实习）<!-- endif --></td>
                  <td>{{staff' value.category}},{{staff' value.othercategory}}</td>
                  
                  <td>
                  <!-- loop stafflist' value.idDistrictList -->
                  	{{stafflist' value' value.name}}&nbsp;
                  
                  
                  <!-- endloop -->
                  </td>
                  
                  <td>{{staff' value.telephone}}</td>
                  <td>{{staff' value.appDate}}</td>
                  <td>{{staff' value.hiredate}}</td>
                  <td><a href="/edi/user/{{staff' value.sid}}">编辑</a>/<a href="javascript:linkok('/delete/user/{{staff' value.sid}}')">删除</a></td>
                </tr>
                <!-- endloop -->
              </tbody>
            </table>
			</div>
		</div>
	</div>
	
	
	
	
	
	<script language="javascript">
    <!--
    function linkok(url){
    question = confirm("你确认要删除吗？");
    if (question){
    window.location.href = url;
    }
    }
    //-->
    </script>
<script type="text/javascript">autoFlashHeight();</script>	
</body>