Office_Document_Sending_Create.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:16k
源码类别:
电子政务应用
开发平台:
Java
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_workflow.tld" prefix="vnex_workflow" %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="java.util.*" %>
- <%@ page import="com.vnex.intranet.util.TimeStamp" %>
- <%@ page import="com.vnex.intranet.workflow.document.value.*" %>
- <%@ page import="com.vnex.intranet.workflow.util.*" %>
- <%@ page import="com.vnex.intranet.workflow.pub.value.WorkflowFileValueBean" %>
- <%@ page import="com.vnex.intranet.workflow.pub.value.SubTaskValueBean" %>
- <%@ page import="com.vnex.intranet.workflow.loader.WorkflowLoader" %>
- <%@ page import="com.vnex.intranet.util.*"%>
- <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>
- <%@ page import="com.vnex.intranet.util.FieldUtil" %>
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <jsp:useBean id="dsvb" scope="session" class="com.vnex.intranet.workflow.document.value.DocumentSendValueBean"/>
- <jsp:useBean id="routeInfo" scope="session" class="com.vnex.intranet.workflow.pub.value.RouteValueBean" />
- <%
- // this attribute used by FileAttributeTag.java to change encode of chinese file name to view.
- pageContext.setAttribute("encodeFlag" , "false");
- if( request.getParameter("type") == null )
- {
- dsvb = ( DocumentSendValueBean )session.getAttribute( "document" );
- String root = ConfigParaLoader.getParameter("rootUrl");
- String attachURL = ConfigParaLoader.getParameter("documentAttachmentUrl");
- Collection files = dsvb.getFiles();
- Iterator c = files.iterator();
- while( c.hasNext() )
- {
- WorkflowFileValueBean wf = ( WorkflowFileValueBean )c.next();
- String ff = wf.getTitle();
- String sTitle = SubPathGenerater.copyFile( root + SubPathGenerater.getSeperator() + ff, SubPathGenerater.getSeperator() + root + SubPathGenerater.getSeperator() + attachURL );
- wf.setTitle( attachURL + "/" + sTitle );
- }
- dsvb.setFiles( files );
- }
- if( request.getParameter("type") !=null && Integer.parseInt( request.getParameter("type") ) == 1 ) //上传文件
- {
- %>
- <vnex_workflow:docfileupload />
- <% dsvb = ( DocumentSendValueBean )session.getAttribute( "document" );
- }
- if( request.getParameter("type") !=null && Integer.parseInt( request.getParameter("type") ) == 2 ) //Delete文件
- {
- %>
- <vnex_workflow:docfileremove />
- <%
- dsvb = ( DocumentSendValueBean )session.getAttribute( "document" );
- }
- routeInfo = dsvb.getRoute();
- ArrayList subtasks = routeInfo.getSubtaskList();
- %>
- <jsp:include page="/vnex/head.jsp"/>
- <script language="JavaScript" src="/vnex/util/validate.js"></script>
- <script language=JavaScript>
- function createDoc( form, type )
- {
- if(checkIt(form))
- {
- checkAll(document.forms[0].attachments);
- form.action="/mainctrl/office/document/sentcreateok?type=" + type;
- form.submit();
- }
- }
- function uploadDoc(form)
- {
- form.action="/mainctrl/office/document/sentcreate?type=1";
- form.encoding="multipart/form-data";
- form.submit();
- }
- function deleteDoc(form)
- {
- form.action="/mainctrl/office/document/sentcreate?type=2";
- form.submit();
- }
- function saveRoute(form)
- {
- if( checkSequence( form.stepNos ) )
- {
- form.action="/mainctrl/office/document/routepersonalcreate";
- 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( form.description.value.length >400 )
- {
- alert("发文内容的长度不能超过400位.");
- form.description.focus();
- return false;
- }
- if( form.keyword.value.length >400 )
- {
- alert("发文关键字的长度不能超过400位.");
- form.keyword.focus();
- return false;
- }
- return checkSequence( form.stepNos );
- return true;
- }
- function checkAll( selObj )
- {
- for ( var i = 0; i < selObj.options.length; i++ )
- selObj.options[i].selected = true;
- }
- function addSub( form )
- {
- form.action="/mainctrl/office/document/sentsubtaskcreate?isDocCreate=docCreate";
- form.submit();
- }
- function deleteSub( myform )
- {
- if( confirm( "确定要删除选择的子任务?" ) )
- {
- myform.action="/mainctrl/office/document/sentsubtaskdelete?isDocCreate=docCreate";
- myform.submit();
- }
- }
- function modifySubtask(form,id)
- {
- form.action="/mainctrl/office/document/sentsubtaskmodify?subtaskId="+id+"&isDocCreate=docCreate";
- form.submit();
- }
- 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 );
- }
- }
- }
- </script>
- <script language="JavaScript" src="/vnex/intranet/workflow/util/checkRoute.js"></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>
- window.onload=init
- </SCRIPT>
- <DIV align=center>
- <form name="myform" method="post" >
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <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 bgcolor="#fafafa">
- <td bgcolor="#fafafa">
- <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
- <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/sentlist"><font color="#FFFFFF">发文管理</font></a>>>新建发文
- </font></td>
- </tr>
- <tr>
- <td width="100" bgcolor="#e0e0e0"> <font class="strong"> 标题:</font>
- </td>
- <td width="456" bgcolor="#e0e0e0">
- <input type="text" name="title" size="24" class="file" value="<%= FieldUtil.filterQuotTag( dsvb.getTitle() ) %>">
- * (注:带*为必填内容)</td>
- </tr>
- <tr bgcolor="#ffffff">
- <td width="100"> <font class="strong"> 紧急程度:</font> </td>
- <td width="456">
- <select name="instancyType">
- <%
- Iterator itypes = InstancyType.getAvailableInstancyTypes().iterator();
- while ( itypes.hasNext() )
- {
- InstancyType itype = ( InstancyType )itypes.next();
- %>
- <option value="<%= itype.getId() %>" <% if( dsvb.getInstancyType()!= null && itype.getId()==dsvb.getInstancyType().getId() ) out.print("selected"); %>>
- <%= itype.getName() %></option>
- <%
- }
- %>
- </select>
- </td>
- </tr>
- <tr>
- <td width="100" bgcolor="#e0e0e0"> <font class="strong"> 秘密等级:</font> </td>
- <td width="456" bgcolor="#e0e0e0">
- <select name="securityType">
- <%
- Iterator types = SecurityType.getAvailableSecurityTypes().iterator();
- while ( types.hasNext() )
- {
- SecurityType rtype = ( SecurityType )types.next();
- %>
- <option value="<%= rtype.getId() %>" <% if ( dsvb.getSecurityType()!= null && rtype.getId()==dsvb.getSecurityType().getId() ) out.print("selected"); %>>
- <%= rtype.getName() %></option>
- <%
- }
- %>
- </select>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"><font class="strong"> 主题词: </font></td>
- <td width="456">
- <input type="text" name="keyword" size="24" class="file" value="<%= FieldUtil.filterQuotTag( dsvb.getKeyword() ) %>">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"><font class="strong"> 发件摘要:</font></td>
- <td width="456">
- <textarea name="description" cols="59" rows="5"><%= FieldUtil.filterQuotTag( dsvb.getDescription() ) %></textarea>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td rowspan="2"><font class="strong"> 上传附件:<br>(注:点击附件名称查看附件内容)</font></td>
- <td rowspan="2">
- <!--select name="attachments" size="4" multiple style="width:350" onChange="openAttach( document.forms[0].attachments )"-->
- <select name="attachments" size="4" multiple style="width:350" >
- <vnex_workflow:fileList collection="<%= dsvb.getFiles()%>">
- <vnex:items>
- <option value = "<vnex_workflow:fileAttribute attribute="workflowfile_Title"/>">
- <vnex_workflow:fileAttribute attribute="workflowfile_name"/></option>
- </vnex:items>
- </vnex_workflow:fileList>
- </select>
- <input type="button" name="Submit222" value="删除" class="file" onClick="deleteDoc( this.form )">
- <input type="file" name="file" class="file" size="24">
- <input type="button" name="Submit22" value="上传" class="file" onClick="uploadDoc( this.form )">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0"> </tr>
- <!-- 6-28 modify begin -->
- <tr bgcolor="#e0e0e0">
- <td colspan =4 ><font class="strong"> 发文路径:</font> </td>
- </tr>
- </table>
- <table border="0" cellspacing="1" cellpadding="2" class=title width="600">
- <tr class="table_row_title">
- <td colspan="6" height="30" bgcolor="#fafafa">
- <input type="button" name="Submit3" style="width:70px" value="新建子任务" class="file" onClick="addSub( this.form )">
- <input type="reset" name="Submit23" value="删除" class="file" onClick="deleteSub( this.form )">
- </td>
- </tr>
- <tr class="table_row_title">
- <td align="center" width="42"><font class="strong">选择</font>
- </td>
- <td align="center" nowrap width="7%"><font class="strong">顺序</font></td>
- <td align="center" nowrap width="112"><font class="strong">子任务名称</font></td>
- <td align="center" nowrap width="109"><font class="strong">执行者</font></td>
- <td align="center" nowrap width="104"><font class="strong">子任务类型</font></td>
- <td align="center" nowrap width="93"><font class="strong">截止时间</font></td>
- </tr>
- <%
- for( int i = 0; i < subtasks.size(); i++ )
- {
- SubTaskValueBean sub = ( SubTaskValueBean )subtasks.get(i);
- int jj = 0;
- if( i%2 == 0)
- {
- %>
- <tr bgcolor="#fafafa" align="center">
- <%}else{
- %>
- <tr bgcolor="#e0e0e0" align="center">
- <%}
- %>
- <td align="center" width="42">
- <input type="checkbox" name="subId" value="<%=sub.getSubtaskId() %>">
- </td>
- <td width="103" align="center">
- <select name="stepNos">
- <% for( int j = 0; j < subtasks.size(); j++ )
- {
- %>
- <option value="<%=j+1%>"
- <%if( sub.getSubStepNo() == j+1 ) {%>
- selected
- <%jj++;}%>
- ><%=j+1%></option>
- <%
- }
- if( jj == 0 )
- {
- %>
- <option value="<%=sub.getSubStepNo()%>" selected ><%=sub.getSubStepNo()%></option>
- <%
- }
- %>
- </select></td>
- <td width="112" align="center">
- <a onclick="modifySubtask(myform,'<%= sub.getSubtaskId() %>');return false;" href="#"><%= sub.getSubTitle() %></a>
- </td>
- <td width="109" align="center">
- <div align="center"><%=sub.getSubExecutorName() %></div>
- </td>
- <td width="104" align="center">
- <div align="center"><%= WorkflowLoader.getSubtaskType( sub.getSubTypeId() ) %></div>
- </td>
- <td width="93" align="center">
- <div align="center"><%= sub.getSubPlanEndTimeS() %></div>
- </td>
- </tr>
- <%
- }
- if( subtasks.size() > 0 )
- {
- %>
- <tr bgcolor="#e0e0e0">
- <td align="center" width="42">
- <input type="checkbox" name="C1" value="ON" onClick="SelectAll( this.form )">
- </td>
- <td colspan="5" > 全选</td>
- </tr>
- <% }
- %>
- </table>
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr align="center">
- <td height="30">
- <input type="button" name="Submit" value="保存" class="file" onClick="createDoc(this.form, 'false')">
- <input type="button" style="width:70px" name="Submit" value="保存并发布" class="file" onClick="createDoc( this.form, 'true')">
- <input type="button" style="width:85px" name="Submit" value="存为个人模板" class="file" onClick="saveRoute(this.form)">
- <input type="button" name="Submit2" value="放弃" class="file" onClick="location='/mainctrl/office/document/sentlist'">
- </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" />
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>