modify_archive.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:14k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  3. <%@ taglib uri="/vnex_archive.tld" prefix="archive" %>
  4. <%@ page import="java.lang.*"%>
  5. <%@ page import="java.sql.Timestamp"%>
  6. <%@ page import="java.util.Calendar"%>
  7. <%@ page import="com.vnex.intranet.util.TimeStamp"%>
  8. <%@ page import="com.vnex.intranet.util.FieldUtil"%>
  9. <%@ page import="com.vnex.intranet.archives.value.ArchiveValueBean"%>
  10. <jsp:useBean id="archiveProxy" class="com.vnex.intranet.archives.proxy.ArchiveProxyBean" scope="session" /> 
  11. <%
  12. String str = request.getParameter("archiveId");
  13. ArchiveValueBean archiveInfo = archiveProxy.selectArchive((new Integer(str).intValue()));
  14. String createDate = "";
  15. int i;
  16. String year = "";
  17.         String month = "";
  18.         String day = "";
  19.         String disabled = "";
  20. if (archiveInfo.getCreateDate() != null)
  21. {
  22.     Calendar cal = archiveInfo.getCreateDate();
  23.     year = ""+cal.get(Calendar.YEAR);
  24.     int m = cal.get(Calendar.MONTH)+1;
  25.     int d = cal.get(Calendar.DAY_OF_MONTH);
  26.     month = m>=10? ""+m:"0"+m;
  27.     day = d>=10? ""+d:"0"+d;
  28.     createDate  = year + "-" + month + "-" + day;
  29. }
  30. if(archiveInfo.getIsBorrowed() == 1)
  31.    disabled = "disabled";
  32. %>
  33. <script Language="JavaScript" src="/vnex/util/Popup.js"></script>
  34. <script language="JavaScript" src="/vnex/util/validate.js"></script>
  35. <script language=JavaScript>
  36. function isDateValid(form)
  37. {
  38. if (! isInteger(form.copyNum.value))
  39. {
  40. alert("复印份数必须是整数");
  41. form.copyNum.focus();
  42. return false;
  43. }
  44. if (! isInteger(form.printNum.value))
  45. {
  46. alert("打印份数必须是整数");
  47. form.printNum.focus();
  48. return false;
  49. }
  50. if (form.archiveTitle.value.length == 0)
  51. {
  52. alert("档案标题不能为空!");
  53. form.archiveTitle.focus();
  54. return false;
  55. }
  56. str = form.archiveTitle.value;
  57. if (str.substring(0,1) == " ")
  58. {
  59. alert("标题开头不能是空格!");
  60. form.archiveTitle.focus();
  61. return false;
  62. }
  63. if (form.contents.value.length > 250)
  64. {
  65. alert("内容概要不能超过250个文字!");
  66. return false;
  67. }
  68. if (form.leaderNotes.value.length > 250)
  69. {
  70. alert("领导批示不能超过250个文字!");
  71. form.leaderNotes.focus();
  72. return false;
  73. }
  74. if("<%=(com.vnex.intranet.pub.BaseJdbcDAO.getDBSystemDate()).toString()%>" < form.createTime.value)
  75.     {        
  76.         alert("发文日期不能在本日之后");
  77.         return false;
  78.     }
  79. return true;
  80. }
  81. function toCheck(form,ctrlField,theField)
  82. {
  83. if(ctrlField.checked)
  84.      theField.disabled=false;
  85.     else
  86.     {
  87.        theField.value = "";
  88.        theField.disabled=true;   
  89.     }   
  90. }
  91. function toDetail(form)
  92. {
  93. form.action="/mainctrl/archive/archiveDetail?archiveId=<%=request.getParameter("archiveId")%>";
  94. form.submit();
  95. }
  96. function toSuccess(form)
  97. {
  98. if (! isDateValid(form))
  99. return false;
  100. form.action = "modifyArchiveSuccess?archiveId=<%=request.getParameter("archiveId")%>";
  101. form.submit();
  102. }
  103. </script>
  104. <HTML>
  105. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  106. <script language=JavaScript>
  107. </script>
  108. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  109. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_archives.js"></script>
  110. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  111. <DIV align=center>
  112. <form name="form1" method="post">
  113.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  114.     <TBODY> 
  115.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  116.       <TR> 
  117.         <TD colSpan=3 align="center"><br>
  118.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  119.             <tr> 
  120.               <td align="center" colspan="2" bgcolor="#FFFFFF"> 
  121.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  122.                   <tr bgcolor="#666666"> 
  123.                       <td colspan="2"><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;<a href="/mainctrl/archive/todayArchives"><font color="#ffffff">档案管理</font></a>&gt;&gt;<a href="/mainctrl/archive/archiveDetail?archiveId=<%=request.getParameter("archiveId")%>"><font color="#ffffff">档案信息</font></a>&gt;&gt;修改档案</font>
  124.                       </td>
  125.                   </tr>
  126.                 </table>
  127.                 <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  128.                   <tr bgcolor="#fafafa">
  129.                       <td width="18%">
  130.                         <div align="left"><strong>&nbsp;档案类型:</strong></div>
  131.                       </td>
  132.                       <td width="86%">
  133.                         <div align="left">
  134.                           <select name="archiveTypeId" size="1">
  135.                             <archive:archiveType archiveTypeId='<%= "" + archiveInfo.getArchiveTypeId()%>'/>
  136.                           </select>
  137.                         </div>
  138.                       </td>
  139.                    </tr>
  140.                    <tr bgcolor="#e0e0e0"> 
  141.                       <td width="18%"> 
  142.                         <div align="left"><strong>&nbsp;存档日期:</strong></div>
  143.                       </td>
  144.                       <td width="86%"> 
  145.                         <div align="left"> 
  146.                           <%= TimeStamp.formatCalendar(1,archiveInfo.getSaveArchiveDate())%>
  147.                         </div>
  148.                       </td>
  149.                    </tr>
  150.                    <tr bgcolor="#fafafa"> 
  151.                       <td width="18%"> 
  152.                          <div align="left"><strong>&nbsp;顺序号:</strong></div>
  153.                       </td>
  154.                       <td width="86%">
  155.                          <%= archiveInfo.getArchiveDisplayId()%>
  156.                       </td>
  157.                    </tr>
  158.                    <tr bgcolor="#e0e0e0"> 
  159.                       <td width="18%"> 
  160.                          <div align="left"><strong>&nbsp;收件人:</strong></div>
  161.                       </td>
  162.                       <td width="84%"> 
  163.                           <select name="receiverId" size="1">
  164.                             <archive:employeeTag empId='<%="" + archiveInfo.getReceiverId()%>' />
  165.                           </select>
  166.                       </td>
  167.                    </tr>
  168.                    <tr bgcolor="#fafafa">
  169.                       <td width="15%"><strong>&nbsp;送存人:</strong></td>
  170.                       <td>
  171.                            <input type="text" name="sender" size="15" class="text" maxlength=12
  172.                            value="<%= FieldUtil.filterQuotTag(archiveInfo.getSender())%>">
  173.                       </td>
  174.                    </tr>
  175.                    <tr bgcolor="#e0e0e0"> 
  176.                       <td width="18%"> 
  177.                         <div align="left"><strong>&nbsp;文件来源:</strong></div>
  178.                       </td>
  179.                       <td width="86%"> 
  180.                         <div align="left"> 
  181.                          <select class=choice name="fileSourceId" >
  182.                           <archive:fileSourceTag unitId='<%= "" + archiveInfo.getFileSourceId()%>'/>
  183.                          </select>
  184.                         </div>
  185.                       </td>
  186.                    </tr>
  187.                    <tr bgcolor="#fafafa"> 
  188.                       <td width="18%"> 
  189.                         <div align="left"><strong>&nbsp;发文日期:</strong></div>
  190.                       </td>
  191.                       <td width="86%"> 
  192.                          <div align="left">
  193.                           <input type="text" name="createTime" readonly size="30" class="text" value=<%=createDate%> >
  194.                           <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择日期" onClick="fPopUpCalendarDlg(createTime);return false">
  195.                          </div>
  196.                       </td>
  197.                    </tr>
  198.                    <tr bgcolor="#e0e0e0"> 
  199.                       <td width="18%"> 
  200.                         <div align="left"><strong>&nbsp;标题:</strong></div>
  201.                       </td>
  202.                       <td width="86%"> 
  203.                         <div align="left"> 
  204.                          <input type="text" name="archiveTitle" size="30" class="text" maxlength=50
  205.                           value="<%=FieldUtil.filterQuotTag(archiveInfo.getArchiveTitle())%>">&nbsp;*&nbsp;(注:带*为必填内容)
  206.                         </div>
  207.                       </td>
  208.                    </tr>
  209.                    <tr bgcolor="#fafafa">
  210.                       <td width="18%"><strong>&nbsp;主题词:</strong></td>
  211.                       <td>
  212.                          <input type="text" name="archiveKeyword" size="30" class="text" maxlength=250
  213.                           value="<%=FieldUtil.filterQuotTag(archiveInfo.getArchiveKeyword())%>">
  214.                         (逗号间隔,例如:建设,网络,......北京) </td>
  215.                   </tr>
  216.                   <tr bgcolor="#e0e0e0"> 
  217.                       <td width="18%"> 
  218.                         <div align="left"><strong>&nbsp;内容概要:</strong></div>
  219.                       </td>
  220.                       <td width="86%"> 
  221.                         <div align="left"> 
  222.                           <textarea rows="10" name="contents" cols="49" maxlength="250" wrap="VIRTUAL"><%=archiveInfo.getContents()%></textarea>
  223.                         </div>
  224.                       </td>
  225.                   </tr>
  226.                   
  227.                <tr bgcolor="#fafafa"> 
  228.                    <td width="18%"> 
  229.                      <div align="left"><strong>&nbsp;保密级别:</strong></div>
  230.                    </td>
  231.                    <td width="86%"> 
  232.                      <div align="left"> 
  233.                   <select class=choice  name="safetyLevel">
  234.                   <% for (i=1; i<=5;i++) 
  235.                      {
  236.                       if (i==archiveInfo.getSafetyLevel())
  237.                       { 
  238.                       %> 
  239.                        <option selected><%=i%></option>                      
  240.                       <%}else{%>
  241.                         <option><%=i%></option>
  242.                       <%}}%>
  243.                        </select>
  244.                      </div>
  245.                    </td>
  246.                </tr>
  247.                <tr bgcolor="#e0e0e0"> 
  248.                    <td width="18%"> 
  249.                      <div align="left"><strong>&nbsp;可否复制:</strong></div>
  250.                    </td>
  251.                    <td width="86%"> 
  252.                      <div align="left"> 
  253.                        <input type="checkbox" name="copyPermission" onChange=toCheck(form1,this,copyNum) value="1" <%= (archiveInfo.getCopyPermission()==1)?("checked"):("unchecked")%>>
  254.                      是 
  255.                        </div>
  256.                   </td>
  257.               </tr>
  258.               <tr bgcolor="#fafafa"> 
  259.                   <td width="18%"> 
  260.                     <div align="left"><strong>&nbsp;可复制份数:</strong></div>
  261.                   </td>
  262.                   <td width="86%"> 
  263.                     <div align="left"> 
  264.                      <input type="text" name="copyNum" size="15" class="text" maxlength=5 <%= (archiveInfo.getCopyPermission()==1)?(""):("disabled")%>
  265.                       value = <%=archiveInfo.getCopyNum()%>>
  266.                     </div>
  267.                   </td>
  268.               </tr>
  269.               <tr bgcolor="#e0e0e0"> 
  270.                   <td width="18%"> 
  271.                    <div align="left"><strong>&nbsp;可否打印:</strong></div>
  272.                   </td>
  273.                   <td width="86%"> 
  274.                    <div align="left"> 
  275.                     <input type="checkbox" name="printPermission" value="1" onChange=toCheck(form1,this,printNum) <%= (archiveInfo.getPrintPermission()==1)?("checked"):("unchecked")%> >
  276.                    是 
  277.                     </div>
  278.                  </td>
  279.               </tr>
  280.               <tr bgcolor="#fafafa"> 
  281.                  <td width="18%"> 
  282.                    <div align="left"><strong>&nbsp;可打印份数:</strong></div>
  283.                  </td>
  284.                  <td width="86%"> 
  285.                    <div align="left"> 
  286.                     <input type="text" name="printNum" size="15" class="text" maxlength=5 <%=(archiveInfo.getPrintPermission()==1)?(""):("disabled")%> 
  287.                      value = <%=archiveInfo.getPrintNum()%>>
  288.                    </div>
  289.                  </td>
  290.               </tr>
  291.               <tr bgcolor="#e0e0e0"> 
  292.                  <td width="18%"> 
  293.                    <div align="left"><strong>&nbsp;可否借阅:</strong></div>
  294.                  </td>
  295.                  <td width="86%"> 
  296.                    <div align="left"> 
  297.                     <input type="checkbox" name="lendPermission"  value="1" <%= (archiveInfo.getLendPermission()==1)?("checked"):("unchecked")%> <%=disabled%>>
  298.                    是 
  299.                      </div>
  300.                  </td>
  301.              </tr>
  302.              <tr bgcolor="#fafafa"> 
  303.                  <td width="18%"> 
  304.                    <div align="left"><strong>&nbsp;已经传阅:</strong></div>
  305.                  </td>
  306.                  <td width="86%"> 
  307.                    <div align="left"> 
  308.                     <input type="checkbox" name="sendViewFlag" value="1"  <%=(archiveInfo.getSendViewFlag()==1)?"checked":"unchecked"%>>
  309.                    是 
  310.                      </div>
  311.                  </td>
  312.              </tr>
  313.              <tr bgcolor="#e0e0e0"> 
  314.                  <td width="18%"> 
  315.                    <div align="left"><strong>&nbsp;领导批示:</strong></div>
  316.                  </td>
  317.                  <td width="86%"> 
  318.                    <div align="left"> 
  319.                      <textarea rows="10" name="leaderNotes" cols="49" wrap="VIRTUAL"><%=archiveInfo.getLeaderNotes()%></textarea>
  320.                    </div>
  321.                  </td>
  322.              </tr>
  323.              <tr bgcolor="#fafafa">
  324.                 <td colspan="2" align="center" height="30">
  325.             <input onClick=toSuccess(form1) type="button" value="保存" name="B21" class="text">
  326.             &nbsp;&nbsp;
  327.             <input type="reset" value="重置" name="B212" class="text">
  328.             &nbsp;&nbsp;
  329.             <input onClick=toDetail(this.form) type="button" value="返回" name="B21" class="text">
  330.             </td>
  331.          </tr>
  332.           </table>
  333.           </td>
  334.           </tr>
  335.          </table>
  336.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  337.        </TD>
  338.      </TR>
  339.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  340.     </TBODY> 
  341.   </TABLE>
  342.     <BR>
  343.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  344. </form>
  345. </DIV>
  346. </BODY>
  347. </HTML>