<!--{include file="<!--{$oapath}-->public/ins_page.tpl"}-->
<block name="content">
	<div class="page-header clearfix">
	<h1 class="col-sm-8">考勤统计</h1>
	<div class="col-sm-4 search_box">
		<form name="form_search" id="form_search" method="post" class="pull-right">
			<div class="input-group col-20">
				<input class="form-control" type="text" name="keyword" id="keyword" value='<!--{$search.keyword}-->' placeholder="请输入姓名">
				<div class="input-group-btn">
					<a class="btn btn-sm btn-info" onclick="submit_search();"><i class="fa fa-search"></i></a>
					<a class="btn btn-sm btn-success" onclick="toggle_adv_search();"><i id="toggle_adv_search_icon" class="fa fa-chevron-down bigger-125"></i></a>
				</div>
			</div>
		</form>
	</div>
</div>
	<form method="post" name="form_adv_search" id="form_adv_search">
		<div class="adv_search panel panel-default  hidden"  id="adv_search">
			<div class="panel-heading">
				<div class="row">
					<h4 class="col-xs-6">高级搜索</h4>
					<div class="col-xs-6 text-right">
						<a  class="btn btn-sm btn-info" onclick="submit_adv_search();">搜索</a>
						<a  class="btn btn-sm " onclick="close_adv_search();">关闭</a>
					</div>
				</div>
			</div>
			<div class="panel-body">
				
					<!--<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label" for="eq_dept_id">部门：</label>
						<div class="col-sm-8">
							<select class="form-control" name="eq_dept_id">
								<option value="">选择部门</option>
                                                                <!--{$menu}-->
							</select>
						</div>
					</div>-->

				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="be_create_time">选择时间段：</label>
					<div class="col-sm-8">
						<div class="input-daterange input-group" >
							<input type="text" class="input-sm form-control text-center" name="be_create_time" readonly="readonly" value='<!--{$search.be_create_time}-->' placeholder="起始时间"/>
							<span class="input-group-addon">-</span>
							<input type="text" class="input-sm form-control text-center" name="en_create_time" readonly="readonly" value='<!--{$search.en_create_time}-->' placeholder="截止时间"/>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
	
	
	<div class="ul_table ul_table_responsive">
		<ul>
			<li class="thead">
				<div class="pull-left">
					<span class="col-12">部门</span>
                                        <span class="col-12">姓名</span>
                                        <span class="col-12">职位</span>
                                        <span class="col-20">迟到次数</span>
                                        <span class="col-20">早退次数</span>
                                        <span class="col-20">正常次数</span>

				</div>
				
			</li>
			<!--{if empty($list)}-->
				<li class="no-data">
					没找到数据
				</li>
				<!--{else}-->
				<!--{foreach $list as  $key=>$vo}-->
					<li class="tbody">
						<div class="pull-left">
							<span class="col-12"><!--{$vo.dept_name}-->&nbsp;</span>
                                                        <span class="col-12 "><!--{$vo.name}-->&nbsp;</span>
                                                        <span class="col-12 "><!--{$vo.position_name}-->&nbsp;</span>
                                                        <span class="col-20"><!--{$vo.late}-->&nbsp;</span>
                                                        <span class="col-20"><!--{$vo.leave}-->&nbsp;</span>
                                                        <span class="col-20"><!--{$vo.normal}-->&nbsp;</span>
						</div>
					
					</li>
				 <!--{/foreach}-->
				<div class="pagination">
					<!--{$showpage}-->
				</div>
			<!--{/if}-->
		</ul>
	</div>
</block>

					
				</div>
			</div>
		</div>
		<!--<iframe src="{:U('push/client')}" class="push" id="push"></iframe>-->
		<!-- Mainly scripts -->
		<script src="<!--{$oapath}-->Ins/js/jquery-2.1.1.js"></script>
		<script src="<!--{$oapath}-->Ins/js/bootstrap.min.js"></script>
		<script src="<!--{$oapath}-->Ins/js/plugins/metisMenu/jquery.metisMenu.js"></script>
		<script src="<!--{$oapath}-->Ins/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
		<!-- Custom and plugin javascript -->
		<script src="<!--{$oapath}-->Ins/js/inspinia.js"></script>
		<script src="<!--{$oapath}-->Ins/js/common.js"></script>
		<script src="<!--{$oapath}-->Ins/js/plugins/pace/pace.min.js"></script>
                
		<script src="<!--{$oapath}-->Ins/js/plugins/toastr/toastr.min.js"></script>
                <script src="<!--{$oapath}-->Ins/js/plugins/gritter/jquery.gritter.min.js"></script>
                <script src="<!--{$oapath}-->Ins/js/plugins/bootbox/bootbox.min.js"></script>
		                        <script src="<!--{$oapath}-->Ins/js/plugins/date-time/moment-with-locales.js"></script>
	<script src="<!--{$oapath}-->Ins/js/plugins/date-time/bootstrap-datetimepicker.js"></script>
<block name="js">
	<script type="text/javascript">
		function read(id) {
			winopen("oa.php?c=Sign&a=read?id=" + id, 560, 470);
                 };
                function save(id,type) {
                        if(type==1){

				sendAjax("oa.php?c=Sign&a=leave_edit", "&id="+id+"&type="+type, function(data) {
					if (data.status) {
						ui_alert(data.info, function() {
							location.reload(true);
						});
					} else {
						ui_error(data.info);
					}
				});
                        }else{
                         winopen("oa.php?c=Sign&a=leave_replay&id="+id,560, 470);
                        }
                 };

		$(document).ready(function() {
			set_return_url();
		});

	</script>
        <script type="text/javascript">
	$(document).ready(function() {
		$('.input-date').datetimepicker({
			format : 'YYYY-MM-DD',
			locale : 'zh-cn',
			ignoreReadonly : true,
			widgetPositioning : {
				horizontal : 'auto',
				vertical : 'bottom'
			},
		});
		
		$(".input-daterange input").datetimepicker({
			format : "YYYY-MM-DD",
			locale : 'zh-cn',
			showTodayButton : true,
			showClose : true,
			ignoreReadonly : true,
			widgetPositioning : {
				horizontal : 'auto',
				vertical : 'bottom'
			},
		});

		$("#start_date").on("dp.change", function(e) {
			if ($("#end_date").length > 0) {
				$('#end_date').data("DateTimePicker").minDate(e.date);
			}
		});
		
		$("#end_date").on("dp.change", function(e) {
			if ($("#start_date").length > 0) {
				$('#start_date').data("DateTimePicker").maxDate(e.date);
			}
		});

		$(".input-date-time").datetimepicker({
			format : 'YYYY-MM-DD HH:mm',
			locale : 'zh-cn',
			sideBySide : true,
			showTodayButton : true,
			showClose : true,
			ignoreReadonly : true,
			widgetPositioning : {
				horizontal : 'auto',
				vertical : 'bottom'
			},
		});		 
	}); 
</script>
</block>
	</body>
</html>
