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

电子政务应用

开发平台:

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