create_archive.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.util.*" %>
  5. <%@ page import="com.vnex.intranet.util.TimeStamp" %>
  6. <%@ page import="com.vnex.intranet.pub.BaseJdbcDAO" %>
  7. <jsp:useBean id="archiveBean" scope="session" class="com.vnex.intranet.archives.value.ArchiveValueBean" />
  8. <%
  9.     String archiveTypeId = "0";
  10.     if(archiveBean.getArchiveTypeId() != -1)
  11.        archiveTypeId = ""+archiveBean.getArchiveTypeId();
  12.     String saveDate = TimeStamp.formatCalendar(TimeStamp.YMD, TimeStamp.convertTimestampToCalendar(BaseJdbcDAO.getDBSystemDate()));
  13. %>
  14. <script Language="JavaScript" src="/vnex/util/Popup.js"></script>
  15. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  16. <script language="javascript" src="/vnex/validate.js"></script>
  17. <script language=javascript>
  18. function enableIt(ctrlField, theField)
  19. {
  20.    if(ctrlField.checked)
  21.       theField.disabled=false;
  22.    else
  23.    {
  24.       theField.value = "";
  25.       theField.disabled=true;   
  26.    }   
  27. }
  28. function createArchive(form)
  29. {
  30.   if(checkIt(form))
  31.   {
  32.     form.action="/mainctrl/archive/createArchiveProcess";
  33.     form.submit();
  34.   }  
  35. }
  36. function uploadFile(form)
  37. {
  38.    form.action="/mainctrl/archive/uploadArchive";
  39.    form.submit();
  40. }
  41. function checkIt(form)
  42. {
  43.   if(!isEmpty(form.archiveTitle.value))
  44.   {
  45.       if(isInvalidateLen(form.archiveTitle.value, 100))
  46.       {
  47.          alert("标题不要超过25个汉字或100个英文字符");
  48.          form.archiveTitle.focus();
  49.          return false;
  50.       }
  51.       if (form.archiveTitle.value.substring(0,1) == " ")
  52.   {
  53. alert("标题开头不能是空格!");
  54. form.archiveTitle.focus();
  55. return false;
  56.       }
  57.   }
  58.   else
  59.   {
  60.       alert("请输入标题");
  61.   form.archiveTitle.focus();
  62.       return false;
  63.   }
  64.   if(!isEmpty(form.archiveKeyword.value))
  65.   {
  66.      if(isInvalidateLen(form.archiveKeyword.value, 1000))
  67.      {
  68.         alert("主题词不要超过250个汉字或1000个英文字符");
  69. form.archiveKeyword.focus();
  70.         return false;
  71.      }
  72.   }
  73.   if(!isEmpty(form.contents.value))
  74.   {
  75.      if(isInvalidateLen(form.contents.value, 1000))
  76.      {
  77.         alert("内容概要不要超过250个汉字或1000个英文字符");
  78. form.contents.focus();
  79.         return false;
  80.      }
  81.   }
  82.   if(!isEmpty(form.leaderNotes.value))
  83.   {
  84.      if(isInvalidateLen(form.leaderNotes.value, 1000))
  85.      {
  86.         alert("领导批示不要超过250个汉字或1000个英文字符");
  87. form.leaderNotes.focus();
  88.         return false;
  89.      }
  90.   }
  91.   if(!isEmpty(form.copyNum.value))
  92.   {
  93.      if(!isInteger(form.copyNum.value))
  94.      {
  95.         alert("复制份数只能是数字");
  96. form.copyNum.focus();
  97.         return false;
  98.      }
  99.   }
  100.   if(!isEmpty(form.printNum.value))
  101.   {
  102.      if(!isInteger(form.printNum.value))
  103.      {
  104.         alert("打印份数只能是数字");
  105. form.printNum.focus();
  106.         return false;
  107.      }
  108.   }
  109.   if(!isEmpty(form.createDate.value))
  110.   {
  111.       if("<%=(com.vnex.intranet.pub.BaseJdbcDAO.getDBSystemDate()).toString()%>"<form.createDate.value)
  112.       {
  113.         alert("发文日期不能在本日之后");
  114.         return false;
  115.       }
  116.   }   
  117.   
  118.   return true;
  119. }
  120. </script>
  121. <HTML>
  122. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  123. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  124. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_archives.js"></script>
  125. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  126. <DIV align=center>
  127. <form name="form1" method="post">
  128.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  129.     <TBODY> 
  130.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  131.     <TR> 
  132.         <TD colSpan=3 align="center"><br>
  133.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  134.             <tr> 
  135.               <td align="center" colspan="2" bgcolor="#FFFFFF"> 
  136.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  137.                   <tr bgcolor="#666666"> 
  138.                       <td><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;新建档案</font>
  139.                   </tr>
  140.                 </table>
  141.                 <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  142.                    <tr bgcolor="#e0e0e0">
  143.                       <td width="18%">
  144.                         <div align="left"><strong>&nbsp;档案类型:</strong></div>
  145.                       </td>
  146.                       <td width="86%">
  147.                         <div align="left">
  148.                           <select name="archiveTypeId" size="1">
  149.                             <archive:archiveType archiveTypeId="<%=archiveTypeId%>"/>
  150.                           </select>
  151.                         </div>
  152.                       </td>
  153.                    </tr>
  154.                    <tr bgcolor="#fafafa"> 
  155.                       <td width="18%"> 
  156.                         <div align="left"><strong>&nbsp;存档日期:</strong></div>
  157.                       </td>
  158.                       <td width="86%"> 
  159.                         <div align="left"><%=saveDate%></div>
  160.                       </td>
  161.                    </tr>
  162.                    <tr bgcolor="#e0e0e0"> 
  163.                       <td width="18%"> 
  164.                          <div align="left"><strong>&nbsp;收件人:</strong></div>
  165.                       </td>
  166.                       <td width="84%"> 
  167.                           <select name="receiverId" size="1">
  168.                             <archive:employeeTag />
  169.                           </select>
  170.                       </td>
  171.                    </tr>
  172.                    <tr bgcolor="#fafafa">
  173.                        <td width="18%"><strong>&nbsp;送存人:</strong></td>
  174.                        <td>
  175.                            <input type="text" name="sender" maxlength="8" size="15" class="text" value="<%=archiveBean.getSender()%>">
  176.                       </td>
  177.                    </tr>
  178.                    <tr bgcolor="#e0e0e0"> 
  179.                       <td width="18%"> 
  180.                         <div align="left"><strong>&nbsp;文件来源:</strong></div>
  181.                       </td>
  182.                       <td width="86%"> 
  183.                         <div align="left"> 
  184.                           <select name="fileSourceId" size="1">
  185.                            <archive:fileSourceTag />
  186.                           </select>  
  187.                         </div>
  188.                       </td>
  189.                    </tr>
  190.                    <tr bgcolor="#fafafa">  
  191.                       <td width="18%"> 
  192.                         <div align="left"><strong>&nbsp;发文日期:</strong></div>
  193.                       </td>
  194.                       <td width="86%"> 
  195.                          <div align="left">
  196.                           <input type="text" name="createDate" readonly size="30" class="text">
  197.                           <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择档案发文日期" onClick="fPopUpCalendarDlg(createDate);return false">
  198.                          </div>
  199.                       </td>
  200.                    </tr>
  201.                    <tr bgcolor="#e0e0e0"> 
  202.                       <td width="18%"> 
  203.                         <div align="left"><strong>&nbsp;标题:</strong></div>
  204.                       </td>
  205.                       <td width="86%"> 
  206.                         <div align="left"> 
  207.                          <input type="text" name="archiveTitle" size="30" class="text">&nbsp;*&nbsp;(注:带*为必填内容)
  208.                         </div>
  209.                       </td>
  210.                    </tr>
  211.                    <tr bgcolor="#fafafa">
  212.                       <td width="18%"><strong>&nbsp;主题词:</strong></td>
  213.                       <td>
  214.                          <input type="text" name="archiveKeyword" size="30" class="text">
  215.                         (逗号间隔,例如:建设,网络,......北京) </td>
  216.                   </tr>
  217.                   <tr bgcolor="#e0e0e0"> 
  218.                       <td width="18%"> 
  219.                         <div align="left"><strong>&nbsp;内容概要:</strong></div>
  220.                       </td>
  221.                       <td width="86%"> 
  222.                         <div align="left"> 
  223.                           <textarea rows="5" name="contents" cols="59" wrap="VIRTUAL"></textarea>
  224.                         </div>
  225.                       </td>
  226.                   </tr>
  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.                          <option>5</option>
  235.                          <option>4</option>
  236.                          <option selected>3</option>
  237.                          <option>2</option>
  238.                          <option>1</option>
  239.                        </select>
  240.                      </div>
  241.                    </td>
  242.                </tr>
  243.                <tr bgcolor="#e0e0e0"> 
  244.                    <td width="18%"> 
  245.                      <div align="left"><strong>&nbsp;可否复制:</strong></div>
  246.                    </td>
  247.                    <td width="86%"> 
  248.                        <input type="checkbox" name="copyPermission" value="1" onclick="enableIt(copyPermission, copyNum)">
  249.                      是 
  250.                   </td>
  251.               </tr>
  252.               <tr bgcolor="#fafafa"> 
  253.                   <td width="18%"> 
  254.                     <div align="left"><strong>&nbsp;可复制份数:</strong></div>
  255.                   </td>
  256.                   <td width="86%"> 
  257.                     <div align="left"> 
  258.                      <input type="text" name="copyNum" disabled size="15" class="text"  maxlength="5">
  259.                     </div>
  260.                   </td>
  261.               </tr>
  262.               <tr bgcolor="#e0e0e0"> 
  263.                   <td width="18%"> 
  264.                    <div align="left"><strong>&nbsp;可否打印:</strong></div>
  265.                   </td>
  266.                   <td width="86%"> 
  267.                     <input type="checkbox" name="printPermission" value="1" onclick="enableIt(printPermission, printNum)">
  268.                    是 
  269.                  </td>
  270.               </tr>
  271.               <tr bgcolor="#fafafa"> 
  272.                  <td width="18%"> 
  273.                    <div align="left"><strong>&nbsp;可打印份数:</strong></div>
  274.                  </td>
  275.                  <td width="86%"> 
  276.                    <div align="left"> 
  277.                     <input type="text" name="printNum" disabled size="15" class="text" maxlength="5">
  278.                    </div>
  279.                  </td>
  280.               </tr>
  281.               <tr bgcolor="#e0e0e0"> 
  282.                  <td width="18%"> 
  283.                    <div align="left"><strong>&nbsp;可否借阅:</strong></div>
  284.                  </td>
  285.                  <td width="86%"> 
  286.                     <input type="checkbox" name="lendPermission" value="1">
  287.                    是 
  288.                  </td>
  289.              </tr>
  290.              <tr bgcolor="#fafafa"> 
  291.                  <td width="18%"> 
  292.                    <div align="left"><strong>&nbsp;已经传阅:</strong></div>
  293.                  </td>
  294.                  <td width="86%"> 
  295.                     <input type="checkbox" name="sendViewFlag" value="1">
  296.                    是 
  297.                  </td>
  298.              </tr>
  299.              <tr bgcolor="#e0e0e0"> 
  300.                  <td width="18%"> 
  301.                    <div align="left"><strong>&nbsp;领导批示:</strong></div>
  302.                  </td>
  303.                  <td width="86%"> 
  304.                    <div align="left"> 
  305.                      <textarea rows="5" name="leaderNotes" cols="59" wrap="VIRTUAL"></textarea>
  306.                    </div>
  307.                  </td>
  308.              </tr>
  309.              <tr bgcolor="#fafafa">
  310.                 <td colspan="2" align="center" height="30">
  311.                   <input onClick="createArchive(this.form)" type="button" value="保存" name="B21" class="text">
  312.                   &nbsp;&nbsp;
  313.                   <input type="reset" value="重置" name="B212" class="text">
  314.                   &nbsp;&nbsp;
  315.                   <input type="button" value="放弃" name="B213" class="text" onclick="history.back()">
  316.                 </td>
  317.              </tr>
  318.           </table>
  319.           </td>
  320.           </tr>
  321.           </table>   
  322.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  323.        </TD>
  324.      </TR>
  325.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  326.     </TBODY> 
  327.   </TABLE>
  328.     <BR>
  329.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  330. </form>
  331. </DIV>
  332. </BODY>
  333. </HTML>