AddLeaveApply.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:17k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  7. <title>请假管理-- GForce OA 2.0</title>
  8. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  9. <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
  10. <script language="JavaScript" type="text/javascript">
  11. function checkAddLeaveApply()
  12. {
  13.         if(!isDate(document.AddLeaveApply.PlanStartDateD.value))
  14.         {
  15.             alert("日期格式错误,请按照“2002-02-18”重新输入!");
  16.             document.AddLeaveApply.PlanStartDateD.focus();
  17.             return false;
  18.         }
  19.         if(!isDate(document.AddLeaveApply.PlanEndDateD.value))
  20.         {
  21.             alert("日期格式错误,请按照“2002-02-18”重新输入!");
  22.             document.AddLeaveApply.PlanEndDateD.focus();
  23.             return false;
  24.         }
  25.     for(var i=0;i<parseInt(document.AddLeaveApply.ApproveLevel.selectedIndex)+1;i++)
  26.     {
  27.        if(parseInt(eval("document.AddLeaveApply.ApproveUserID" + (i+1)).value)<1)
  28.        {
  29.          alert("请选择第" + (i+1) + "级审批用户!");
  30.          eval("document.AddLeaveApply.PersonnelName" + (i+1)).focus();
  31.          return false;
  32.        }
  33.     }
  34. //计划开始时间,结束时间合成
  35.    document.AddLeaveApply.PlanStartTime.value = document.AddLeaveApply.PlanStartDateD.value + " "+
  36.                                                  document.AddLeaveApply.PlanStartDateT.value + ":00:00";
  37.    document.AddLeaveApply.PlanEndTime.value = document.AddLeaveApply.PlanEndDateD.value + " "+
  38.                                                  document.AddLeaveApply.PlanEndDateT.value + ":00:00";
  39. }
  40. function PopUpSelectUser(UserName,Number,UserID)
  41. {
  42.   showx = event.screenX - event.offsetX;    // + deltaX;
  43.   showy = event.screenY - event.offsetY+18; // + deltaY;
  44.   var retval = window.showModalDialog("/SelectUser1.jsp", "","dialogWidth:480px; dialogHeight:408px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:yes;scrollbars:yes;Resizable=yes; ");
  45.   if(retval!=null)
  46.   {
  47.     if(retval.indexOf("|!|")>0)
  48.     {
  49.       var strtemp = retval.split("|!|");
  50.       UserName.value=strtemp[1];
  51.       Number.value=strtemp[2];
  52.       UserID.value=strtemp[0];
  53.     }
  54.   }
  55. }
  56. </script>
  57. </head>
  58. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  59.   <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  60.     <tr>
  61.     <td align="center" valign="top">
  62.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  63.         <tr>
  64.           <td height="50" valign="top" background="../images/dy-back.gif">
  65.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  66.               <tr valign="middle">
  67.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  68.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">请假申请</font></strong></td>
  69.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  70.                    <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  71.                  <!--<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59">&nbsp;-->
  72.                   <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  73.                   <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  74.                   <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  75.                   <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  76.                 </td>
  77.               </tr>
  78.             </table>
  79.           </td>
  80.         </tr>
  81.       </table><br>
  82. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  83.     <tr>
  84.         <td align="center" valign="top"><p>&nbsp;</p>
  85. <%
  86. Request m_request = new Request(request);
  87. int iSysDirID = m_request.GetInt("SysDirID");
  88. int intUserID = m_session.GetInt("UserID");
  89. %>
  90.             <form name="AddLeaveApply" action="/Operation/AddLeaveApplyAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkAddLeaveApply();">
  91.             <table  border="0" cellpadding="0" cellspacing="0" width="90%">
  92.                         <input name="ApplyUserID" type="hidden" value="<%=intUserID%>">
  93.                         <input name="ConfirmUserID" type="hidden" value="<%=intUserID%>">
  94.                         <input name="CompanyTo" type="hidden">
  95.                         <input name="CityTo" type="hidden">
  96.                         <input name="SysDirID" type="hidden" Value="<%=iSysDirID%>">
  97.                 <tr>
  98.                     <td align="right" valign="middle"><font color="#0A0A0A">请假事由:</font></td>
  99.                     <td align="left" valign="middle" nowrap>
  100.                         <input name="ErrandTitle" type="text" maxlength="150" size="37">
  101.                     </td>
  102.                 </tr>
  103.                 <tr>
  104.                     <td align="right" valign="middle"><font color="#0A0A0A">请假事由描述:</font></td>
  105.                     <td align="left" valign="middle" nowrap>
  106.                       <textarea name="ErrandContent" cols="30" rows="6"></textarea>
  107.                     </td>
  108.                 </tr>
  109.                     <input name="Personnels" type="hidden" maxlength="200" size="37">
  110.                     <%java.util.Date t_Date = new java.util.Date();%>
  111.                     <input name="ApplyTime" type="hidden" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm:ss")%>">
  112.                 <tr>
  113.                     <td align="right" valign="middle"><font color="#0A0A0A">计划开始时间:</font></td>
  114.                     <td align="left" valign="middle" nowrap>
  115.                     <input name="PlanStartTime" type="hidden">
  116.                     <input name="PlanStartDateD" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  117.               <select name="PlanStartDateT">
  118.                 <option value="6">6</option>
  119.                 <option value="7">7</option>
  120.                 <option value="8">8</option>
  121.                 <option value="9" selected>9</option>
  122.                 <option value="10">10</option>
  123.                 <option value="11">11</option>
  124.                 <option value="12">12</option>
  125.                 <option value="13">13</option>
  126.                 <option value="14">14</option>
  127.                 <option value="15">15</option>
  128.                 <option value="16">16</option>
  129.                 <option value="17">17</option>
  130.                 <option value="18">18</option>
  131.                 <option value="19">19</option>
  132.                 <option value="20">20</option>
  133.               </select>
  134.               <font color="#0A0A0A">时</font> </td>
  135.                 </tr>
  136.                 <tr>
  137.                     <td align="right" valign="middle"><font color="#0A0A0A">计划结束时间:</font></td>
  138.                     <td align="left" valign="middle" nowrap>
  139.                     <input name="PlanEndTime" type="hidden">
  140.                     <input name="PlanEndDateD" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  141.               <select name="PlanEndDateT">
  142.                 <option value="6">6</option>
  143.                 <option value="7">7</option>
  144.                 <option value="8">8</option>
  145.                 <option value="9">9</option>
  146.                 <option value="10">10</option>
  147.                 <option value="11">11</option>
  148.                 <option value="12">12</option>
  149.                 <option value="13">13</option>
  150.                 <option value="14">14</option>
  151.                 <option value="15">15</option>
  152.                 <option value="16">16</option>
  153.                 <option value="17" selected>17</option>
  154.                 <option value="18">18</option>
  155.                 <option value="19">19</option>
  156.                 <option value="20">20</option>
  157.               </select>
  158.               <font color="#0A0A0A">时</font> </td>
  159.                 </tr>
  160.                 <tr>
  161.                     <td align="right" valign="middle"><font color="#0A0A0A">备注:</font></td>
  162.                     <td align="left" valign="middle" nowrap>
  163.                       <textarea name="Remark" cols="30" rows="3"></textarea>
  164.                     </td>
  165.                 </tr>  <tr>
  166.     <td align="right" valign="middle">审批级别:</td>
  167.     <td align="left" valign="middle" nowrap>
  168.       <select name="ApproveLevel" onchange="for(var i=0;i<7;i++){if(i>this.selectedIndex){eval('document.all.ApproveList' + (i+1)).style.display='none';}else{eval('document.all.ApproveList' + (i+1)).style.display='';}}">
  169.         <option value="1" selected>1级</option>
  170.         <option value="2">2级</option>
  171.         <option value="3">3级</option>
  172.         <option value="4">4级</option>
  173.         <option value="5">5级</option>
  174.         <option value="6">6级</option>
  175.         <option value="7">7级</option>
  176.       </select>
  177.     </td>
  178.   </tr>
  179.   <tr>
  180.     <td align="right" valign="middle">&nbsp;</td>
  181.     <td align="center" valign="middle" nowrap>
  182.       <table border="1" cellpadding="0" cellspacing="0" width="95%">
  183.         <tr bgcolor="<%=m_session.GetString("TitleColor")%>">
  184.           <th align="center" valign="middle" nowrap>级别</th>
  185.           <th align="center" valign="middle" nowrap>员工姓名</th>
  186.           <th align="center" valign="middle" nowrap>员工编号</th>
  187.         </tr>
  188.         <tr ID="ApproveList1">
  189.           <td align="center" valign="middle" nowrap>一级</td>
  190.           <td align="center" valign="middle" nowrap><input name="PersonnelName1" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName1,document.AddLeaveApply.PersonnelNumber1,document.AddLeaveApply.ApproveUserID1);"><input name="ApproveUserID1" type="Hidden" value="0"><A href="" onclick="PopUpSelectUser(document.AddLeaveApply.PersonnelName1,document.AddLeaveApply.PersonnelNumber1,document.AddLeaveApply.ApproveUserID1);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  191.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber1" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName1,document.AddLeaveApply.PersonnelNumber1,document.AddLeaveApply.ApproveUserID1);"></td>
  192.         </tr>
  193.         <tr ID="ApproveList2" style="display:none">
  194.           <td align="center" valign="middle" nowrap>二级</td>
  195.           <td align="center" valign="middle" nowrap><input name="PersonnelName2" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName2,document.AddLeaveApply.PersonnelNumber2,document.AddLeaveApply.ApproveUserID2);"><input name="ApproveUserID1" type="Hidden" value="0"><A href="" onclick="PopUpSelectUser(document.AddLeaveApply.PersonnelName2,document.AddLeaveApply.PersonnelNumber2,document.AddLeaveApply.ApproveUserID2);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  196.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber2" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName2,document.AddLeaveApply.PersonnelNumber2,document.AddLeaveApply.ApproveUserID2);"></td>
  197.         </tr>
  198.         <tr ID="ApproveList3" style="display:none">
  199.           <td align="center" valign="middle" nowrap>三级</td>
  200.           <td align="center" valign="middle" nowrap><input name="PersonnelName3" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName3,document.AddLeaveApply.PersonnelNumber3,document.AddLeaveApply.ApproveUserID3);"><input name="ApproveUserID1" type="Hidden" value="0"><A href="" onclick="PopUpSelectUser(document.AddLeaveApply.PersonnelName3,document.AddLeaveApply.PersonnelNumber3,document.AddLeaveApply.ApproveUserID3);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  201.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber3" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName3,document.AddLeaveApply.PersonnelNumber3,document.AddLeaveApply.ApproveUserID3);"></td>
  202.         </tr>
  203.         <tr ID="ApproveList4" style="display:none">
  204.           <td align="center" valign="middle" nowrap>四级</td>
  205.           <td align="center" valign="middle" nowrap><input name="PersonnelName4" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName4,document.AddLeaveApply.PersonnelNumber4,document.AddLeaveApply.ApproveUserID4);"><input name="ApproveUserID1" type="Hidden" value="0"><A href="" onclick="PopUpSelectUser(document.AddLeaveApply.PersonnelName4,document.AddLeaveApply.PersonnelNumber4,document.AddLeaveApply.ApproveUserID4);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  206.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber4" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName4,document.AddLeaveApply.PersonnelNumber4,document.AddLeaveApply.ApproveUserID4);"></td>
  207.         </tr>
  208.         <tr ID="ApproveList5" style="display:none">
  209.           <td align="center" valign="middle" nowrap>五级</td>
  210.           <td align="center" valign="middle" nowrap><input name="PersonnelName5" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName5,document.AddLeaveApply.PersonnelNumber5,document.AddLeaveApply.ApproveUserID5);"><input name="ApproveUserID1" type="Hidden" value="0"><A href="" onclick="PopUpSelectUser(document.AddLeaveApply.PersonnelName5,document.AddLeaveApply.PersonnelNumber5,document.AddLeaveApply.ApproveUserID5);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  211.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber5" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName5,document.AddLeaveApply.PersonnelNumber5,document.AddLeaveApply.ApproveUserID5);"></td>
  212.         </tr>
  213.         <tr ID="ApproveList6" style="display:none">
  214.           <td align="center" valign="middle" nowrap>六级</td>
  215.           <td align="center" valign="middle" nowrap><input name="PersonnelName6" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName6,document.AddLeaveApply.PersonnelNumber6,document.AddLeaveApply.ApproveUserID6);"><input name="ApproveUserID1" type="Hidden" value="0"><A href="" onclick="PopUpSelectUser(document.AddLeaveApply.PersonnelName6,document.AddLeaveApply.PersonnelNumber6,document.AddLeaveApply.ApproveUserID6);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  216.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber6" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName6,document.AddLeaveApply.PersonnelNumber6,document.AddLeaveApply.ApproveUserID6);"></td>
  217.         </tr>
  218.         <tr ID="ApproveList7" style="display:none">
  219.           <td align="center" valign="middle" nowrap>七级</td>
  220.           <td align="center" valign="middle" nowrap><input name="PersonnelName7" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName7,document.AddLeaveApply.PersonnelNumber7,document.AddLeaveApply.ApproveUserID7);"><input name="ApproveUserID1" type="Hidden" value="0"><A href="" onclick="PopUpSelectUser(document.AddLeaveApply.PersonnelName7,document.AddLeaveApply.PersonnelNumber7,document.AddLeaveApply.ApproveUserID7);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  221.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber7" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddLeaveApply.PersonnelName7,document.AddLeaveApply.PersonnelNumber7,document.AddLeaveApply.ApproveUserID7);"></td>
  222.         </tr>
  223.       </table>
  224.     </td>
  225.   </tr>
  226.                 <tr>
  227.                     <td align="right" valign="middle">&nbsp;</td>
  228.                     <td align="left" valign="middle" nowrap>
  229.                         <input type="submit" value="添加">  &nbsp;&nbsp;&nbsp;
  230.                         <input type="reset" value="重填">  &nbsp;&nbsp;&nbsp;
  231.                         <input type="button" value="返回" onclick="window.location='LeaveApplyManage.jsp?SysDirID=<%=iSysDirID%>';">
  232.                     </td>
  233.                 </tr>
  234.             </table>
  235.             </form>
  236.         </td>
  237.     </tr>
  238. </table>
  239. </body>
  240. </html>