modify_archive_data.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:13k
源码类别:
电子政务应用
开发平台:
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()));
- System.out.println("OK1");
- System.out.println("" + archiveInfo.getArchiveId());
- String createDate = "";
- int i;
- String year = "";
- String month = "";
- String day = "";
- 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;
- }
- %>
- <script Language="JavaScript" src="/vnex/util/Popup.js"></script>
- <script language="JavaScript" src="/vnex/util/validate.js"></script>
- <script language="javascript" src="/vnex/util/strUtil.js"></script>
- <script language=JavaScript>
- function isDateValid(form)
- {
- if (! isInteger(form.copyNum.value))
- {
- alert("复印份数必须是整数");
- return false;
- }
- if (! isInteger(form.printNum.value))
- {
- alert("打印份数必须是整数");
- return false;
- }
- if(!isEmpty(form.archiveTitle.value))
- {
- if(isInvalidateLen(form.archiveTitle.value, 100))
- {
- alert("标题不要超过25个汉字或100个英文字符");
- return false;
- }
- if (form.archiveTitle.value.substring(0,1) == " ")
- {
- alert("标题开头不能是空格!");
- return false;
- }
- }
- else
- {
- alert("请输入标题");
- return false;
- }
- if(!isEmpty(form.archiveKeyword.value))
- {
- if(isInvalidateLen(form.archiveKeyword.value, 1000))
- {
- alert("主题词不要超过250个汉字或1000个英文字符");
- return false;
- }
- }
- if(!isEmpty(form.contents.value))
- {
- if(isInvalidateLen(form.contents.value, 1000))
- {
- alert("内容概要不要超过250个汉字或1000个英文字符");
- return false;
- }
- }
- if(!isEmpty(form.leaderNotes.value))
- {
- if(isInvalidateLen(form.leaderNotes.value, 1000))
- {
- alert("领导批示不要超过250个汉字或1000个英文字符");
- 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")%>&isToday=<%=request.getParameter("isToday")%>";
- form.submit();
- }
- function toSuccess(form)
- {
- if (! isDateValid(form))
- return false;
- if (form.lendPermission.disabled == true)
- form.action = "modifyArchiveSuccess?archiveId=<%=request.getParameter("archiveId")%>&isToday=<%=request.getParameter("isToday")%>&lendPermission=1";
- else
- form.action = "modifyArchiveSuccess?archiveId=<%=request.getParameter("archiveId")%>&isToday=<%=request.getParameter("isToday")%>";
- form.submit();
- }
- </script>
- <table width="600" border="0" cellpadding="5" cellspacing="1" class="iframestyle">
- <tr>
- <td>
- <table width="100%" bgcolor="#ffffff">
- <tr>
- <td colspan="2"> <a href="/mainctrl/archive/todayArchives">档案管理</a>
- >><a href="/mainctrl/archive/archiveDetail?archiveId=<%=request.getParameter("archiveId")%>">档案信息</a>>>修改档案
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="2" height="4" bgcolor="#666666" align="center"><font class="strongw">修改档案</font></td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td align="center" colspan="2">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- <table width="100%" border="0">
- <tr>
- <td width="14%">
- <div align="left">档案类型:</div>
- </td>
- <td width="86%">
- <div align="left">
- <select name="archiveTypeId" size="1">
- <archive:archiveType archiveTypeId='<%= "" + archiveInfo.getArchiveTypeId()%>'/>
- </select>
- </div>
- </td>
- </tr>
- <tr>
- <td width="14%">
- <div align="left">存档日期:</div>
- </td>
- <td width="86%">
- <div align="left">
- <%= TimeStamp.formatCalendar(1,archiveInfo.getSaveArchiveDate())%>
- </div>
- </td>
- </tr>
- <tr>
- <td width="14%">
- <div align="left">档案编号:</div>
- </td>
- <td width="86%">
- <div align="left">
- <%= archiveInfo.getArchiveDisplayId()%>
- </td>
- </tr>
- <tr>
- <td width="14%">
- <div align="left">收件人:</div>
- </td>
- <td width="84%">
- <div align="left">
- <select name="receiverId" size="1">
- <archive:employeeTag empId='<%="" + archiveInfo.getReceiverId()%>' />
- </select>
- 送存人:
- <input type="text" name="sender" size="15" class="text" maxlength=12
- value="<%= FieldUtil.filterQuotTag(archiveInfo.getSender())%>">
- </div>
- </td>
- </tr>
- <tr>
- <td width="14%">
- <div align="left">文件来源:</div>
- </td>
- <td width="86%">
- <div align="left">
- <select class=choice name="fileSourceId" >
- <archive:fileSourceTag unitId='<%= "" + archiveInfo.getFileSourceId()%>'/>
- </select>
- </div>
- </td>
- </tr>
- <tr>
- <td width="14%">
- <div align="left">发文日期:</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>
- <td width="14%">
- <div align="left">标题:</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>
- <td>主题词:</td>
- <td>
- <input type="text" name="archiveKeyword" size="30" class="text" maxlength=250
- value="<%=FieldUtil.filterQuotTag(archiveInfo.getArchiveKeyword())%>">
- (逗号间隔,例如:建设,网络,......北京) </td>
- </tr>
- <tr>
- <td width="14%" valign="top">
- <div align="left">内容概要:</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>
- <td width="14%">
- <div align="left">保密级别:</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>
- <td width="14%">
- <div align="left">可否复制:</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>
- <td width="14%">
- <div align="left">可复制份数:</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>
- <td width="14%">
- <div align="left">可否打印:</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>
- <td width="14%">
- <div align="left">可打印份数:</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>
- <td width="14%">
- <div align="left">可否借阅:</div>
- </td>
- <td width="86%">
- <div align="left">
- <input type="checkbox" name="lendPermission" value="1" <%= (archiveInfo.getIsBorrowed() == 1)?("disabled"):("")%> <%= (archiveInfo.getLendPermission()==1)?("checked"):("unchecked")%>>
- 是
- </div>
- </td>
- </tr>
- <tr>
- <td width="14%">
- <div align="left">已经传阅:</div>
- </td>
- <td width="86%">
- <div align="left">
- <input type="checkbox" name="sendViewFlag" value="1" <%=(archiveInfo.getSendViewFlag()==1)?"checked":"unchecked"%>>
- 是
- </div>
- </td>
- </tr>
- <tr>
- <td width="14%" valign="top">
- <div align="left">领导批示:</div>
- </td>
- <td width="86%">
- <div align="left">
- <textarea rows="10" name="leaderNotes" cols="49" wrap="VIRTUAL"><%=archiveInfo.getLeaderNotes()%></textarea>
- </div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>