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



<!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 id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <title>请假管理</title>
    <asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal>
    <link href="../style/default/style.css" rel="stylesheet" type="text/css" /> <%=ImportScriptStr %>
    <script  language="javascript" src="/editor/xheditor.js" type="text/javascript" ></script>
    <script type="text/javascript" src="/editor/xheditor_lang/zh-cn.js"></script>
   
    
<script language="javascript" type="text/javascript">
    function opJsTreeUser(txt, txtValue) {
        var para = "/admin/basic/usertreeselect.aspx?para=1&list=" + $("#" + txtValue).val() + "&PostID=<% =LoginUserInfo.sPostID %>&DeptID=<% =LoginUserInfo.sDeptID %>";
        //UsOpenDialogTreeBack(para, txt, txtValue, function () { 
        //    //alert();
        //    document.getElementById("btnSearch").click();
        //});

        CareffArtOpen4(para, '人员选择', 300, 650, function (path) {
            //alert(path);
            if (path == null) { return false; }
            var strs = path.split("#")
            var m = $id(txt)
            m.value = strs[1];
            var m1 = $id(txtValue)
            m1.value = strs[0];
            document.getElementById("btnSearch").click();

        });
    }

    function jscheckAll() {
       

        var info = "您确实要提交请假信息吗？一旦提交后无法修改，请确认信息填写准确！";
        //alert(art.dialog.data("retdata"));
        if (art.dialog.data("retdata") == 1) {
            art.dialog.data("retdata", 0);//重置
            return true;
        }
        art.dialog.confirm(info, function () {
            art.dialog.data("retdata", 1);
            document.getElementById("btnSubmit").click();
        });

        return false;

    }

    $(window).load(function () {
        $("#txtSDate").change(function () { getAjaxData() });
        $("#txtEDate").change(function () { getAjaxData() });
        $("#txtSDate1").change(function () { getAjaxData() });
        $("#txtEDate1").change(function () { getAjaxData() });
    });


    function getAjaxData()
    {
        //alert();
        var SDate, SDate1, EDate, EDate1;
        SDate = $("#txtSDate").val();
        SDate1 = $("#txtSDate1").val();
        EDate = $("#txtEDate").val();
        EDate1 = $("#txtEDate1").val();
        var url = "leaveajax.aspx?SDate=" + SDate + "&SDate1=" + SDate1 + "&EDate=" + EDate + "&EDate1=" + EDate1;
        //alert(url);
        $.ajax({
            type: "get", //使用get方法访问后台
            dataType: "json", //返回json格式的数据
            url: url, //要访问的后台地址
            data: "", //要发送的数据
            cache: false,
            complete: function () { }, //AJAX请求完成时隐藏loading提示
            success: function (msg) {//msg为返回的数据，在这里做数据绑定
               
                if (msg[0].ID == "0") {
                    //alert(msg[0].JG);
                    $("#txtLDay").val(msg[0].JG);
                }
                else {
                    alert(msg[0].msg);
                }
            }
        });
    }

 </script>

    </head>
<body onload="win_onLoad();">
    <form id="form1" runat="server">
    
    <div id="tbMain">
        <div class="divTbg">
            <div class="divTbgL">
            </div>
            <div class="divTbgInfo">
                <div class="divTbgTitle">
                   请假管理</div>
            </div>
        </div>
        <div class="divTbgF">
        </div>
        <div class="divTNavBG" id="topURL">
            <ul id="topURLul">
                <li class="divURLed" id="div1">
                    <div>
                        <img src="../style/default/images/mini_icons_046.gif" width="10" height="10" />
                        基本信息</div>
                </li>
            </ul>
        </div>
        <div id="mypanel">
            <div class="divInfoContext">
                <div class="divInfo">
                    <div class="divInfoblack">
                        <div class="divInfoTopList">
                            <div class="listLeft">
                                <div class="navtitle">
                              1.请假人信息</div>
                            </div>
                        </div>
                    </div>
                </div><div class="divInfo">
                <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" onMouseOver="changeto()" onMouseOut="changeback()">
<tr class="tablisttr">
  <td  class="tablisttitle">申请人名 <span class="fStar">*</span></td>
  <td class="tabmanagertr" width="40%">
    
      <asp:TextBox ID="txtUserName" runat="server" Text=""  CssClass="1" ToolTip="申请人"></asp:TextBox>
     <a href="javascript:opJsTreeUser('txtUserName','txtUserID');">[替人请假]</a>
    <span class="nodisplay"><asp:TextBox ID="txtUserID" runat="server" ToolTip="申请人" Text=""  CssClass="1"></asp:TextBox><asp:DropDownList runat="server" ID="drpLType" ToolTip="请假大类">
    <asp:ListItem Value="LeaveType" Text="codeno"></asp:ListItem>
    </asp:DropDownList></span>

      </td>
  <td  class="tablisttitle">申请部门</td>
  <td class="tabmanagertr" width="40%">
    <asp:TextBox ID="txtDeptID" runat="server" ToolTip="计划部门" Text=""></asp:TextBox></td>
