<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="leavelist.aspx.cs" Inherits="Us.Web.admin.leave.leavelist" %>


<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <title>请假</title>
    <link href="../style/default/style.css" rel="stylesheet" type="text/css" />
     <%=ImportScriptStr %>
    <script language="javascript" src="/admin/js/System.js" type="text/javascript"></script>
    <script language="javascript" src="/admin/My97DatePicker/WdatePicker.js" type="text/jscript"></script>
  
</head>
<body>
    <form id="Form1" method="post" runat="server">
    <div class="divTbg">
      <div class="divTbgL"></div>
      <div class="divTbgInfo">
        <div class="divTbgTitle">请假管理</div>
      </div>
    </div>
    <div class="divTbgF"></div>
    <div class="divSearchBoth">
        <div class="divInfo">
            <div class="divInfoblack">
                <div class="divInfoTopList">
                    <div class="listLeft">
                        <div class="navsearchtitle">
                            请假搜索</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="divInfo">
            <div class="divSearch">
                <div id="searchBox" class="clearsearch">
                <p>
                        <label for="drpLType">
                            考勤类型：</label>
                        <asp:DropDownList runat="server" ID="drpLType" ToolTip="考勤类型">
                                    <asp:ListItem Value="LeaveType" Text="code"></asp:ListItem>
                                </asp:DropDownList>
                    </p>
                   
                    <p>
                        <label for="drpLCType">
                            请假类型：</label>
                        <asp:DropDownList runat="server" ID="drpLCType" ToolTip="请假类型">
                                    <asp:ListItem Value="LeaveCType" Text="code"></asp:ListItem>
                                </asp:DropDownList>
                    </p>
                     <p>
                        <label for="drpSubmitState">
                            提交状态：</label>
                        <asp:DropDownList runat="server" ID="drpSubmitState" ToolTip="提交状态">
                                    <asp:ListItem Value="SubmitState" Text="code"></asp:ListItem>
                                </asp:DropDownList>
                    </p>

                    <p>
                        <label for="drpLeaveState">
                            审批状态：</label>
                        <asp:DropDownList runat="server" ID="drpLeaveState" ToolTip="审批状态">
                                    <asp:ListItem Value="LeaveRunState" Text="code"></asp:ListItem>
                                </asp:DropDownList>
                    </p>

                     <p>
                        <label for="txtUserID">
                            请假人员：</label>
                        <asp:TextBox ID="txtUserID" runat="server" ToolTip="请假人员" Text=""></asp:TextBox>
                    </p>
                 
                    
                   
                    <p class="nodisplay">
                       <label for="txtBeginDate">开始时间：</label>
                        <asp:TextBox ID="txtBeginDate" runat="server" onfocus="var txtAContractEnd=$dp.$('txtEndDate');WdatePicker({onpicked:function(){txtEndDate.focus();},maxDate:'#F{$dp.$D(\'txtEndDate\')}',isShowClear:true,readOnly:true,dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
                     </p>
                     
                     <p  class="nodisplay">
                      <label for="txtEndDate">结束时间：</label>
                       <asp:TextBox ID="txtEndDate" runat="server" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'txtBeginDate\')}',isShowClear:true,readOnly:true,dateFmt:'yyyy-MM-dd'});"></asp:TextBox>
                      </p>
                    <p>
                    
                        <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="确认搜索" CssClass="SkyButtonFocus" />
                    </p>
                </div>
            </div>
        </div>
    </div>
    <div class="divInfo">
        <div class="divInfoblack">
            <div class="divInfoTopList">
                <div class="listLeft">
                    <div class="navtitle">
                        请假详细列表</div>
                </div>
                <div class="listRight">
                    <ul>
                        <li class="navstyle1">
                            <input type="checkbox" name="chkselect" id="chkselect" onclick="skySelectCheckList();"/>
                            <label for="chkselect">全选</label> </li>
                        <li class="navstyle2">
                            <asp:LinkButton ID="LnkBAdd" runat="server" OnClick="SkyLnkBAMD_Click" >添加</asp:LinkButton>
                        </li>
                        <li class="navstyle3">
                            <asp:LinkButton ID="LnkBEdit" runat="server" OnClick="SkyLnkBAMD_Click" Enabled="false" >编辑</asp:LinkButton>
                        </li>
                        <li class="navstyle4">
                            <asp:LinkButton ID="LnkBDelete" runat="server" OnClick="SkyLnkBAMD_Click">删除</asp:LinkButton>
                        </li>
                        <li class="navstyle5">
                            <asp:LinkButton ID="LnkBExcel" runat="server" OnClick="SkyLnkBAMD_Click">导出</asp:LinkButton>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="divInfo">
        <div class="divInfoContext">
            <asp:Repeater runat="server" ID="rptInfo">
                <HeaderTemplate>
                    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" onmouseover="changeto()"  onmouseout="changeback()">
                        <tr class="tablisttitle">
                           <td width="4%">
                                编号
                            </td>
                            <td width="4%">
                                <%=cHTMLFx%>
                            </td>
                             <td>
                                请假状态
                            </td>
                            <td>
                                审批状态
                            </td>
                            <td>
                                姓名
                            </td> 
                            <td>
                                请假类型
                            </td>
                            <td>
                                请假开始
                            </td>
                            <td>
                                请假结束
                            </td>
                            <td>
                                时长(小时)
                            </td>
                            <td>
                                申请原因
                            </td> 

                          
                            <td>
                                录入时间
                            </td> 
                           
                            <td>
                                操作
                            </td>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="tablisttr">
                        <td>
                            <%#Eval("LeaveID") %>
                        </td>
                        <td>
                            <asp:CheckBox  runat="server" ID="chkselect" ToolTip='<%#Eval("ID") %>'
                                 Enabled='<%# Eval("LeaveState").ToString() != "1"?false:true%>'/>
                        </td>
                         <td><span class="fontblue">
                            <%#Eval("SubmitStateName")%></span>
                        </td>
                         <td><span class="fontred">
                              <%#Eval("LeaveStateName")%></span>
                        </td>

                         <td>
                            <%#Eval("UserName")%><%#(Eval("UserID").ToString()==Eval("CreateBy").ToString())?"":"("+Eval("CreateBy").ToString()+"代请)"%>

                            
                        </td>
                         <td>
                            <%#Eval("LCTypeName")%>
                        </td>
                         <td style="text-align:left;">
                              <%#UsToolsDateFormatEnter(Eval("SDate"))%>
                            
                        </td>
                         <td style="text-align:left;"> <%#UsToolsDateFormatEnter(Eval("EDate"))%>
                           
                        </td>
                         <td><span class="fontblue">
                            <%#Eval("LDay")%></span>
                        </td>


                         <td>
                            
                             <%#UsToolsStringLengthTitle(Eval("LInfo").ToString(),10)%>
                        </td>


                        <td>
                           <%#UsToolsDateFormat(Eval("CreateDate"))%>
                        </td>
                       
                        <td>
                              <span style='display:<%#Eval("SubmitState").ToString()=="0"?"":"none" %>'>
                           
                                   <%#UsToolArtUrl("/admin/leave/leaveflowmanage.aspx?leaveid="+Eval("leaveid").ToString(), "[提交]",pDefault.sSize)%>
                                  </span>


                            <%#UsToolArtUrl("/admin/leave/leaveview.aspx?leaveid="+Eval("leaveid").ToString(), "[查看]","B3")%>

                    


