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

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 intCalendarPlansID = m_request.GetInt("ID");
  7. if(intCalendarPlansID<1)
  8. {
  9. %>
  10. <script language="JavaScript" type="text/JavaScript">
  11. alert("请选择正确的日程计划,修改失败!");
  12. history.back();
  13. </script>
  14. <%
  15. }
  16. else
  17. {
  18. int intUserID = m_session.GetInt("UserID");
  19. Vector vt = CalendarPlansManager.getRecordByID(intCalendarPlansID,intUserID);
  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 checkEditCalendarPlans()
  31. {
  32.     if(document.editcalendarplans.PlanTitle.value=='')
  33.     {
  34.         alert("请输入计划主题!");
  35.         document.editcalendarplans.PlanTitle.focus();
  36.         return false;
  37.     }
  38.  if(document.editcalendarplans.PlanBeginDate.value!="")
  39.     {
  40.       if(!isDate(document.editcalendarplans.PlanBeginDate.value))
  41.       {
  42.           alert("日期格式错误,请按照“2002-02-18”重新输入!");
  43.           document.editcalendarplans.PlanBeginDate.focus();
  44.           return false;
  45.       }
  46.     }
  47.     if(document.editcalendarplans.PlanEndDate.value!="")
  48.     {
  49.       if(!isDate(document.editcalendarplans.PlanEndDate.value))
  50.       {
  51.           alert("日期格式错误,请按照“2002-02-18”重新输入!");
  52.           document.editcalendarplans.PlanEndDate.focus();
  53.           return false;
  54.       }
  55.     }
  56.     if(document.editcalendarplans.RealBeginDate.value!="")
  57.     {
  58.       if(!isDate(document.editcalendarplans.RealBeginDate.value))
  59.       {
  60.           alert("日期格式错误,请按照“2002-02-18”重新输入!");
  61.           document.editcalendarplans.PlanBeginDate.focus();
  62.           return false;
  63.       }
  64.     }
  65.     if(document.editcalendarplans.RealEndDate.value!="")
  66.     {
  67.       if(!isDate(document.editcalendarplans.RealEndDate.value))
  68.       {
  69.           alert("日期格式错误,请按照“2002-02-18”重新输入!");
  70.           document.editcalendarplans.RealEndDate.focus();
  71.           return false;
  72.       }
  73.     }
  74.     if(!isDate(document.editcalendarplans.AddTime.value))
  75.       {
  76.           alert("日期格式错误,请按照“2002-02-18”重新输入!");
  77.           document.editcalendarplans.AddTime.focus();
  78.           return false;
  79.       }
  80. }
  81. </script>
  82. </head>
  83. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  84. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  85.     <tr>
  86.         <td align="center" valign="top"><p>&nbsp;</p>
  87.           <table width="90%" border="0" cellpadding="0" cellspacing="0">
  88.                 <tr align="center" valign="middle">
  89.                 <th nowrap colspan=2 align="center"><font color="#000000">修 改 日 程 计 划</font></th>
  90.               </tr>
  91.                <tr><td>&nbsp;</td>
  92.                 </tr>
  93.               </table>
  94.             <form name="editcalendarplans" action="EditCalendarPlansAction.jsp" method="post" onSubmit="javascript:return checkEditCalendarPlans();">
  95.             <table  border="1" cellpadding="1" cellspacing="1" width="90%">
  96.                 <tr>
  97.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">计&nbsp;划&nbsp;主&nbsp;题:&nbsp;</font></td>
  98.                     <td align="left" valign="middle" colspan="3" nowrap>
  99.                         &nbsp;<input name="PlanTitle" type="text" maxlength="50" size="70" value="<%=((Vector)vt.get(0)).get(2).toString()%>">
  100.                         <input name="ID" type="Hidden" value="<%=((Vector)vt.get(0)).get(0).toString()%>" >
  101.                         <input name="UserID" type="hidden" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
  102.                     </td>
  103.                 </tr>
  104.                 <tr>
  105.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">计&nbsp;划&nbsp;内&nbsp;容:&nbsp;</font></td>
  106.                     <td align="left" valign="middle" colspan="3" nowrap>
  107.                       &nbsp;<textarea name="PlanContent" cols="80" rows="4"><%=((Vector)vt.get(0)).get(3).toString()%></textarea>
  108.                     </td>
  109.                 </tr>
  110.                 <tr>
  111.                     <tr>
  112.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">增&nbsp;加&nbsp;时&nbsp;间:&nbsp;</font></td>
  113.                     <td align="left" valign="middle" width="35%" nowrap>
  114.                     &nbsp;<input name="AddTime" type="text" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(4).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="20" size="20" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  115.                    </td>
  116.                    <td align="right" valign="middle" width="14%"><font color="#0A0A0A">重&nbsp;要&nbsp;等&nbsp;级:&nbsp;</font></td>
  117.                     <td align="left" valign="middle" width="35%" nowrap>
  118.                     &nbsp;<select name="ImportLevel" >
  119.                         <option value="1" <%if(((Vector)vt.get(0)).get(9).toString().equalsIgnoreCase("1")) out.print("selected");%>>一级</option>
  120.                         <option value="2" <%if(((Vector)vt.get(0)).get(9).toString().equalsIgnoreCase("2")) out.print("selected");%>>二级</option>
  121.                         <option value="3" <%if(((Vector)vt.get(0)).get(9).toString().equalsIgnoreCase("3")) out.print("selected");%>>三级</option>
  122.                         <option value="4" <%if(((Vector)vt.get(0)).get(9).toString().equalsIgnoreCase("4")) out.print("selected");%>>四级</option>
  123.                         <option value="5" <%if(((Vector)vt.get(0)).get(9).toString().equalsIgnoreCase("5")) out.print("selected");%>>五级</option>
  124.                     </select>
  125.                     </td>
  126.                 </tr>
  127.                 <tr>
  128.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">计划开始时间:&nbsp;</font></td>
  129.                     <td align="left" valign="middle" width="35%" nowrap>
  130.                         &nbsp;<input name="PlanBeginDate" type="text" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(5).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="20" size="20" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  131.                    </td>
  132.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">计划结束时间:&nbsp;</font></td>
  133.                     <td align="left" valign="middle" width="35%" nowrap>
  134.                         &nbsp;<input name="PlanEndDate" type="text" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(6).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="20" size="20" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  135.                    </td>
  136.                 </tr>
  137.                 <tr>
  138.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">实际开始时间:&nbsp;</font></td>
  139.                     <td align="left" valign="middle" width="35%" nowrap>
  140.                         &nbsp;<input name="RealBeginDate" type="text" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(7).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="20" size="20" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  141.                    </td>
  142.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">实际结束时间:&nbsp;</font></td>
  143.                     <td align="left" valign="middle" width="35%" nowrap>
  144.                         &nbsp;<input name="RealEndDate" type="text" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(8).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="20" size="20" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  145.                    </td>
  146.                 </tr>
  147.                 <tr>
  148.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">提醒时间间隔:&nbsp;</font></td>
  149.                     <td align="left" valign="middle" width="35%" nowrap>
  150.                     &nbsp;<select name="RemindInterval" >
  151.                         <option value="1" <%if(((Vector)vt.get(0)).get(10).toString().equalsIgnoreCase("1"))out.print("selected");%>>一小时</option>
  152.                         <option value="2" <%if(((Vector)vt.get(0)).get(10).toString().equalsIgnoreCase("2"))out.print("selected");%>>二小时</option>
  153.                         <option value="3" <%if(((Vector)vt.get(0)).get(10).toString().equalsIgnoreCase("3"))out.print("selected");%>>三小时</option>
  154.                         <option value="4" <%if(((Vector)vt.get(0)).get(10).toString().equalsIgnoreCase("4"))out.print("selected");%>>四小时</option>
  155.                         <option value="5" <%if(((Vector)vt.get(0)).get(10).toString().equalsIgnoreCase("5"))out.print("selected");%>>五小时</option>
  156.                         <option value="8" <%if(((Vector)vt.get(0)).get(10).toString().equalsIgnoreCase("8"))out.print("selected");%>>八小时</option>
  157.                         <option value="10" <%if(((Vector)vt.get(0)).get(10).toString().equalsIgnoreCase("10"))out.print("selected");%>>十小时</option>
  158.                         <option value="24" <%if(((Vector)vt.get(0)).get(10).toString().equalsIgnoreCase("24"))out.print("selected");%>>二十四小时</option>
  159.                     </select>
  160.                     </td>
  161.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">是否已经完成:&nbsp;</font></td>
  162.                     <td align="left" valign="middle" width="35%" nowrap>
  163.                         &nbsp;<font color="#0A0A0A"><input name="IsFinished" type="radio" value="1" <%if(((Vector)vt.get(0)).get(11).toString().equalsIgnoreCase("true"))out.print("checked");%>>已完成&nbsp; <input name="IsFinished" type="radio" value="0" <%if(((Vector)vt.get(0)).get(11).toString().equalsIgnoreCase("false"))out.print("checked");%>>未完成</font>
  164.                     </td>
  165.                 </tr>
  166.                 <tr>
  167.                    <td align="right" valign="middle" width="14%"><font color="#0A0A0A">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:&nbsp;</font></td>
  168.                     <td align="left" valign="middle" colspan="3" nowrap>
  169.                       &nbsp;<textarea name="Remark" cols="80" rows="4"><%=((Vector)vt.get(0)).get(12).toString()%></textarea>
  170.                     </td>
  171.                 </tr>
  172.             </table>
  173.              <table border="0" width="90%">
  174.               <tr>
  175.                   <td>&nbsp;
  176.                   </td>
  177.                 </tr>
  178.               <tr>
  179.                     <td align="right" valign="middle">&nbsp;</td>
  180.                     <td align="right" valign="middle" nowrap>
  181.                         <input type="submit" value="修 改" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;<input type="reset" value="重 填" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;<input type="button" value="返 回" onclick="window.location='CalendarPlansManage.jsp';" style="background-color: #FFFFFF; border: 1 solid #000000">
  182.                    </td>
  183.                 </tr>
  184.             </table>
  185.             </form>
  186.         </td>
  187.     </tr>
  188. </table>
  189. </body>
  190. </html>
  191. <%
  192. }
  193. else
  194. {
  195. %>
  196. <script language="JavaScript" type="text/JavaScript">
  197. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  198. history.back();
  199. </script>
  200. <%
  201. }
  202. }
  203. %>