Office_Document_Received_Create.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:14k
源码类别:
电子政务应用
开发平台:
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="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <jsp:useBean id="drvb" scope="session" class="com.vnex.intranet.workflow.document.value.DocumentReceivedValueBean"/>
- <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 )
- {
- drvb = new DocumentReceivedValueBean();
- 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/receivedcreateok";
- form.submit();
- }
- }
- function uploadDoc(form)
- {
- if(checkIt(form))
- {
- form.action="/mainctrl/office/document/receivedcreate?type=1";
- form.encoding="multipart/form-data";
- form.submit();
- }
- }
- function deleteDoc(form)
- {
- if(checkIt(form))
- {
- form.action="/mainctrl/office/document/receivedcreate?type=2";
- form.submit();
- }
- }
- function checkIt(form)
- {
- if(isEmpty(stripWhitespace(form.title.value)))
- {
- alert("请输入收文标题");
- form.title.focus();
- return false;
- }
- if( form.title.value.length >64 )
- {
- alert("收文标题长度不能超过64位.");
- form.title.focus();
- return false;
- }
- if(isEmpty(form.NO.value))
- {
- alert("请输入收文文号");
- form.NO.focus();
- return false;
- }
- if( form.NO.value.length >32 )
- {
- alert("收文文号长度不能超过32位.");
- form.NO.focus();
- return false;
- }
- if(!isInteger( form.fileNumber.value ))
- {
- alert("文件数非法,请输入数字.");
- form.fileNumber.focus();
- return false;
- }
- if( form.fileNumber.value.length >5 )
- {
- alert("文件数的数字长度不能超过5位.");
- form.fileNumber.focus();
- return false;
- }
- if(!isInteger( form.pages.value ))
- {
- alert("文件页数非法,请输入数字.");
- form.pages.focus();
- return false;
- }
- if( form.pages.value.length >5 )
- {
- alert("文件页数的数字长度不能超过5位.");
- form.pages.focus();
- return false;
- }
- if( form.content.value.length >250 )
- {
- alert("文件内容的长度不能超过250位.");
- form.content.focus();
- return false;
- }
- if( form.remark.value.length >200 )
- {
- alert("文件备注的长度不能超过200位.");
- form.remark.focus();
- return false;
- }
- if( !isEmpty(form.receivedDateS.value) )
- {
- if(!isVNEXDate(form.receivedDateS.value))
- {
- alert("收文接收日期非法");
- form.receivedDateS.focus();
- return false;
- }
- if( "<%=current%>" < form.receivedDateS.value)
- {
- alert("收文接收日期必须在本日之前!");
- form.receivedDateS.focus();
- return false;
- }
- }
- return true;
- }
- 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="docReceived" 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" 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%">
- <div align="left"><font class="strong" > 文号:</font></div>
- </td>
- <td >
- <input type="text" name="NO" size="24" class="file" value= "<%= FieldUtil.filterQuotTag( drvb.getNO() ) %>">
- * (注:带*为必填内容)</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="15%">
- <div align="left"><font class="strong" > 标题:</font> </div>
- </td>
- <td >
- <input type="text" name="title" size="24" class="file" value= "<%= FieldUtil.filterQuotTag( drvb.getTitle() ) %>">
- * </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="15%">
- <div align="left"><font class="strong"> 来文机关: </font></div>
- </td>
- <td >
- <input type="text" name="comeFrom" size="24" class="file" value= "<%= FieldUtil.filterQuotTag( drvb.getComeFrom() ) %>">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="15%">
- <div align="left"><font class="strong"> 文件分类: </font></div>
- </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%">
- <div align="left"><font class="strong"> 接受日期:</font></div>
- </td>
- <td >
- <% if( request.getParameter("type") == null ){ %>
- <input type="text" name="receivedDateS" class=text size="20" value="<%= current %>">
- <% }else{ %>
- <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 class="strong"> 密级:</font></font></td>
- <td ><font class="strong">
- <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>
- </select>
- </font></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="15%">
- <div align="left"><font class="strong"> 文件数:</font></div>
- </td>
- <td ><font class="strong"><font class="strong">
- <% if ( drvb.getFileNumber() == -1 )
- { %>
- <input type="text" name="fileNumber" size="24" class="file" >
- <% }else
- { %>
- <input type="text" name="fileNumber" size="24" class="file" value= "<%= drvb.getFileNumber() %>">
- <% }
- %>
- </font></font></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" >
- <% }
- else
- {
- %>
- <input type="text" name="pages" size="24" class="file" value= "<%= drvb.getPages() %>">
- <% } %>
- </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"> 文 档:</font>
- </td>
- <td>
- <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">
- <input type="button" name="Submit" value="保存" class="text" onClick="createDoc(this.form)" >
- <input type="reset" name="Submit11" value="重置" class="file">
- <input type="reset" name="Submit2" value="放弃" class="text" 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>