<%
layout("/include/_container.html", {title:"列表", parent:"请假表单"}){
%>
    <!-- 文件上传 -->
    <div id="import-collapse" class="collapse white-box" style="position: relative; margin-bottom: 5px; display: none;">
        <a class="jp-ti-close" onclick="$('#import-collapse').fadeToggle()">
            <i class="icon iconfont icon-guanbi"></i>
        </a>
        <form id="importForm" method="POST" enctype="multipart/form-data" class="form form-horizontal clearfix">
            <div class="col-xs-12 col-sm-6">
                <input name="file" type="file" class="required jp-input">只允许导入&ldquo;xls&rdquo;或&ldquo;xlsx&rdquo;格式文件！<br>　

            </div>
            <div class="col-xs-12 col-sm-6">
                <a id="btnImportExcel" class="jp-btn jp-btn-primary"><i class="fa fa-upload"></i> 开始上传</a>
                <a id="btnDownloadTpl" class="jp-btn"><i class="fa fa-download"></i> 下载模板</a>
            </div>　
        </form>
    </div>
    <!-- 搜索框-->
    <div id="search-collapse" class="white-box collapse" style="position: relative; margin-bottom: 5px; display: none;">
        <a class="jp-ti-close" onclick="$('#search-collapse').fadeToggle()">
            <i class="icon iconfont icon-guanbi"></i>
        </a>
        <form id="searchForm" class="form form-horizontal clearfix">
			 <div class="col-xs-12 col-sm-6 col-md-4">
				<label class="label-item single-overflow pull-left" title="归属部门：">归属部门：</label>
				<#treeselect id="office" name="office.id"  labelName="office.name"
					title="部门" url="/sys/office/treeData?type=2" class="jp-input" allowClear="true" notAllowSelectParent="true"/>
			</div>
			 <div class="col-xs-12 col-sm-6 col-md-4">
				<label class="label-item single-overflow pull-left" title="员工：">员工：</label>
				<#userselect id="tuser" name="tuser.id"  labelName="tuser.name" labelValue=""
							    class="jp-input"/>
			</div>
			 <div class="col-xs-12 col-sm-6 col-md-4">
			     <div class="form-group">
					<label class="label-item single-overflow pull-left" title="归属区域：">归属区域：</label>
					<div class=" input-group col-xs-12">
						<input name="area"   data-toggle="city-picker"/>
					</div>
			     </div>
			</div>
			 <div class="col-xs-12 col-sm-6 col-md-4">
				<label class="label-item single-overflow pull-left" title="请假开始日期：">请假开始日期：</label>
				<div class="input-daterange input-group col-xs-12" id="beginDate">
					 <input type="text" class="jp-input" id="beginBeginDate" name="beginBeginDate" />
					 <span class="input-group-addon jp-btn-primary b-0 text-white">to</span>
					 <input type="text" class="jp-input" id="endBeginDate" name="endBeginDate" />
				</div>
			</div>
			 <div class="col-xs-12 col-sm-6 col-md-4">
				<label class="label-item single-overflow pull-left" title="请假结束日期：">请假结束日期：</label>
				<span class="jp-calendar-picker col-xs-12">
                    <input readonly=""  id="endDate" name="endDate"  placeholder="请选择日期" class="jp-calendar-picker-input jp-input"  >
                    <span class="jp-calendar-picker-icon"></span>
				</span>
			</div>
			 <div class="col-xs-12 col-sm-6 col-md-4">
				<label class="label-item single-overflow pull-left" title="备注信息：">备注信息：</label>
				<input name="remarks"  maxlength="257"  class=" jp-input"/>
			</div>
		<div class="col-xs-12 col-sm-6 col-md-4">
             <div style="margin-top:26px">
                 <a id="search" class="jp-btn jp-btn-primary"><i class="fa fa-search"></i> 查询</a>
                 <a id="reset" class="jp-btn"><i class="fa fa-refresh"></i> 重置</a>
            </div>
        </div>
        </form>
    </div>

	<div class="white-box">

	<!-- 工具栏 -->
	<div id="toolbar">
			 <% if(shiro.hasPermission("test:one:dialog:leaveForm1:add") ){ %>
			 	<button id="add" class="jp-btn jp-btn-primary" onclick="add()">
					<i class="glyphicon glyphicon-plus"></i> 新建
				</button>
			<% } %>
			 <% if(shiro.hasPermission("test:one:dialog:leaveForm1:edit") ){ %>
			    <button id="edit" class="jp-btn" disabled onclick="edit()">
	            	<i class="glyphicon glyphicon-edit"></i> 修改
	        	</button>
			<% } %>
			 <% if(shiro.hasPermission("test:one:dialog:leaveForm1:del") ){ %>
				<button id="remove" class="jp-btn jp-btn-danger" disabled onclick="del()">
	            	<i class="glyphicon glyphicon-remove"></i> 删除
	        	</button>
			<% } %>
			 <% if(shiro.hasPermission("test:one:dialog:leaveForm1:import") ){ %>
				<button id="import"  class="jp-btn" >
					<i class="icon iconfont icon-Import"></i> 导入
				</button>
			<% } %>
			 <% if(shiro.hasPermission("test:one:dialog:leaveForm1:export") ){ %>
	        	<button id="export" class="jp-btn">
					<i class="icon iconfont icon-export"></i> 导出
				</button>
			 <% } %>
		    </div>
		
	<!-- 表格 -->
	<table id="leaveForm1Table" class="table-bordered"   data-toolbar="#toolbar"></table>
	</div>

	<% include("leaveForm1List.js"){} %>
	<% } %>