modify_archive.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:14k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_archive.tld" prefix="archive" %>
- <%@ page import="java.lang.*"%>
- <%@ page import="java.sql.Timestamp"%>
- <%@ page import="java.util.Calendar"%>
- <%@ page import="com.vnex.intranet.util.TimeStamp"%>
- <%@ page import="com.vnex.intranet.util.FieldUtil"%>
- <%@ page import="com.vnex.intranet.archives.value.ArchiveValueBean"%>
- <jsp:useBean id="archiveProxy" class="com.vnex.intranet.archives.proxy.ArchiveProxyBean" scope="session" />
- <%
- String str = request.getParameter("archiveId");
- ArchiveValueBean archiveInfo = archiveProxy.selectArchive((new Integer(str).intValue()));
- String createDate = "";
- int i;
- String year = "";
- String month = "";
- String day = "";
- String disabled = "";
- if (archiveInfo.getCreateDate() != null)
- {
- Calendar cal = archiveInfo.getCreateDate();
- year = ""+cal.get(Calendar.YEAR);
- int m = cal.get(Calendar.MONTH)+1;
- int d = cal.get(Calendar.DAY_OF_MONTH);
- month = m>=10? ""+m:"0"+m;
- day = d>=10? ""+d:"0"+d;
- createDate = year + "-" + month + "-" + day;
- }
- if(archiveInfo.getIsBorrowed() == 1)
- disabled = "disabled";
- %>
- <script Language="JavaScript" src="/vnex/util/Popup.js"></script>
- <script language="JavaScript" src="/vnex/util/validate.js"></script>
- <script language=JavaScript>
- function isDateValid(form)
- {
- if (! isInteger(form.copyNum.value))
- {
- alert("复印份数必须是整数");
- form.copyNum.focus();
- return false;
- }
- if (! isInteger(form.printNum.value))
- {
- alert("打印份数必须是整数");
- form.printNum.focus();
- return false;
- }
- if (form.archiveTitle.value.length == 0)
- {
- alert("档案标题不能为空!");
- form.archiveTitle.focus();
- return false;
- }
- str = form.archiveTitle.value;
- if (str.substring(0,1) == " ")
- {
- alert("标题开头不能是空格!");
- form.archiveTitle.focus();
- return false;
- }
- if (form.contents.value.length > 250)
- {
- alert("内容概要不能超过250个文字!");
- return false;
- }
- if (form.leaderNotes.value.length > 250)
- {
- alert("领导批示不能超过250个文字!");
- form.leaderNotes.focus();
- return false;
- }
- if("<%=(com.vnex.intranet.pub.BaseJdbcDAO.getDBSystemDate()).toString()%>" < form.createTime.value)
- {
- alert("发文日期不能在本日之后");
- return false;
- }
- return true;
- }
- function toCheck(form,ctrlField,theField)
- {
- if(ctrlField.checked)
- theField.disabled=false;
- else
- {
- theField.value = "";
- theField.disabled=true;
- }
- }
- function toDetail(form)
- {
- form.action="/mainctrl/archive/archiveDetail?archiveId=<%=request.getParameter("archiveId")%>";
- form.submit();
- }
- function toSuccess(form)
- {
- if (! isDateValid(form))
- return false;
- form.action = "modifyArchiveSuccess?archiveId=<%=request.getParameter("archiveId")%>";
- form.submit();
- }
- </script>
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <script language=JavaScript>
- </script>
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_archives.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <DIV align=center>
- <form name="form1" method="post">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center"><br>
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr>
- <td align="center" colspan="2" bgcolor="#FFFFFF">
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#666666">
- <td colspan="2"><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>>><a href="/mainctrl/archive/todayArchives"><font color="#ffffff">档案管理</font></a>>><a href="/mainctrl/archive/archiveDetail?archiveId=<%=request.getParameter("archiveId")%>"><font color="#ffffff">档案信息</font></a>>>修改档案</font>
- </td>
- </tr>
- </table>
- <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
- <tr bgcolor="#fafafa">
- <td width="18%">
- <div align="left"><strong> 档案类型:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <select name="archiveTypeId" size="1">
- <archive:archiveType archiveTypeId='<%= "" + archiveInfo.getArchiveTypeId()%>'/>
- </select>
- </div>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="18%">
- <div align="left"><strong> 存档日期:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <%= TimeStamp.formatCalendar(1,archiveInfo.getSaveArchiveDate())%>
- </div>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="18%">
- <div align="left"><strong> 顺序号:</strong></div>
- </td>
- <td width="86%">
- <%= archiveInfo.getArchiveDisplayId()%>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="18%">
- <div align="left"><strong> 收件人:</strong></div>
- </td>
- <td width="84%">
- <select name="receiverId" size="1">
- <archive:employeeTag empId='<%="" + archiveInfo.getReceiverId()%>' />
- </select>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="15%"><strong> 送存人:</strong></td>
- <td>
- <input type="text" name="sender" size="15" class="text" maxlength=12
- value="<%= FieldUtil.filterQuotTag(archiveInfo.getSender())%>">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="18%">
- <div align="left"><strong> 文件来源:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <select class=choice name="fileSourceId" >
- <archive:fileSourceTag unitId='<%= "" + archiveInfo.getFileSourceId()%>'/>
- </select>
- </div>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="18%">
- <div align="left"><strong> 发文日期:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <input type="text" name="createTime" readonly size="30" class="text" value=<%=createDate%> >
- <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择日期" onClick="fPopUpCalendarDlg(createTime);return false">
- </div>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="18%">
- <div align="left"><strong> 标题:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <input type="text" name="archiveTitle" size="30" class="text" maxlength=50
- value="<%=FieldUtil.filterQuotTag(archiveInfo.getArchiveTitle())%>"> * (注:带*为必填内容)
- </div>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="18%"><strong> 主题词:</strong></td>
- <td>
- <input type="text" name="archiveKeyword" size="30" class="text" maxlength=250
- value="<%=FieldUtil.filterQuotTag(archiveInfo.getArchiveKeyword())%>">
- (逗号间隔,例如:建设,网络,......北京) </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="18%">
- <div align="left"><strong> 内容概要:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <textarea rows="10" name="contents" cols="49" maxlength="250" wrap="VIRTUAL"><%=archiveInfo.getContents()%></textarea>
- </div>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="18%">
- <div align="left"><strong> 保密级别:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <select class=choice name="safetyLevel">
- <% for (i=1; i<=5;i++)
- {
- if (i==archiveInfo.getSafetyLevel())
- {
- %>
- <option selected><%=i%></option>
- <%}else{%>
- <option><%=i%></option>
- <%}}%>
- </select>
- </div>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="18%">
- <div align="left"><strong> 可否复制:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <input type="checkbox" name="copyPermission" onChange=toCheck(form1,this,copyNum) value="1" <%= (archiveInfo.getCopyPermission()==1)?("checked"):("unchecked")%>>
- 是
- </div>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="18%">
- <div align="left"><strong> 可复制份数:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <input type="text" name="copyNum" size="15" class="text" maxlength=5 <%= (archiveInfo.getCopyPermission()==1)?(""):("disabled")%>
- value = <%=archiveInfo.getCopyNum()%>>
- </div>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="18%">
- <div align="left"><strong> 可否打印:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <input type="checkbox" name="printPermission" value="1" onChange=toCheck(form1,this,printNum) <%= (archiveInfo.getPrintPermission()==1)?("checked"):("unchecked")%> >
- 是
- </div>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="18%">
- <div align="left"><strong> 可打印份数:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <input type="text" name="printNum" size="15" class="text" maxlength=5 <%=(archiveInfo.getPrintPermission()==1)?(""):("disabled")%>
- value = <%=archiveInfo.getPrintNum()%>>
- </div>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="18%">
- <div align="left"><strong> 可否借阅:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <input type="checkbox" name="lendPermission" value="1" <%= (archiveInfo.getLendPermission()==1)?("checked"):("unchecked")%> <%=disabled%>>
- 是
- </div>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="18%">
- <div align="left"><strong> 已经传阅:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <input type="checkbox" name="sendViewFlag" value="1" <%=(archiveInfo.getSendViewFlag()==1)?"checked":"unchecked"%>>
- 是
- </div>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="18%">
- <div align="left"><strong> 领导批示:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <textarea rows="10" name="leaderNotes" cols="49" wrap="VIRTUAL"><%=archiveInfo.getLeaderNotes()%></textarea>
- </div>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td colspan="2" align="center" height="30">
- <input onClick=toSuccess(form1) type="button" value="保存" name="B21" class="text">
-
- <input type="reset" value="重置" name="B212" class="text">
-
- <input onClick=toDetail(this.form) type="button" value="返回" name="B21" class="text">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form>
- </DIV>
- </BODY>
- </HTML>