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

电子政务应用

开发平台:

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/validate.js"></script>
  16. <script language="javascript" src="/vnex/util/strUtil.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.          return false;
  49.       }
  50.       if (form.archiveTitle.value.substring(0,1) == " ")
  51.   {
  52. alert("标题开头不能是空格!");
  53. return false;
  54.       }
  55.   }
  56.   else
  57.   {
  58.       alert("请输入标题");
  59.       return false;
  60.   }
  61.   if(!isEmpty(form.archiveKeyword.value))
  62.   {
  63.      if(isInvalidateLen(form.archiveKeyword.value, 1000))
  64.      {
  65.         alert("主题词不要超过250个汉字或1000个英文字符");
  66.         return false;
  67.      }
  68.   }
  69.   if(!isEmpty(form.contents.value))
  70.   {
  71.      if(isInvalidateLen(form.contents.value, 1000))
  72.      {
  73.         alert("内容概要不要超过250个汉字或1000个英文字符");
  74.         return false;
  75.      }
  76.   }
  77.   if(!isEmpty(form.leaderNotes.value))
  78.   {
  79.      if(isInvalidateLen(form.leaderNotes.value, 1000))
  80.      {
  81.         alert("领导批示不要超过250个汉字或1000个英文字符");
  82.         return false;
  83.      }
  84.   }
  85.   if(!isEmpty(form.copyNum.value))
  86.   {
  87.      if(!isInteger(form.copyNum.value))
  88.      {
  89.         alert("复制份数只能是数字");
  90.         return false;
  91.      }
  92.   }
  93.   if(!isEmpty(form.printNum.value))
  94.   {
  95.      if(!isInteger(form.printNum.value))
  96.      {
  97.         alert("打印份数只能是数字");
  98.         return false;
  99.      }
  100.   }
  101.   if(!isEmpty(form.createDate.value))
  102.   {
  103.       if("<%=(com.vnex.intranet.pub.BaseJdbcDAO.getDBSystemDate()).toString()%>"<form.createDate.value)
  104.       {
  105.         alert("发文日期不能在本日之后");
  106.         return false;
  107.       }
  108.   }   
  109.   
  110.   return true;
  111. }
  112. </script>
  113.          
  114. <table width="600" border="0" cellpadding="5" cellspacing="1" class="iframestyle">
  115.    <tr>
  116.      <td colspan="2" bgcolor="#ffffff">&nbsp;&nbsp;<a href="/mainctrl/archive/todayArchives">档案管理</a>&gt;&gt;新建档案&nbsp;
  117.      </td>
  118.    </tr>
  119.    <tr> 
  120.       <td colspan="2" height="4" bgcolor="#666666" align="center"><font class="strongw">新建档案</font></td>
  121.    </tr>
  122.    <tr bgcolor="#FFFFFF"> 
  123.       <td align="center" colspan="2">
  124.          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  125.             <tr>
  126.                <td>
  127.                  <table width="100%" border="0">
  128.                    <tr>
  129.                       <td width="14%">
  130.                         <div align="left">档案类型:</div>
  131.                       </td>
  132.                       <td width="86%">
  133.                         <div align="left">
  134.                           <select name="archiveTypeId" size="1">
  135.                             <archive:archiveType archiveTypeId="<%=archiveTypeId%>"/>
  136.                           </select>
  137.                         </div>
  138.                       </td>
  139.                    </tr>
  140.                    <tr> 
  141.                       <td width="14%"> 
  142.                         <div align="left">存档日期:</div>
  143.                       </td>
  144.                       <td width="86%"> 
  145.                         <div align="left"><%=saveDate%></div>
  146.                       </td>
  147.                    </tr>
  148.                    <tr> 
  149.                       <td width="14%"> 
  150.                          <div align="left">收件人:</div>
  151.                       </td>
  152.                       <td width="84%"> 
  153.                          <div align="left"> 
  154.                           <select name="receiverId" size="1">
  155.                             <archive:employeeTag />
  156.                           </select>
  157.                            送存人:     
  158.                            <input type="text" name="sender" maxlength="8" size="15" class="text" value="<%=archiveBean.getSender()%>">
  159.                         </div>
  160.                       </td>
  161.                    </tr>
  162.                    <tr> 
  163.                       <td width="14%"> 
  164.                         <div align="left">文件来源:</div>
  165.                       </td>
  166.                       <td width="86%"> 
  167.                         <div align="left"> 
  168.                           <select name="fileSourceId" size="1">
  169.                            <archive:fileSourceTag />
  170.                           </select>  
  171.                         </div>
  172.                       </td>
  173.                    </tr>
  174.                    <tr> 
  175.                       <td width="14%"> 
  176.                         <div align="left">发文日期:</div>
  177.                       </td>
  178.                       <td width="86%"> 
  179.                          <div align="left">
  180.                           <input type="text" name="createDate" readonly size="30" class="text">
  181.                           <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择档案发文日期" onClick="fPopUpCalendarDlg(createDate);return false">
  182.                          </div>
  183.                       </td>
  184.                    </tr>
  185.                    <tr> 
  186.                       <td width="14%"> 
  187.                         <div align="left">标题:</div>
  188.                       </td>
  189.                       <td width="86%"> 
  190.                         <div align="left"> 
  191.                          <input type="text" name="archiveTitle" size="30" class="text">
  192.                         </div>
  193.                       </td>
  194.                    </tr>
  195.                    <tr>
  196.                       <td>主题词:</td>
  197.                       <td>
  198.                          <input type="text" name="archiveKeyword" size="30" class="text">
  199.                         (逗号间隔,例如:建设,网络,......北京) </td>
  200.                   </tr>
  201.                   <tr> 
  202.                       <td width="14%" valign="top"> 
  203.                         <div align="left">内容概要:</div>
  204.                       </td>
  205.                       <td width="86%"> 
  206.                         <div align="left"> 
  207.                           <textarea rows="10" name="contents" cols="49" wrap="VIRTUAL"></textarea>
  208.                         </div>
  209.                       </td>
  210.                   </tr>
  211.                 <tr> 
  212.                    <td width="14%"> 
  213.                      <div align="left">保密级别:</div>
  214.                    </td>
  215.                    <td width="86%"> 
  216.                      <div align="left"> 
  217.                        <select class=choice  name="safetyLevel">
  218.                          <option>5</option>
  219.                          <option>4</option>
  220.                          <option selected>3</option>
  221.                          <option>2</option>
  222.                          <option>1</option>
  223.                        </select>
  224.                      </div>
  225.                    </td>
  226.                </tr>
  227.                <tr> 
  228.                    <td width="14%"> 
  229.                      <div align="left">可否复制:</div>
  230.                    </td>
  231.                    <td width="86%"> 
  232.                      <div align="left"> 
  233.                        <input type="checkbox" name="copyPermission" value="1" onclick="enableIt(copyPermission, copyNum)">
  234.                      是 
  235.                   </td>
  236.               </tr>
  237.               <tr> 
  238.                   <td width="14%"> 
  239.                     <div align="left">可复制份数:</div>
  240.                   </td>
  241.                   <td width="86%"> 
  242.                     <div align="left"> 
  243.                      <input type="text" name="copyNum" disabled size="15" class="text"  maxlength="5">
  244.                     </div>
  245.                   </td>
  246.               </tr>
  247.               <tr> 
  248.                   <td width="14%"> 
  249.                    <div align="left">可否打印:</div>
  250.                   </td>
  251.                   <td width="86%"> 
  252.                    <div align="left"> 
  253.                     <input type="checkbox" name="printPermission" value="1" onclick="enableIt(printPermission, printNum)">
  254.                    是 
  255.                  </td>
  256.               </tr>
  257.               <tr> 
  258.                  <td width="14%"> 
  259.                    <div align="left">可打印份数:</div>
  260.                  </td>
  261.                  <td width="86%"> 
  262.                    <div align="left"> 
  263.                     <input type="text" name="printNum" disabled size="15" class="text" maxlength="5">
  264.                    </div>
  265.                  </td>
  266.               </tr>
  267.               <tr> 
  268.                  <td width="14%"> 
  269.                    <div align="left">可否借阅:</div>
  270.                  </td>
  271.                  <td width="86%"> 
  272.                    <div align="left"> 
  273.                     <input type="checkbox" name="lendPermission" value="1">
  274.                    是 
  275.                  </td>
  276.              </tr>
  277.              <tr> 
  278.                  <td width="14%"> 
  279.                    <div align="left">已经传阅:</div>
  280.                  </td>
  281.                  <td width="86%"> 
  282.                    <div align="left"> 
  283.                     <input type="checkbox" name="sendViewFlag" value="1">
  284.                    是 
  285.                  </td>
  286.              </tr>
  287.              <tr> 
  288.                  <td width="14%" valign="top"> 
  289.                    <div align="left">领导批示:</div>
  290.                  </td>
  291.                  <td width="86%"> 
  292.                    <div align="left"> 
  293.                      <textarea rows="10" name="leaderNotes" cols="49" wrap="VIRTUAL"></textarea>
  294.                    </div>
  295.                  </td>
  296.              </tr>
  297.           </table>
  298.         </td>
  299.       </tr>
  300.      </table>
  301.    </td>
  302.  </tr>
  303. </table>         
  304. <p> 
  305.   <input onClick="createArchive(this.form)" type="button" value=" 录  入 " name="B21" class="button">
  306.   <input type="reset" value=" 重  置 " name="B212" class="button">
  307.   &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  308. </p>