</tr>
<tr class="tablisttr">
  <td class="tablisttitle">电子邮件<span class="fStar">*</span></td>
  <td class="tabmanagertr"><asp:TextBox ID="txtUEmail" runat="server" ToolTip="电子邮件" Text="电子邮件" CssClass="1"></asp:TextBox></td>
  <td class="tablisttitle">联系电话</td>
  <td class="tabmanagertr"><asp:TextBox ID="txtUTel" runat="server" ToolTip="联系电话" Text=""></asp:TextBox></td>
</tr>
</table></div>
                <div class="divInfo">
                    <div class="divInfoblack">
                        <div class="divInfoTopList">
                            <div class="listLeft">
                                <div class="navtitle">
                                    2.请假信息</div>
                            </div>
                        </div>
                  </div>
              </div><div class="divInfo">
                <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" onMouseOver="changeto()" onMouseOut="changeback()">
<tr class="tablisttr">
  <td class="tablisttitle">请假类型<span class="fStar">*</span></td>
  <td class="tabmanagertr" colspan="3">
     <asp:RadioButtonList runat="server" ID="radLCType" ToolTip="请假分类" RepeatColumns="4" RepeatDirection="Horizontal" Width="100%">
    <asp:ListItem Value="LeaveCType" Text="codeno"></asp:ListItem>
    </asp:RadioButtonList>
       



  </td>

</tr>

<tr class="tablisttr">
  <td class="tablisttitle">开始时间<span class="fStar">*</span></td>
  <td class="tabmanagertr" width="40%"><asp:TextBox ID="txtSDate" runat="server" ToolTip="开始时间" Text=""  CssClass="1"
      onfocus="var txtAContractEnd=$dp.$('txtEDate');WdatePicker({onpicked:function(){txtEDate.focus();getAjaxData();},maxDate:'#F{$dp.$D(\'txtEDate\')}',isShowClear:true,readOnly:true,dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
      &nbsp;<select  id="txtSDate1" class="inline form-control" style="width:80px;" runat="server">
	<option  value="0:00">00:00</option>
	<option value="00:30">00:30</option>
	<option value="01:00">01:00</option>
	<option value="01:30">01:30</option>
	<option value="02:00">02:00</option>
	<option value="02:30">02:30</option>
	<option value="03:00">03:00</option>
	<option value="03:30">03:30</option>
	<option value="04:00">04:00</option>
	<option value="04:30">04:30</option>
	<option value="05:00">05:00</option>
	<option value="05:30">05:30</option>
	<option value="06:00">06:00</option>
	<option value="06:30">06:30</option>
	<option value="07:00">07:00</option>
	<option value="07:30">07:30</option>
	<option selected="selected" value="08:00">08:00</option>
	<option value="08:30">08:30</option>
	<option value="09:00">09:00</option>
	<option value="09:30">09:30</option>
	<option value="10:00">10:00</option>
	<option value="10:30">10:30</option>
	<option value="11:00">11:00</option>
	<option value="11:30">11:30</option>
	<option value="12:00">12:00</option>
	<option value="12:30">12:30</option>
	<option value="13:00">13:00</option>
	<option value="13:30">13:30</option>
	<option value="14:00">14:00</option>
	<option value="14:30">14:30</option>
	<option value="15:00">15:00</option>
	<option value="15:30">15:30</option>
	<option value="16:00">16:00</option>
	<option value="16:30">16:30</option>
	<option value="17:00">17:00</option>
	<option value="17:30">17:30</option>
	<option value="18:00">18:00</option>
	<option value="18:30">18:30</option>
	<option value="19:00">19:00</option>
	<option value="19:30">19:30</option>
	<option value="20:00">20:00</option>
	<option value="20:30">20:30</option>
	<option value="21:00">21:00</option>
	<option value="21:30">21:30</option>
	<option value="22:00">22:00</option>
	<option value="22:30">22:30</option>
	<option value="23:00">23:00</option>
	<option value="23:30">23:30</option>

</select></td>
  <td class="tablisttitle">&nbsp;</td>
  <td class="tabmanagertr" width="40%">
         
         </td>
</tr>


