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

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. <%
  5. Request m_request = new Request(request);
  6. int iSysDirID = m_request.GetInt("SysDirID");
  7. int intLeaveApplyID = m_request.GetInt("ID");
  8. if(intLeaveApplyID<1)
  9. {
  10. %>
  11. <script language="JavaScript" type="text/JavaScript">
  12. alert("请选择正确的请假申请,修改失败!");
  13. history.back();
  14. </script>
  15. <%
  16. }
  17. else
  18. {
  19. Vector vt = ErrandApplyManager.getRecordByID(intLeaveApplyID);
  20. if(vt.size()==1)
  21. {
  22. %>
  23. <html>
  24. <head>
  25. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  26. <title>请假申请管理-- GForce OA 2.0</title>
  27. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  28. <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
  29. <script language="JavaScript" type="text/javascript">
  30. function checkEditLeaveApply()
  31. {
  32.         if(!isDate(document.EditLeaveApply.RealStartDateD.value))
  33.         {
  34.             alert("日期格式错误,请按照“2002-02-18”重新输入!");
  35.             document.EditLeaveApply.RealStartDateD.focus();
  36.             return false;
  37.         }
  38.         if(!isDate(document.EditLeaveApply.RealEndDateD.value))
  39.         {
  40.             alert("日期格式错误,请按照“2002-02-18”重新输入!");
  41.             document.EditLeaveApply.RealEndDateD.focus();
  42.             return false;
  43.         }
  44. //计划开始时间,结束时间合成
  45.    document.EditLeaveApply.RealStartTime.value = document.EditLeaveApply.RealStartDateD.value + " "+
  46.                                                  document.EditLeaveApply.RealStartDateT.value + ":00:00";
  47.    document.EditLeaveApply.RealEndTime.value = document.EditLeaveApply.RealEndDateD.value + " "+
  48.                                                  document.EditLeaveApply.RealEndDateT.value + ":00:00";
  49. }
  50. </script>
  51. </head>
  52. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  53. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  54.     <tr>
  55.         <td align="center" valign="top"><p>&nbsp;</p>
  56.             <form name="EditLeaveApply" action="/Operation/EditLeaveApplyRecordAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkEditLeaveApply();">
  57.             <table  border="0" cellpadding="0" cellspacing="0" width="90%">
  58.                 <tr>
  59.                         <input name="SysDirID" type="Hidden" value="<%=((Vector)vt.get(0)).get(14).toString()%>" >
  60.                         <input name="ID" type="Hidden" value="<%=((Vector)vt.get(0)).get(0).toString()%>" >
  61.                         <input name="ApplyUserID" type="hidden" value="<%=((Vector)vt.get(0)).get(11).toString()%>">
  62.                         <input name="ConfirmUserID" type="hidden" value="<%=((Vector)vt.get(0)).get(13).toString()%>">
  63.                         <input name="ApplyTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(12).toString(),"yyyy-MM-dd HH:mm:ss")%>">
  64.                         <input name="CompanyTo" type="hidden" value="<%=((Vector)vt.get(0)).get(5).toString()%>">
  65.                         <input name="CityTo" type="hidden" value="<%=((Vector)vt.get(0)).get(6).toString()%>">
  66.                 <tr>
  67.                     <td align="right" valign="middle"><font color="#0A0A0A">请假事由:</font></td>
  68.                     <td align="left" valign="middle" nowrap>
  69.                         <input name="ErrandTitle" type="text" maxlength="150" size="37" value="<%=((Vector)vt.get(0)).get(7).toString()%>">
  70.                     </td>
  71.                 </tr>
  72.                 <tr>
  73.                     <td align="right" valign="middle"><font color="#0A0A0A">请假事由描述:</font></td>
  74.                     <td align="left" valign="middle" nowrap>
  75.                       <textarea name="ErrandContent" cols="30" rows="2"><%=((Vector)vt.get(0)).get(8).toString()%></textarea>
  76.                     </td>
  77.                 </tr>
  78.                         <input name="Personnels" type="hidden" value="<%=((Vector)vt.get(0)).get(9).toString()%>">
  79.                 <tr>
  80.                     <td align="right" valign="middle"><font color="#0A0A0A">实际开始时间:</font></td>
  81.                     <td align="left" valign="middle" nowrap>
  82.                     <input name="RealStartTime" type="hidden">
  83.                     <input name="PlanStartTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(1).toString(),"yyyy-MM-dd HH:mm:ss")%>">
  84.                     <input name="RealStartDateD" type="text" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  85.               <select name="RealStartDateT">
  86.                 <option value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"H")%>" selected><%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"H")%></option>
  87.                 <option value="6">6</option>
  88.                 <option value="7">7</option>
  89.                 <option value="8">8</option>
  90.                 <option value="9"<%if (StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"H").equalsIgnoreCase("")) out.print("selected");%>>9</option>
  91.                 <option value="10">10</option>
  92.                 <option value="11">11</option>
  93.                 <option value="12">12</option>
  94.                 <option value="13">13</option>
  95.                 <option value="14">14</option>
  96.                 <option value="15">15</option>
  97.                 <option value="16">16</option>
  98.                 <option value="17">17</option>
  99.                 <option value="18">18</option>
  100.                 <option value="19">19</option>
  101.                 <option value="20">20</option>
  102.               </select>
  103.               <font color="#0A0A0A">时</font></td>
  104.                 </tr>
  105.                 <tr>
  106.                     <td align="right" valign="middle"><font color="#0A0A0A">实际结束时间:</font></td>
  107.                     <td align="left" valign="middle" nowrap>
  108.                     <input name="RealEndTime" type="hidden">
  109.                     <input name="PlanEndTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(2).toString(),"yyyy-MM-dd HH:mm:ss")%>">
  110.                     <input name="RealEndDateD" type="text" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(4).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  111.               <select name="RealEndDateT">
  112.                 <option value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(4).toString(),"H")%>" selected><%=StringNew.GetDateString(((Vector)vt.get(0)).get(4).toString(),"H")%></option>
  113.                 <option value="6">6</option>
  114.                 <option value="7">7</option>
  115.                 <option value="8">8</option>
  116.                 <option value="9">9</option>
  117.                 <option value="10">10</option>
  118.                 <option value="11">11</option>
  119.                 <option value="12">12</option>
  120.                 <option value="13">13</option>
  121.                 <option value="14">14</option>
  122.                 <option value="15">15</option>
  123.                 <option value="16">16</option>
  124.                 <option value="17"<%if (StringNew.GetDateString(((Vector)vt.get(0)).get(4).toString(),"H").equalsIgnoreCase("")) out.print("selected");%>>17</option>
  125.                 <option value="18">18</option>
  126.                 <option value="19">19</option>
  127.                 <option value="20">20</option>
  128.               </select>
  129.               <font color="#0A0A0A">时</font></td>
  130.                 </tr>
  131.                 <tr>
  132.                     <td align="right" valign="middle"><font color="#0A0A0A">备注:</font></td>
  133.                     <td align="left" valign="middle" nowrap>
  134.                       <textarea name="Remark" cols="30" rows="2"><%=((Vector)vt.get(0)).get(10).toString()%></textarea>
  135.                     </td>
  136.                 </tr>
  137.                  <tr>
  138.                     <td align="right" valign="middle">&nbsp;</td>
  139.                     <td align="left" valign="middle" nowrap>
  140.                     </td>
  141.                 </tr>
  142.                 <tr>
  143.                     <td align="right" valign="middle">&nbsp;</td>
  144.                     <td align="left" valign="middle" nowrap>
  145.                         <input type="submit" value="修改">&nbsp;&nbsp; <input type="reset" value="重填">&nbsp;&nbsp; <input type="button" value="返回" onclick="window.location='LeaveApplyRecordManage.jsp?SysDirID=<%=iSysDirID%>';">
  146.                    </td>
  147.                 </tr>
  148.             </table>
  149.             </form>
  150.         </td>
  151.     </tr>
  152. </table>
  153. </body>
  154. </html>
  155. <%
  156. }
  157. else
  158. {
  159. %>
  160. <script language="JavaScript" type="text/JavaScript">
  161. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  162. history.back();
  163. </script>
  164. <%
  165. }
  166. }
  167. %>