<!--{include file="<!--{$oapath}-->public/ins_page.tpl"}-->
<block name="content">
    <div class="page-header clearfix">
        <h1 class="col-sm-8">请假/加班审核</h1>
    </div>
    <div class="space-8"></div>
    <!--<div class="operate panel panel-default">
       <div class="panel-body">
                <div class="pull-right">
                    <a class="btn btn-sm btn-primary" onclick="add()">申请请假加班</a>
                </div>
        </div>
    </div>-->
    <div class="ul_table ul_table_responsive">
        <ul>
            <li class="thead">
                <div class="pull-left">
                    <span class="col-8 ">序号</span>
                    <span class="col-12">开始时间</span>
                    <span class="col-12">结束时间</span>
                    <span class="col-12">员工姓名</span>
                    <span class="col-12">类型</span>
                    <span class="col-12">时长</span>
                    <span class="col-40">内容</span>
                </div>
                <div class="pull-right">
                    <span class="col-12">状态</span>
                    <span class="col-12 text-center">操作</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-8 "><!--{$vo.id}-->&nbsp;</span>
                    <span class="col-12 "><!--{$vo.time}-->&nbsp;</span>
                    <span class="col-12 "><!--{$vo.end_time}-->&nbsp;</span>
                    <span class="col-12 "><!--{$vo.user_name}-->&nbsp;</span>
                    <span class="col-12 ">
                                                             <!--{if $vo.type == '1'}-->请假
                        <!--{elseif $vo.type == '2'}-->加班
                        <!--{/if}-->&nbsp;
                                                         </span>
                    <span class="col-12"><!--{$vo.hour}-->&nbsp;</span>
                    <span class="col-40"><!--{$vo.content}-->&nbsp;</span>
                </div>
                <div class="pull-right">
                                                     <span class="col-12">
                                                            <!--{if $vo.status == '0'}-->未审核
                                                         <!--{elseif $vo.status == '1'}-->已审核
                                                         <!--{/if}-->&nbsp;</span>
                    <span class="col-12 text-center">
                                                            <!--{if $vo.status == '0'}-->
                                                                  <a onclick="save(<!--{$vo.id}-->,1)">同意</a>&nbsp;|<a
                                onclick="save(<!--{$vo.id}-->,2)">不同意</a>
                        <!--{/if}-->
								
                                                        </span>
                </div>
                <div class="auto autocut">
                    <a href="oa.php?c=Task&a=read&id=<!--{$vo.id}-->"><!--{$vo.name}--></a>
                </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>
<include file="Layout:ins_plugin_js"/>
<block name="js">
    <script type="text/javascript">
        function add() {
            winopen("oa.php?c=Sign&a=add_leave", 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>
</block>
</body>
</html>
