WorkflowRoute_Modify.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:15k
源码类别:
电子政务应用
开发平台:
Java
- <%
- /**
- * $ RCSfile: WorkflowRoute_Modify.jsp,v $
- * $ Revision: 1.0 $
- * $ Date: 2001/05/018 20:18:46 ,created by Shiyong Jian $
- * $ /mainctrl/template/modifyRoute $
- *
- * This is the workflow template modify page.
- * @author Copyright (c) May. 2001, by VisionNex Technologies Inc., All Right Reversed.
- */
- %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.workflow.pub.value.*" %>
- <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>
- <%@ page import="com.vnex.intranet.util.SubPathGenerater" %>
- <%@ page import="com.vnex.intranet.upload.*"%>
- <%@ page import="com.vnex.intranet.workflow.loader.*" %>
- <%@ page import="com.vnex.intranet.workflow.util.WorkFlowType" %>
- <%@ page import="com.vnex.intranet.util.FieldUtil" %>
- <%@ taglib uri="/vnex_workflow.tld" prefix="workflow" %>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <jsp:useBean id="mySmartUpload" scope="page" class="com.vnex.intranet.upload.SmartUpload" />
- <jsp:useBean id="routeValueBean" scope="session" class="com.vnex.intranet.workflow.pub.value.RouteValueBean" />
- <jsp:useBean id="routeProxy" scope="Application" class="com.vnex.intranet.workflow.route.proxy.RouteProxyBean" />
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <jsp:useBean id="subtaskValueBean" scope="page" class="com.vnex.intranet.workflow.pub.value.SubTaskValueBean" />
- <jsp:setProperty name="subtaskValueBean" property="*" />
- <%@ include file= "/vnex/intranet/workflow/template/WorkflowRoute_Navibar_Head.jsp" %>
- <%
- String attachURL = "";
- if( Integer.parseInt( (String)session.getAttribute( "routeType") )== WorkFlowType.TEMPLATE_TYPE_PERSONAL )
- attachURL = ConfigParaLoader.getParameter("personalTemplateAttachmentUrl");
- if( Integer.parseInt( (String)session.getAttribute( "routeType") ) == WorkFlowType.TEMPLATE_TYPE_COMMON )
- attachURL = ConfigParaLoader.getParameter("commonTemplateAttachmentUrl");
- String flag = request.getParameter("flag");
- if( flag != null && flag.equals("modifyRoute") )
- {
- int pathId = Integer.parseInt( request.getParameter( "routeId" ) );
- routeValueBean = routeProxy.getRouteDetails( pathId );
- session.setAttribute( "routeValueBean" , routeValueBean);
- }
- if( flag != null && flag.equals("addSubtask") )
- {
- routeValueBean.addSubtask( subtaskValueBean );
- session.setAttribute( "routeValueBean" , routeValueBean);
- }
- if( flag != null && flag.equals("modifySubtask") )
- {
- int subtaskId = Integer.parseInt(request.getParameter("subtaskId" ));
- routeValueBean.setSubtask( subtaskId , subtaskValueBean );
- session.setAttribute("routeValueBean",routeValueBean);
- }
- %>
- <%@ include file= "/vnex/intranet/workflow/util/routeFilesUpload.jsp" %>
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script language=JavaScript>
- function uploadDoc(form)
- {
- form.action="/mainctrl/template/modifyRoute?type=1";
- form.encoding="multipart/form-data";
- form.submit();
- }
- function deleteDoc(form)
- {
- if ( confirm("确定删除?") )
- {
- form.action="/mainctrl/template/modifyRoute?type=2";
- form.submit();
- }
- }
- function saveRoute( myform )
- {
- if ( !checkRoute( myform.routeName.value , 'routeName') )
- {
- myform.textValue.focus();
- return false;
- }
- if ( myform.workflowTypeId.value == '-1' )
- {
- alert('请选择工作流模板的类型!');
- myform.workflowTypeId.focus();
- return false;
- }
- if ( !checkRoute( myform.description.value , 'description') )
- {
- myform.description.focus();
- return false;
- }
- if( !checkSequence( myform.stepNos ) )
- return false;
- myform.action= "/mainctrl/template/saveModifyRoute?routeType=<%=routeType%>";
- myform.submit();
- }
- function createSubtask( myform )
- {
- myform.action="/mainctrl/template/createRouteSubtask?flag=routeModify&keepStepNo=true";
- myform.submit();
- }
- function deleteSubtask( myform )
- {
- if ( !isChecked( document.forms[0].subtaskIds ) )
- {
- alert('请选择要删除的任务!');
- return false;
- }
- if ( confirm("确定删除?") )
- {
- myform.action="/mainctrl/template/deleteRouteSubtask2?flag=deleteSubtask";
- myform.submit();
- }
- }
- function cancleCreate( myform )
- {
- myform.action="/mainctrl/template/maintainRoute?routeType=<%=routeType%>";
- myform.submit();
- }
- function modifySubtask( myform, subId )
- {
- myform.action="/mainctrl/template/modifyRouteSubtask?flag=routeModify"+"&subtaskId="+subId;
- myform.submit();
- }
- </script>
- </script>
- <script language="JavaScript" src="/vnex/util/validate.js"></script>
- <script language="JavaScript" src="/vnex/intranet/workflow/util/checkRoute.js"></script>
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <DIV align=center>
- <form name="form1" 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>
- <td colspan="2" height="15" bgcolor="#666666">
- <font class="strongw"><a href="/mainctrl/home/index">
- <font color="#FFFFFF">首页</font></a>>>
- <a href="<%=firstLevelLink%>"><font color="#FFFFFF"><%=firstLevelText%></font></a>>>
- <a href="<%=secondLevelLink%>"><font color="#FFFFFF"><%=secondLevelText%></font></a>>>
- <font color="#fafafa">修改工作流模板</font>
- </td>
- </tr>
- <tr>
- <td width="100" bgcolor="#e0e0e0"> <font class="strong" > 工作流标题:</font>
- </td>
- <td width="456" bgcolor="#e0e0e0">
- <input type="text" name="routeName" value="<%=FieldUtil.filterQuotTag( routeValueBean.getRouteName() ) %>" size="24" class="file"> * (注:带*为必填内容)</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 类型: </font></td>
- <td width="456">
- <select name="workflowTypeId">
- <option value="-1" > 请选择</option>
- <%
- int typeId = routeValueBean.getWorkflowTypeId();
- Hashtable hash = WorkflowLoader.getAllWorkflowType();
- Enumeration enum = hash.keys();
- if(enum != null)
- {
- while(enum.hasMoreElements())
- {
- String key = (String)enum.nextElement();
- String s = (String)hash.get(key);
- if( Integer.parseInt( key ) == WorkFlowType.CONFERENCE )
- continue;
- %>
- <option value="<%= key%>" <% if ( typeId == Integer.parseInt( key ) ) out.println("selected"); %>><%= s%>
- <%}}%>
- </select> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong"> 创建人: </font>
- </td>
- <td width="456"><%= FieldUtil.filterScriptTag( BusinessName.getEmpName() ) %> </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100" > <font class="strong"> 创建时间: </font>
- </td>
- <td width="456"><script language="javascript">
- AfineDate=new Date();
- Month=AfineDate.getMonth()+1;
- document.write ( AfineDate.getYear()+"-"+Month+"-"+AfineDate.getDate() );
- </script>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100" bgcolor="#e0e0e0"><font class="strong"> 工作流描述:
- </font></td>
- <td width="456" bgcolor="#e0e0e0">
- <textarea name="description" cols="59" rows="5"><%=FieldUtil.filterQuotTag( routeValueBean.getDescription() ) %></textarea>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td rowspan="2"><font class="strong"> 上传附件:</font></td>
- <td rowspan="2">
- <select size="5" name="attachments" style="width:300" class="text">
- <workflow:fileList collection="<%=routeValueBean.getRouteFiles()%>">
- <workflow:items>
- <option value="<workflow:fileAttribute attribute='workflowfile_title' />" >
- <workflow:fileAttribute attribute="workflowfile_name"/>
- </option>
- </workflow:items>
- </workflow:fileList>
- </select>
- <input type="button" name="delete" value="删除" class="file" onClick="deleteDoc( this.form )">
- <input type="file" name="file" class="file" size="24">
- <input type="button" name="post" value="上传" class="file" onClick="uploadDoc( this.form )">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0"> </tr>
- <!-- 6-28 modify begin -->
- <tr bgcolor="#e0e0e0">
- <td colspan =3 ><font class="strong"> 子任务:</font> * </td>
- </tr>
- </table>
- <table border="0" cellspacing="1" cellpadding="2" width="600" bgcolor="#e0e0e0" class=title>
- <tr class="table_row_title">
- <td colspan="5" height="30" bgcolor="#fafafa">
- <input type="button" name="newSubtask" style="width:70px" value="新建子任务" class="file" onClick="createSubtask( this.form )" >
- <input type="button" name="delete" value="删除" class="file" onClick="deleteSubtask( this.form )">
- </td>
- </tr>
- <tr class="table_row_title">
- <td align="center" width="7%"><font class="strong">选择</font> </td>
- <td width="14%" align="center" nowrap><font class="strong">顺序</font></td>
- <td width="33%" align="center" nowrap><font class="strong">名称</font></td>
- <td width="27%" align="center" nowrap><font class="strong">执行者</font></td>
- <td width="19%" align="center" nowrap><font class="strong">子任务类型</font></td>
- </tr>
- <workflow:subtaskList routevalue="<%=routeValueBean %>">
- <%
- int subtaskNum = routeValueBean.getSubtaskNum();
- int jj = 0;
- %>
- <workflow:items>
- <tr bgcolor="<vnex:itemsColor />">
- <td align="center" width="7%">
- <input type="checkbox" name="subtaskIds" value="<workflow:subtaskAttribute attribute='subtask_id' />">
- </td>
- <td width="14%" align="center">
- <select name="stepNos">
- <workflow:subtaskAttribute attribute="subtask_stepNo"/>
- <% jj = 0;
- String stepNo= (String)pageContext.getAttribute("stepNo");
- int num = Integer.parseInt( stepNo );
- for( int i= 1 ; i <= subtaskNum ; i++ )
- {
- %>
- <option value="<%=i%>"
- <% if( i == num )
- {
- jj++;
- %> selected
- <%}
- %>
- > <%=i%>
- </option>
- <%
- }
- if( jj == 0 )
- {
- %>
- <option value="<%=num%>" selected ><%=num%></option>
- <%
- }
- %>
- </select>
- </td>
- <td width="33%" align="center">
- <a onClick=" modifySubtask( document.forms[0], '<%=pageContext.getAttribute("subId")%>');return false;" href="#" >
- <workflow:subtaskAttribute attribute="subtask_name" />
- </a></td>
- <td width="27%" >
- <div align="center"><workflow:subtaskAttribute attribute="executor_names" /> </div>
- </td>
- <td width="19%">
- <div align="center"><workflow:subtaskAttribute attribute="subtask_type" /> </div>
- </td>
- </tr>
- </workflow:items>
- <tr bgcolor="#e0e0e0">
- <td align="center" width="7%">
- <input type="checkbox" name="myAll" onClick="checkAll(this.form.subtaskIds, this.form.myAll)">
- </td>
- <td colspan="4" >全选</td>
- </tr>
- </workflow:subtaskList>
- </table>
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr align="center">
- <td height="30">
- <input type="button" name="save" value="保存" class="file" onClick=" saveRoute( this.form )" >
- <input type="button" name="cut" value="放弃" class="file" onClick=" cancleCreate( this.form )" >
- </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>