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

电子政务应用

开发平台:

Java

  1. <%@ page import="java.lang.*"%>
  2. <%@ page import="java.sql.*"%>
  3. <%@ page import="java.util.*"%>
  4. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  5. <%@ page import="com.vnex.intranet.archives.value.WritValueBean"%>
  6. <%@ page import="com.vnex.intranet.util.*"%>
  7. <jsp:useBean id="thingProcess" scope="application" class="com.vnex.intranet.archives.process.ThingProcess" />
  8. <%
  9. int archiveId = Integer.parseInt(request.getParameter("archiveId"));
  10. WritValueBean writBean = thingProcess.selectArchiveRow(archiveId);
  11. %>
  12. <HTML>
  13. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  14. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  15. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  16. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_archives.js"></script>
  17. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  18. <script Language="JavaScript" src="/vnex/util/Popup.js"></script>
  19. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  20. <script language="javascript" src="/vnex/validate.js"></script>
  21. <DIV align=center>
  22. <script language=javascript>
  23. function createArchive(form)
  24. {
  25.   if(checkIt(form))
  26.   {
  27.     form.buildDate.value=form.buildDate.value.replace("-","");
  28.     form.buildDate.value=form.buildDate.value.replace("-","");
  29.     form.action="/mainctrl/thingModifyProcess";
  30. form.encoding="multipart/form-data";
  31.     form.submit();
  32.   }  
  33. }
  34. function checkIt(form)
  35. {
  36.   if(isEmpty(form.docName.value))
  37.   {
  38.       alert("请输入档案号!");
  39.   form.docName.focus();
  40.       return false;
  41.   }
  42.   if(isEmpty(form.title.value))
  43.   {
  44.       alert("请输入名称!");
  45.   form.title.focus();
  46.       return false;
  47.   }
  48.   if(isEmpty(form.buildDate.value))
  49.   {
  50.       alert("请选择日期!");
  51.   form.buildDate.focus();
  52.       return false;
  53.   }
  54.   if(!isEmpty(form.remark.value))
  55.   {
  56.      if(isInvalidateLen(form.remark.value, 400))
  57.      {
  58.         alert("内容概要不要超过250个汉字或1000个英文字符!");
  59. form.remark.focus();
  60.         return false;
  61.      }
  62.   }
  63.   if(!isEmpty(form.saveDate.value))
  64.   {
  65.      if(!isInteger(form.saveDate.value))
  66.      {
  67.         alert("奖状只能是数字!");
  68. form.saveDate.focus();
  69.         return false;
  70.      }
  71.   }  
  72.   if(!isEmpty(form.buildYear.value))
  73.   {
  74.      if(!isInteger(form.buildYear.value))
  75.      {
  76.         alert("奖牌只能是数字!");
  77. form.buildYear.focus();
  78.         return false;
  79.      }
  80.   }  
  81.   if(!isEmpty(form.secret.value))
  82.   {
  83.      if(!isInteger(form.secret.value))
  84.      {
  85.         alert("证书只能是数字!");
  86. form.secret.focus();
  87.         return false;
  88.      }
  89.   }  
  90.   return true;
  91. }
  92. </script>
  93. <form name="form1" method="post" >
  94.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  95.     <TBODY> 
  96.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  97.       <TR> 
  98.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  99.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  100.             <tr valign="top"> 
  101.               <td bgcolor="#fafafa" > 
  102.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  103.                   <tr valign="top" bgcolor="#cccccc"> 
  104.                     <td> 
  105.                       <table width="600" border="0" cellpadding="2" cellspacing="0">
  106.                         <tr bgcolor="#666666"> 
  107.                             
  108.                           <td><font class="strongw"> <a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt; 
  109.                             <a href="/mainctrl/archiveFileIn"><font color="#ffffff">档案管理</font></a>&gt;&gt;<a href="/mainctrl/thingIndex"><font color="#ffffff">实物档案</font></a>&gt;&gt; 
  110.                             修改实物档案</font> </td>
  111.                         </tr>
  112.                       </table>
  113.                 <table border="0" cellpadding="2" cellspacing="0" width="600">
  114.                   <tr bgcolor="#e0e0e0"> 
  115.                           <td colspan="4"> 
  116.                             <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  117.                               <tr bgcolor="#e0e0e0"> 
  118.                                 <td width="24%" bgcolor="#e0e0e0"><strong>档案号</strong>:</td>
  119.                                 <td width="76%"> 
  120.                                   <input type="hidden" name="archiveId" value="<%=writBean.getArchiveId()%>">
  121.                                   <input type="text" name="docName" size="30" class="text" value="<%=writBean.getDocName()%>">
  122.                                   * &nbsp;(注:带*为必填内容) </td>
  123.                               </tr>
  124.                               <tr bgcolor="#fafafa"> 
  125.                                 <td width="24%"><strong>类别:</strong></td>
  126.                                 <td width="76%" bgcolor="#fafafa"> 
  127.                                   <input type="text" name="topName" size="30" class="text" value="<%=writBean.getTopName()%>">
  128.                                 </td>
  129.                               </tr>
  130.                               <tr bgcolor="#e0e0e0"> 
  131.                                 <td width="24%"><strong>专业:</strong></td>
  132.                                 <td width="76%"> 
  133.                                   <input type="text" name="fileBef" size="30" class="text" value="<%=writBean.getFileBef()%>">
  134.                                 </td>
  135.                               </tr>
  136.                               <tr bgcolor="#fafafa"> 
  137.                                 <td width="24%"><strong>名称:</strong></td>
  138.                                 <td width="76%"> 
  139.                                   <input type="text" name="title" size="30" class="text" value="<%=writBean.getTitle()%>">
  140.                                   * </td>
  141.                               </tr>
  142.                               <tr bgcolor="#e0e0e0"> 
  143.                                 <td width="24%"><strong>获奖级别:</strong></td>
  144.                                 <td width="76%"> 
  145.                                   <input type="text" name="wordKey" size="10" class="text" maxlength="10" value="<%=writBean.getWordKey()%>">
  146.                                 </td>
  147.                               </tr>
  148.                               <tr bgcolor="#fafafa"> 
  149.                                 <td width="24%"><strong>发奖单位:</strong></td>
  150.                                 <td width="76%"> 
  151.                                   <input type="text" name="dep" size="30" class="text" value="<%=writBean.getDep()%>">
  152.                                 </td>
  153.                               </tr>
  154.                               <tr bgcolor="#e0e0e0"> 
  155.                                 <td width="24%"> 
  156.                                   <div align="left"><strong>获奖时间:</strong></div>
  157.                                 </td>
  158.                                 <td width="76%"> 
  159.                                   <div align="left"> 
  160.                                     <input type="text" name="buildDate" value=<%=StringUtil.changeIntToString(writBean.getBuildDate())%>  readonly size="10" class="text">
  161.                                     &nbsp; <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择借阅档案日期" onClick="fPopUpCalendarDlg(buildDate);return false"> 
  162.                                     * </div>
  163.                                 </td>
  164.                               </tr>
  165.                               <tr bgcolor="#fafafa"> 
  166.                                 <td width="24%"><strong>奖状(个):</strong></td>
  167.                                 <td width="76%"> 
  168.                                   <input type="text" name="saveDate" size="4" class="text" value="<% if (writBean.getSaveDate()!=0) out.println(writBean.getSaveDate()); %>" maxlength="4">
  169.                                 </td>
  170.                               </tr>
  171.                               <tr bgcolor="#e0e0e0"> 
  172.                                 <td width="24%"> 
  173.                                   <div align="left"><strong>奖牌(个):</strong></div>
  174.                                 </td>
  175.                                 <td width="76%"> 
  176.                                   <input type="text" name="buildYear" size="4" class="text" value="<% if (writBean.getBuildYear()!=0) out.println(writBean.getBuildYear()); %>" maxlength="4">
  177.                                 </td>
  178.                               </tr>
  179.                               <tr bgcolor="#fafafa"> 
  180.                                 <td width="24%"> 
  181.                                   <div align="left"><strong>证书(本):</strong></div>
  182.                                 </td>
  183.                                 <td width="76%"> 
  184.                                   <input type="text" name="secret" size="4" class="text" value="<% if (writBean.getSecret()!=0) out.println(writBean.getSecret()); %>" maxlength="4">
  185.                                 </td>
  186.                               </tr>
  187.                               <tr bgcolor="#e0e0e0"> 
  188.                                 <td width="24%"><strong>原附件:</strong></td>
  189.                                 <td width="76%" > 
  190.                                   <%
  191.   String str = writBean.getAttachment();
  192.   int s = str.lastIndexOf(SubPathGenerater.getSeperator());
  193.   String filename = str.substring(s+1);
  194.   String UTFurl = str.substring(0,s+1)+StringUtil.encode(filename);
  195.   out.println("<a href=""+UTFurl+"" target="_blank">");
  196.   out.println(filename);
  197.   out.println("</a>");
  198. %>
  199.                                   <input type="hidden" name="oldURL" value="<%=writBean.getAttachment()%>">
  200.                                 </td>
  201.                               </tr>
  202.                               <tr bgcolor="#fafafa"> 
  203.                                 <td width="24%"><strong>附件:</strong></td>
  204.                                 <td width="76%"> 
  205.                                   <input type="file" name="attachment" class="text">
  206.                                 </td>
  207.                               </tr>
  208.                               <tr bgcolor="#e0e0e0"> 
  209.                                 <td width="24%"> 
  210.                                   <div align="left"><strong>备注:</strong></div>
  211.                                 </td>
  212.                                 <td width="76%"> 
  213.                                   <div align="left"> 
  214.                                     <input type="text"  class="text" name="remark" size="10" value="<%=writBean.getRemark()%>" maxlength="10">
  215.                                   </div>
  216.                                 </td>
  217.                               </tr>
  218.                               <tr bgcolor="#fafafa"> 
  219.                                 <td colspan="2" align="center" height="30"> 
  220.                                   <input type="button"  onClick="createArchive(this.form)" value="保存"  class="text">
  221.                                   &nbsp;&nbsp; 
  222.                                   <input type="reset" value="重置"  class="text">
  223.                                   &nbsp;&nbsp; 
  224.                                   <input type="button" value="放弃"  class="text" onClick="history.back()">
  225.                                 </td>
  226.                               </tr>
  227.                             </table>
  228.                   </tr>
  229.                      
  230.                 </table>
  231.                     </td>
  232.                     </tr>
  233.                   </table>
  234.                 </td>
  235.              </tr>
  236.           </table>
  237.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  238.        </TD>
  239.      </TR>
  240.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  241.     </TBODY> 
  242.   </TABLE>
  243.     <BR>
  244.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  245. </form>
  246. </DIV>
  247. </BODY>
  248. </HTML>