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

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"><p>&nbsp;</p>
  62. <%
  63. Request m_request = new Request(request);
  64. int iSysDirID = m_request.GetInt("SysDirID");
  65. int intUserID = m_session.GetInt("UserID");
  66. %>
  67.             <form name="AddLeaveApply" action="/Operation/AddLeaveApplyAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkAddLeaveApply();">
  68.             <table  border="0" cellpadding="0" cellspacing="0" width="90%">
  69.                         <input name="ApplyUserID" type="hidden" value="<%=intUserID%>">
  70.                         <input name="ConfirmUserID" type="hidden" value="<%=intUserID%>">
  71.                         <input name="CompanyTo" type="hidden">
  72.                         <input name="CityTo" type="hidden">
  73.                         <input name="SysDirID" type="hidden" Value="<%=iSysDirID%>">
  74.                 <tr>
  75.                     <td align="right" valign="middle"><font color="#0A0A0A">请假事由:</font></td>
  76.                     <td align="left" valign="middle" nowrap>
  77.                         <input name="ErrandTitle" type="text" maxlength="150" size="37">
  78.                     </td>
  79.                 </tr>
  80.                 <tr>
  81.                     <td align="right" valign="middle"><font color="#0A0A0A">请假事由描述:</font></td>
  82.                     <td align="left" valign="middle" nowrap>
  83.                       <textarea name="ErrandContent" cols="30" rows="6"></textarea>
  84.                     </td>
  85.                 </tr>
  86.                     <input name="Personnels" type="hidden" maxlength="200" size="37">
  87.                     <%java.util.Date t_Date = new java.util.Date();%>
  88.                     <input name="ApplyTime" type="hidden" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm:ss")%>">
  89.                 <tr>
  90.                     <td align="right" valign="middle"><font color="#0A0A0A">计划开始时间:</font></td>
  91.                     <td align="left" valign="middle" nowrap>
  92.                     <input name="PlanStartTime" type="hidden">
  93.                     <input name="PlanStartDateD" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  94.               <select name="PlanStartDateT">
  95.                 <option value="6">6</option>
  96.                 <option value="7">7</option>
  97.                 <option value="8">8</option>
  98.                 <option value="9" selected>9</option>
  99.                 <option value="10">10</option>
  100.                 <option value="11">11</option>
  101.                 <option value="12">12</option>
  102.                 <option value="13">13</option>
  103.                 <option value="14">14</option>
  104.                 <option value="15">15</option>
  105.                 <option value="16">16</option>
  106.                 <option value="17">17</option>
  107.                 <option value="18">18</option>
  108.                 <option value="19">19</option>
  109.                 <option value="20">20</option>
  110.               </select>
  111.               <font color="#0A0A0A">时</font> </td>
  112.                 </tr>
  113.                 <tr>
  114.                     <td align="right" valign="middle"><font color="#0A0A0A">计划结束时间:</font></td>
  115.                     <td align="left" valign="middle" nowrap>
  116.                     <input name="PlanEndTime" type="hidden">
  117.                     <input name="PlanEndDateD" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  118.               <select name="PlanEndDateT">
  119.                 <option value="6">6</option>
  120.                 <option value="7">7</option>
  121.                 <option value="8">8</option>
  122.                 <option value="9">9</option>
  123.                 <option value="10">10</option>
  124.                 <option value="11">11</option>
  125.                 <option value="12">12</option>
  126.                 <option value="13">13</option>
  127.                 <option value="14">14</option>
  128.                 <option value="15">15</option>
  129.                 <option value="16">16</option>
  130.                 <option value="17" selected>17</option>
  131.                 <option value="18">18</option>
  132.                 <option value="19">19</option>
  133.                 <option value="20">20</option>
  134.               </select>
  135.               <font color="#0A0A0A">时</font> </td>
  136.                 </tr>
  137.                 <tr>
  138.                     <td align="right" valign="middle"><font color="#0A0A0A">备注:</font></td>
  139.                     <td align="left" valign="middle" nowrap>
  140.                       <textarea name="Remark" cols="30" rows="3"></textarea>
  141.                     </td>
  142.                 </tr>  <tr>
  143.     <td align="right" valign="middle">审批级别:</td>
  144.     <td align="left" valign="middle" nowrap>
  145.       <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='';}}">
  146.         <option value="1" selected>1级</option>
  147.         <option value="2">2级</option>
  148.         <option value="3">3级</option>
  149.         <option value="4">4级</option>
  150.         <option value="5">5级</option>
  151.         <option value="6">6级</option>
  152.         <option value="7">7级</option>
  153.       </select>
  154.     </td>
  155.   </tr>
  156.   <tr>
  157.     <td align="right" valign="middle">&nbsp;</td>
  158.     <td align="center" valign="middle" nowrap>
  159.       <table border="1" cellpadding="0" cellspacing="0" width="95%">
  160.         <tr bgcolor="<%=m_session.GetString("TitleColor")%>">
  161.           <th align="center" valign="middle" nowrap>级别</th>
  162.           <th align="center" valign="middle" nowrap>员工姓名</th>
  163.           <th align="center" valign="middle" nowrap>员工编号</th>
  164.         </tr>
  165.         <tr ID="ApproveList1">
  166.           <td align="center" valign="middle" nowrap>一级</td>
  167.           <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>
  168.           <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>
  169.         </tr>
  170.         <tr ID="ApproveList2" style="display:none">
  171.           <td align="center" valign="middle" nowrap>二级</td>
  172.           <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>
  173.           <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>
  174.         </tr>
  175.         <tr ID="ApproveList3" style="display:none">
  176.           <td align="center" valign="middle" nowrap>三级</td>
  177.           <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>
  178.           <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>
  179.         </tr>
  180.         <tr ID="ApproveList4" style="display:none">
  181.           <td align="center" valign="middle" nowrap>四级</td>
  182.           <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>
  183.           <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>
  184.         </tr>
  185.         <tr ID="ApproveList5" style="display:none">
  186.           <td align="center" valign="middle" nowrap>五级</td>
  187.           <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>
  188.           <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>
  189.         </tr>
  190.         <tr ID="ApproveList6" style="display:none">
  191.           <td align="center" valign="middle" nowrap>六级</td>
  192.           <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>
  193.           <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>
  194.         </tr>
  195.         <tr ID="ApproveList7" style="display:none">
  196.           <td align="center" valign="middle" nowrap>七级</td>
  197.           <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>
  198.           <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>
  199.         </tr>
  200.       </table>
  201.     </td>
  202.   </tr>
  203.                 <tr>
  204.                     <td align="right" valign="middle">&nbsp;</td>
  205.                     <td align="left" valign="middle" nowrap>
  206.                         <input type="submit" value="添加">  &nbsp;&nbsp;&nbsp;
  207.                         <input type="reset" value="重填">  &nbsp;&nbsp;&nbsp;
  208.                         <input type="button" value="返回" onclick="window.location='LeaveApplyManage.jsp?SysDirID=<%=iSysDirID%>';">
  209.                     </td>
  210.                 </tr>
  211.             </table>
  212.             </form>
  213.         </td>
  214.     </tr>
  215. </table>
  216. </body>
  217. </html>