<tr class="tablisttr">
  <td class="tablisttitle">结束时间<span class="fStar">*</span></td><td class="tabmanagertr">
    <asp:TextBox ID="txtEDate" runat="server" ToolTip="结束时间" Text=""  CssClass="1"
         onfocus="WdatePicker({onpicked:function(){getAjaxData();},minDate:'#F{$dp.$D(\'txtSDate\')}',isShowClear:true,readOnly:true,dateFmt:'yyyy-MM-dd'});"></asp:TextBox>
         &nbsp;<select  id="txtEDate1" class="inline form-control" style="width:80px;" runat="server">
	<option value="0:00">00:00</option>
	<option value="00:30">00:30</option>
	<option value="01:00">01:00</option>
	<option value="01:30">01:30</option>
	<option value="02:00">02:00</option>
	<option value="02:30">02:30</option>
	<option value="03:00">03:00</option>
	<option value="03:30">03:30</option>
	<option value="04:00">04:00</option>
	<option value="04:30">04:30</option>
	<option value="05:00">05:00</option>
	<option value="05:30">05:30</option>
	<option value="06:00">06:00</option>
	<option value="06:30">06:30</option>
	<option value="07:00">07:00</option>
	<option value="07:30">07:30</option>
	<option value="08:00">08:00</option>
	<option value="08:30">08:30</option>
	<option value="09:00">09:00</option>
	<option value="09:30">09:30</option>
	<option value="10:00">10:00</option>
	<option value="10:30">10:30</option>
	<option value="11:00">11:00</option>
	<option value="11:30">11:30</option>
	<option value="12:00">12:00</option>
	<option value="12:30">12:30</option>
	<option value="13:00">13:00</option>
	<option value="13:30">13:30</option>
	<option value="14:00">14:00</option>
	<option value="14:30">14:30</option>
	<option value="15:00">15:00</option>
	<option value="15:30">15:30</option>
	<option value="16:00">16:00</option>
	<option value="16:30">16:30</option>
	<option selected="selected" value="17:00">17:00</option>
	<option value="17:30">17:30</option>
	<option value="18:00">18:00</option>
	<option value="18:30">18:30</option>
	<option value="19:00">19:00</option>
	<option value="19:30">19:30</option>
	<option value="20:00">20:00</option>
	<option value="20:30">20:30</option>
	<option value="21:00">21:00</option>
	<option value="21:30">21:30</option>
	<option value="22:00">22:00</option>
	<option value="22:30">22:30</option>
	<option value="23:00">23:00</option>
	<option value="23:30">23:30</option>

</select>

                                    </td>
  <td class="tablisttitle">请假小时数<span class="fStar">*</span></td><td class="tabmanagertr">
    <asp:TextBox ID="txtLDay" runat="server" ToolTip="请假小时数" Text="8"></asp:TextBox>（小时）</td>
</tr>


<tr class="tablisttr">
<td class="tablisttitle">请假说明</td><td class="tabmanagertr" colspan="3">
    

    <asp:TextBox ID="txtLInfo" runat="server" ToolTip="请假说明" Text="请假说明"  Width="100%" TextMode="MultiLine" Height="60px" ></asp:TextBox>


                                  </td>
</tr>
<tr class="tablisttr">
<td class="tablisttitle">请假附件</td><td class="tabmanagertr" colspan="3" >
    <asp:TextBox ID="txtLAddr" runat="server" ToolTip="请假附件" Width="80%"></asp:TextBox>
     <a href="#" onclick="SkyOpen('txtLAddr');">[选择]</a><a href="#" onclick="SkyView('txtLAddr');">[查看]</a><a href="#" onclick="SkyDelete('txtLAddr');">[清空]</a>
 </td>

</tr>
<tr class="tablisttr">
<td class="tablisttitle">重要提示</td><td class="tabmanagertr" colspan="3" >
    <span class="usHelpMessage"> * 注意事项： 请假类型，开始时间，结束时间等信息提交后不可修改，因此请保证信息录入清除后在提交；</span>  </td>

</tr>
</table></div>

                <div class="divSave">
<asp:Button ID="btnSubmit" runat="server" Text="保存(S)" 
                            CssClass="SkyButtonFocus" onclick="btnSubmit_Click" />
                        <asp:Button ID="btnExit" runat="server" Text="取消(C)" CssClass="SkyButtonFocus" 
                            onclick="btnSubmit_Click" />
                        <span class="nodisplay">
<asp:Button ID="btnSearch" runat="server" Text="查询(A)" 
                            CssClass="SkyButtonFocus" onclick="btnSearch_Click" /></span>
                    </div>
            </div>
        </div>
    </div>











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