Office_Document_Received_Update.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:15k
源码类别:
电子政务应用
开发平台:
Java
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_workflow.tld" prefix="vnex_workflow" %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="java.util.Iterator" %>
- <%@ page import="com.vnex.intranet.util.TimeStamp" %>
- <%@ page import="com.vnex.intranet.workflow.document.value.*" %>
- <%@ page import="com.vnex.intranet.workflow.pub.value.WorkflowFileValueBean" %>
- <%@ page import="com.vnex.intranet.util.SubPathGenerater" %>
- <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>
- <%@ page import="com.vnex.intranet.upload.*"%>
- <%@ page import="com.vnex.intranet.util.FieldUtil" %>
- <jsp:useBean id="mySmartUpload" scope="page" class="com.vnex.intranet.upload.SmartUpload" />
- <jsp:useBean id="drvb" scope="request" class="com.vnex.intranet.workflow.document.value.DocumentReceivedValueBean"/>
- <jsp:useBean id="documentProxy" scope="application" class="com.vnex.intranet.workflow.document.proxy.DocumentProxyBean" />
- <jsp:include page="/vnex/head.jsp"/>
- <%
- // this attribute used by FileAttributeTag to change encode of chinese file name to view.
- pageContext.setAttribute("encodeFlag" , "false");
- String current = new java.sql.Date(System.currentTimeMillis()).toString();
- if( request.getParameter("type") == null )
- {
- String sId = request.getParameter("id");
- drvb = documentProxy.getReceivedDocDetail( Integer.parseInt( sId ) );
- session.setAttribute( "recieveddocument", drvb ) ;
- }
- %>
- <%@ include file= "/vnex/intranet/office/document/receivedDocUpload.jsp" %>
- <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
- <script language="JavaScript" src="/vnex/util/validate.js"></script>
- <script language=JavaScript>
- function createDoc(form)
- {
- if(checkIt(form))
- {
- checkAll(document.forms[0].attachments);
- form.action="/mainctrl/office/document/receivedupdateok";
- form.submit();
- }
- }
- function uploadDoc(form)
- {
- if(checkIt(form))
- {
- form.action="/mainctrl/office/document/receivedupdate?type=1";
- form.encoding="multipart/form-data";
- form.submit();
- }
- }
- function deleteDoc(form)
- {
- if(checkIt(form))
- {
- form.action="/mainctrl/office/document/receivedupdate?type=2";
- form.submit();
- }
- }
- function checkIt(form)
- {
- if(isEmpty(stripWhitespace(form.title.value)))
- {
- alert("请输入收文标题");
- return false;
- }
- if( form.title.value.length >64 )
- {
- alert("收文标题长度不能超过64位.");
- return false;
- }
- if(isEmpty(form.NO.value))
- {
- alert("请输入收文文号");
- return false;
- }
- if( form.NO.value.length >32 )
- {
- alert("收文文号长度不能超过32位.");
- return false;
- }
- if(!isInteger( form.fileNumber.value ))
- {
- alert("文件数非法,请输入数字.");
- return false;
- }
- if( form.fileNumber.value.length >5 )
- {
- alert("文件数的数字长度不能超过5位.");
- return false;
- }
- if(!isInteger( form.pages.value ))
- {
- alert("文件页数非法,请输入数字.");
- return false;
- }
- if( form.pages.value.length >5 )
- {
- alert("文件页数的数字长度不能超过5位.");
- return false;
- }
- if( form.content.value.length >250 )
- {
- alert("文件内容的长度不能超过250位.");
- return false;
- }
- if( form.remark.value.length >200 )
- {
- alert("文件备注的长度不能超过200位.");
- return false;
- }
- if( !isEmpty(form.receivedDateS.value) )
- {
- if(!isVNEXDate(form.receivedDateS.value))
- {
- alert("收文接收日期非法");
- return false;
- }
- if( "<%=current%>" < form.receivedDateS.value)
- {
- alert("收文接收日期必须在本日之前!");
- return false;
- }
- }
- return true;
- }
- function openAttach( mSelObj )
- {
- for( var i = 0; i < mSelObj.options.length; i++ )
- {
- var oriLen = mSelObj.options.length;
- if ( mSelObj.options[i].selected )
- {
- var eid = mSelObj.options[i].value;
- window.open( "/" + eid );
- }
- }
- }
- function addKey()
- {
- var opt = new Option();
- var opt2 = new Option();
- if(!document.forms[0].file.value=="")
- {
- opt.value = document.forms[0].file.value;
- opt.text = document.forms[0].file.value;
- var flag1 = 1;
- for(var i=0;i<document.forms[0].attachments.length;i++)
- {
- if(document.forms[0].attachments.options[i].text==opt.text)
- {
- flag1 = 0;
- break;
- }
- }
- if(flag1==1)
- {
- document.forms[0].attachments.options[document.forms[0].attachments.length] = opt;
- }
- }
- }
- function checkAll( selObj )
- {
- for ( var i = 0; i < selObj.options.length; i++ )
- selObj.options[i].selected = true;
- }
- </script>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <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_office.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script language="JavaScript">
- window.onload=init
- </script>
- <DIV align=center>
- <form name="form1" method="post" action="">
- <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" height="15"><font class="strongw"> <a href="/mainctrl/system/main"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>
- >><a href="/mainctrl/office/document/receivedlist"><font color="#FFFFFF">收文管理</font></a>>>修改收文
- </font></td>
- </tr>
- </table>
- <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
- <tr bgcolor="#e0e0e0">
- <td width="15%">
- <font class="strong" > 文号:</font>
- </td>
- <td>
- <input type="hidden" name="id" value= "<%= drvb.getId() %>">
- <input type="text" name="NO" size="24" class="file" value= "<%= FieldUtil.filterQuotTag( drvb.getNO() ) %>">
- * (注:带*为必填内容)</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="15%">
- <font class="strong" > 标题:</font>
- </td>
- <td>
- <input type="text" name="title" size="24" class="file" value= "<%= FieldUtil.filterQuotTag( drvb.getTitle() ) %>">
- * </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="15%">
- <font class="strong"> 来文机关: </font>
- </td>
- <td >
- <input type="text" name="comeFrom" size="24" class="file" value= "<%= FieldUtil.filterQuotTag( drvb.getComeFrom() ) %>">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="15%">
- <font class="strong"> 文件分类: </font>
- </td>
- <td >
- <select name="type">
- <%
- Iterator dtypes = DocumentReceivedType.getAvailableDocumentReceivedTypes().iterator();
- while ( dtypes.hasNext() )
- {
- DocumentReceivedType dtype = ( DocumentReceivedType )dtypes.next();
- %>
- <option value="<%= dtype.getId() %>" <% if ( drvb.getType()!= null && dtype.getId()==drvb.getType().getId() ) out.print("selected"); %>>
- <%= dtype.getName() %></option>
- <%
- }
- %>
- </select>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="15%">
- <font class="strong"> 接受日期:</font>
- </td>
- <td >
- <input type="text" name="receivedDateS" class=text size="20" value="<%= drvb.getReceivedDateS() %>" ><img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(receivedDateS);return false">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="15%"><font class="strong"> 密级:</font></td>
- <td >
- <select name="securityType">
- <%
- Iterator types = SecurityType.getAvailableSecurityTypes().iterator();
- while ( types.hasNext() )
- {
- SecurityType rtype = ( SecurityType )types.next();
- %>
- <option value="<%= rtype.getId() %>" <% if ( drvb.getSecurityType()!= null && rtype.getId()==drvb.getSecurityType().getId() ) out.print("selected"); %>>
- <%= rtype.getName() %></option>
- <%
- }
- %>
- </select>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="15%">
- <div align="left"><font class="strong"> 文件数:</font></div>
- </td>
- <td >
- <% if ( drvb.getFileNumber() != -1 )
- { %>
- <input type="text" name="fileNumber" size="24" class="file" value= "<%= drvb.getFileNumber() %>">
- <% }else
- { %>
- <input type="text" name="fileNumber" size="24" class="file">
- <% } %>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="15%">
- <div align="left"><font class="strong"> 文件页数 :</font></div>
- </td>
- <td >
- <% if ( drvb.getPages() != -1 )
- { %>
- <input type="text" name="pages" size="24" class="file" value= "<%= drvb.getPages() %>">
- <% }else
- { %>
- <input type="text" name="pages" size="24" class="file">
- <% } %>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="15%" valign="top">
- <font class="strong"> 文件内容:</font>
- </td>
- <td><textarea name="content" cols="59" rows="5"><%= FieldUtil.filterQuotTag( drvb.getContent() ) %></textarea>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="15%" valign="top">
- <font class="strong"> 备注:</font>
- </td>
- <td>
- <textarea name="remark" cols="59" rows="5"><%= FieldUtil.filterQuotTag( drvb.getRemark() ) %></textarea>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="15%" valign="top">
- <font class="strong"> 上传附件:<br> (注:点击附件名称就可以查看附件. ) </font>
- </td>
- <td>
- <!--select name="attachments" size="6" multiple style="width:300" onChange="openAttach( document.forms[0].attachments )"-->
- <select name="attachments" size="6" multiple style="width:300" >
- <vnex_workflow:fileList collection="<%=drvb.getFiles()%>">
- <vnex_workflow:items>
- <option value = "<vnex_workflow:fileAttribute attribute="workflowfile_title"/>">
- <vnex_workflow:fileAttribute attribute="workflowfile_name"/></option>
- </vnex_workflow:items>
- </vnex_workflow:fileList>
- </select>
- <input type="button" name="Button22" value="删除" onClick="deleteDoc(this.form)" class="text">
- <br>
- <input type="file" name="file" class="text">
- <input type="button" name="Button2" value="上传" class="text" onClick="uploadDoc(this.form)">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td colspan="2" align="center" height="30">
- <input type="button" name="Submit" value="保存" class="file" onClick="createDoc(this.form)" >
- <input type="reset" name="Submit2" value="重置" class="file">
- <input type="reset" name="Submit2" value="放弃" class="file" onclick="location='/mainctrl/office/document/receivedlist?type=2'">
- </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>