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

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 intErrandApplyID = m_request.GetInt("ID");
  7. int iSysDirID = m_request.GetInt("SysDirID");
  8. if(intErrandApplyID<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(intErrandApplyID);
  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 checkEditErrandApply()
  31. {
  32.        if(document.EditErrandApply.CompanyTo.value=="")
  33.     {
  34.         alert("请输入出差目的单位名称!");
  35.         document.EditErrandApply.CompanyTo.focus();
  36.         return false;
  37.     }
  38.         if(!isDate(document.EditErrandApply.RealStartDateD.value))
  39.         {
  40.             alert("日期格式错误,请按照“2002-02-18”重新输入!");
  41.             document.EditErrandApply.RealStartDateD.focus();
  42.             return false;
  43.         }
  44.         if(!isDate(document.EditErrandApply.RealEndDateD.value))
  45.         {
  46.             alert("日期格式错误,请按照“2002-02-18”重新输入!");
  47.             document.EditErrandApply.RealEndDateD.focus();
  48.             return false;
  49.         }
  50. //计划开始时间,结束时间合成
  51.    document.EditErrandApply.RealStartTime.value = document.EditErrandApply.RealStartDateD.value + " "+
  52.                                                  document.EditErrandApply.RealStartDateT.value + ":00:00";
  53.    document.EditErrandApply.RealEndTime.value = document.EditErrandApply.RealEndDateD.value + " "+
  54.                                                  document.EditErrandApply.RealEndDateT.value + ":00:00";
  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.             <form name="EditErrandApply" action="/Operation/EditErrandApplyRecordAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkEditErrandApply();">
  63.             <table  border="0" cellpadding="0" cellspacing="0" width="90%">
  64.                 <tr>
  65.                     <td align="right" valign="middle"><font color="#0A0A0A">目的单位名称:</font></td>
  66.                     <td align="left" valign="middle" nowrap>
  67.                         <input name="SysDirID" type="Hidden" value="<%=iSysDirID%>" >
  68.                         <input name="ID" type="Hidden" value="<%=((Vector)vt.get(0)).get(0).toString()%>" >
  69.                         <input name="ApplyUserID" type="hidden" value="<%=((Vector)vt.get(0)).get(11).toString()%>">
  70.                         <input name="ConfirmUserID" type="hidden" value="<%=((Vector)vt.get(0)).get(13).toString()%>">
  71.                         <input name="ApplyTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(12).toString(),"yyyy-MM-dd HH:mm:ss")%>">
  72.                         <input name="CompanyTo" type="text" maxlength="150" size="37" value="<%=((Vector)vt.get(0)).get(5).toString()%>">
  73.                     </td>
  74.                 </tr>
  75.                 <tr>
  76.                     <td align="right" valign="middle"><font color="#0A0A0A">目的城市:</font></td>
  77.                     <td align="left" valign="middle" nowrap>
  78.                         <input name="CityTo" type="text" maxlength="60" size="37" value="<%=((Vector)vt.get(0)).get(6).toString()%>">
  79.                     </td>
  80.                 </tr>
  81.                 <tr>
  82.                     <td align="right" valign="middle"><font color="#0A0A0A">出差事由:</font></td>
  83.                     <td align="left" valign="middle" nowrap>
  84.                         <input name="ErrandTitle" type="text" maxlength="150" size="37" value="<%=((Vector)vt.get(0)).get(7).toString()%>">
  85.                     </td>
  86.                 </tr>
  87.                 <tr>
  88.                     <td align="right" valign="middle"><font color="#0A0A0A">出差事由描述:</font></td>
  89.                     <td align="left" valign="middle" nowrap>
  90.                       <textarea name="ErrandContent" cols="30" rows="2"><%=((Vector)vt.get(0)).get(8).toString()%></textarea>
  91.                     </td>
  92.                 </tr>
  93.                 <tr>
  94.                     <td align="right" valign="middle"><font color="#0A0A0A">出差人员:</font></td>
  95.                     <td align="left" valign="middle" nowrap>
  96.                         <input name="Personnels" type="text" maxlength="200" size="37" value="<%=((Vector)vt.get(0)).get(9).toString()%>">
  97.                     </td>
  98.                 </tr>
  99.                 <tr>
  100.                     <td align="right" valign="middle"><font color="#0A0A0A">实际开始时间:</font></td>
  101.                     <td align="left" valign="middle" nowrap>
  102.                     <input name="RealStartTime" type="hidden">
  103.                     <input name="PlanStartTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(1).toString(),"yyyy-MM-dd HH:mm:ss")%>">
  104.                     <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);">
  105.               <select name="RealStartDateT">
  106.                 <option value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"H")%>" selected><%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"H")%></option>
  107.                 <option value="6">6</option>
  108.                 <option value="7">7</option>
  109.                 <option value="8">8</option>
  110.                 <option value="9"<%if (StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"H").equalsIgnoreCase("")) out.print("selected");%>>9</option>
  111.                 <option value="10">10</option>
  112.                 <option value="11">11</option>
  113.                 <option value="12">12</option>
  114.                 <option value="13">13</option>
  115.                 <option value="14">14</option>
  116.                 <option value="15">15</option>
  117.                 <option value="16">16</option>
  118.                 <option value="17">17</option>
  119.                 <option value="18">18</option>
  120.                 <option value="19">19</option>
  121.                 <option value="20">20</option>
  122.               </select>
  123.               <font color="#0A0A0A">时</font></td>
  124.                 </tr>
  125.                 <tr>
  126.                     <td align="right" valign="middle"><font color="#0A0A0A">实际结束时间:</font></td>
  127.                     <td align="left" valign="middle" nowrap>
  128.                     <input name="RealEndTime" type="hidden">
  129.                     <input name="PlanEndTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(2).toString(),"yyyy-MM-dd HH:mm:ss")%>">
  130.                     <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);">
  131.               <select name="RealEndDateT">
  132.                 <option value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(4).toString(),"H")%>" selected><%=StringNew.GetDateString(((Vector)vt.get(0)).get(4).toString(),"H")%></option>
  133.                 <option value="6">6</option>
  134.                 <option value="7">7</option>
  135.                 <option value="8">8</option>
  136.                 <option value="9">9</option>
  137.                 <option value="10">10</option>
  138.                 <option value="11">11</option>
  139.                 <option value="12">12</option>
  140.                 <option value="13">13</option>
  141.                 <option value="14">14</option>
  142.                 <option value="15">15</option>
  143.                 <option value="16">16</option>
  144.                 <option value="17"<%if (StringNew.GetDateString(((Vector)vt.get(0)).get(4).toString(),"H").equalsIgnoreCase("")) out.print("selected");%>>17</option>
  145.                 <option value="18">18</option>
  146.                 <option value="19">19</option>
  147.                 <option value="20">20</option>
  148.               </select>
  149.               <font color="#0A0A0A">时</font></td>
  150.                 </tr>
  151.                 <tr>
  152.                     <td align="right" valign="middle"><font color="#0A0A0A">备注:</font></td>
  153.                     <td align="left" valign="middle" nowrap>
  154.                       <textarea name="Remark" cols="30" rows="2"><%=((Vector)vt.get(0)).get(10).toString()%></textarea>
  155.                     </td>
  156.                 </tr>
  157.                  <tr>
  158.                     <td align="right" valign="middle">&nbsp;</td>
  159.                     <td align="left" valign="middle" nowrap>
  160.                     </td>
  161.                 </tr>
  162.                 <tr>
  163.                     <td align="right" valign="middle">&nbsp;</td>
  164.                     <td align="left" valign="middle" nowrap>
  165.                         <input type="submit" value="修改">&nbsp;&nbsp; <input type="reset" value="重填">&nbsp;&nbsp; <input type="button" value="返回" onclick="window.location='ErrandApplyRecordManage.jsp?SysDirID=<%=iSysDirID%>';">
  166.                    </td>
  167.                 </tr>
  168.             </table>
  169.             </form>
  170.         </td>
  171.     </tr>
  172. </table>
  173. </body>
  174. </html>
  175. <%
  176. }
  177. else
  178. {
  179. %>
  180. <script language="JavaScript" type="text/JavaScript">
  181. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  182. history.back();
  183. </script>
  184. <%
  185. }
  186. }
  187. %>