<span style='display:<%#(Eval("SubmitState").ToString()=="1" &&Eval("LeaveState").ToString()=="2")?"":"none" %>'>
<asp:LinkButton ID="lkbQuit" OnClientClick="return window.confirm('您确实要取消吗？取消后无法操作！');" class="rptlink" runat="server" CommandArgument='<%#Eval("ID") %>' CommandName="quit" OnCommand="LeaveQuit">[取消]</asp:LinkButton>
 </span>


                      

<%--<script>function Client_InfoEdit<%#Eval("id") %>() {
    $.dialog.open('/admin/leave/leaveview.aspx?leaveid=<%#Eval("leaveid") %>',
      { title: '查看', width: 900, height: 480, fixed: true });
};</script>

<a href="javascript:void()" onclick='javascript:Client_InfoEdit<%#Eval("id") %>()'>编辑2</a>

<a href="#" onclick=javascript:CareffArtOpen1('/admin/leave/leaveview.aspx?leaveid=<%#Eval("leaveid") %>')>编辑1</a>

<a href="#" onclick="javascript:window.top.art.dialog.open('/admin/leave/leaveview.aspx?leaveid=<%#Eval("leaveid") %>',  { title: '查看', width: 900, height: 700, fixed: true });" >编辑top</a>
--%>


                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table></FooterTemplate>
            </asp:Repeater>

           

        </div>
    </div>
    <div class="divInfo">
        <webdiyer:aspnetpager id="Pager" runat="server" AlwaysShow="True" OnPageChanged="Pager_PageChanged"
         ShowCustomInfoSection="Left" ShowPageIndexBox="Always" showpageindex="False"
               CustomInfoHTML="共 <B>%PageCount%</B> 页，当前为第 <B>%CurrentPageIndex%</B> 页，每页 <B>%PageSize%</B> 条" 
               SubmitButtonText="" FirstPageText="首页" LastPageText="尾页" 
               LayoutType="Table" NextPageText="后一页" PrevPageText="前一页" ShowMoreButtons="False" 
               TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" 
               CustomInfoTextAlign="Left" HorizontalAlign="Right"></webdiyer:aspnetpager>
    </div>


    <div class="divInfo">
        <span class="usHelpMessage"> * 注意事项： 点击新建可以发起，发起需要两步操作；如果在第一步停下了，重新进入本页后点击提交；


        </span>  
    </div>

    </form>
</body>
</html>
