Project_Create_Select.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:9k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  2. <%@ taglib uri="/vnex_workflow.tld" prefix="vnex_workflow" %>
  3. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  4. <%@ page import="com.vnex.intranet.pub.BusinessSession"%>
  5. <%@ page import="com.vnex.intranet.workflow.util.*"%>
  6. <%@ page import="com.vnex.intranet.workflow.pub.value.*"%>
  7. <%@ page import="com.vnex.intranet.workflow.pub.value.SubTaskValueBean" %>
  8. <%@ page import="com.vnex.intranet.workflow.projectmanagement.value.PmValueBean" %>
  9. <%@ page import="com.vnex.intranet.util.*"%>
  10. <%@ page import="java.util.*"%>
  11. <jsp:useBean id="routeProxy" scope="application" class="com.vnex.intranet.workflow.route.proxy.RouteProxyBean" />
  12. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  13. <jsp:useBean id="routeInfo" scope="page" class="com.vnex.intranet.workflow.pub.value.RouteValueBean" />
  14. <jsp:useBean id="pvb" scope="session" class="com.vnex.intranet.workflow.projectmanagement.value.PmValueBean"/>
  15. <%            
  16.     pvb = new PmValueBean();
  17.     ArrayList subtasks = new ArrayList(); 
  18.     int templateId = 0;
  19.     int iCheck = 1;
  20.     if ( request.getParameter("check")!=null  )
  21.         iCheck = Integer.parseInt(request.getParameter("check"));
  22.         
  23.     if( request.getParameter("templateId") !=null && iCheck < 3 )
  24.     {
  25.         if( iCheck == 1 )
  26.             templateId = Integer.parseInt(request.getParameter("templateId"));
  27.         else if( iCheck == 2 )
  28.             templateId = Integer.parseInt(request.getParameter("templateId2"));
  29.         if ( templateId!= -1 ) 
  30.         {  
  31.             routeInfo = routeProxy.getRouteDetails( templateId );
  32.             subtasks = routeInfo.getSubtaskList();
  33.         }
  34.     }
  35.     pvb.setRoute( routeInfo );
  36.     pvb.setTitle( routeInfo.getRouteName() );
  37.     pvb.setDescription( routeInfo.getDescription() );
  38.     pvb.setFiles( routeInfo.getRouteFiles() );
  39.     
  40.     session.setAttribute( "pvb", pvb );        
  41. %>
  42. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  43. <HTML>
  44. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  45. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  46. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  47. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  48. <script language=JavaScript>
  49. function getRoute(form,iCheck)
  50. {
  51.    form.action="/mainctrl/projectmanagement/createselect?check=" + iCheck;
  52.    form.submit();
  53. }
  54. function create(form)
  55. {
  56.    if( check( form ) )
  57.    {
  58.        form.action="/mainctrl/projectmanagement/createproject";
  59.        form.submit();
  60.    }
  61. }
  62. function check(form)
  63. {
  64.    if( form.R1[0].checked && form.templateId.value == -1 )
  65.    {
  66.       alert("请选择标准工作流模板.");
  67.       return false;
  68.    }  
  69.    
  70.    if( form.R1[1].checked && form.templateId2.value == -1 )
  71.    {
  72.       alert("请选择个人工作流模板.");
  73.       return false;
  74.    }  
  75.    
  76.    return true;
  77. }
  78. </script>
  79. <DIV align=center>
  80.   <form name="form1" method="post" >
  81.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  82.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  83.     <TR> 
  84.         <TD colSpan=3 align="center">
  85.           <br><!--个人信息开始 -->
  86.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  87.             <tr bgcolor="#fafafa"> 
  88.               <td bgcolor="#fafafa"> 
  89.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  90.                   <tr bgcolor="#666666"> 
  91.                     <td colspan="2" height="15"><font class="strongw">&nbsp;<a href="/mainctrl/system/main"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>&gt;&gt;<a href="/mainctrl/projectmanagement/projectlist"><font color="#FFFFFF">工程项目管理</font></a>&gt;&gt;<font color="#FFFFFF">项目路径选择</font> 
  92.                       </font></td>
  93.                   </tr>
  94.                   <tr bgcolor="#fafafa"> 
  95.                     <td colspan="2" height="30">&nbsp; 
  96.                       <input type="button" name="Submit" style="width:60px" value="创建项目" class="file" onClick="create( this.form )">&nbsp;&nbsp;
  97.                       <input type="reset" name="Submit2" value="放弃" class="file" onClick="location='/mainctrl/projectmanagement/projectlist'">
  98.                     </td>
  99.                   </tr>
  100.                   <tr bgcolor="#e0e0e0"> 
  101.                     <td width="169"> 
  102.                       <input type="radio" value=1 
  103.                       <% if( iCheck == 1 ) { %>checked
  104.                       <%}%>
  105.                       name=R1>
  106.                       <font  class="strong"> 选择标准工作流模板:</font></td>
  107.                     <td width="418"> 
  108.                       <select name="templateId" onChange="getRoute( this.form, 1 )"> 
  109.                         <option value= -1 selected>请选择</option>                                            
  110.                         <vnex_workflow:routeList routeType="<%=WorkFlowType.TEMPLATE_TYPE_COMMON%>" workflowType="<%=WorkFlowType.PROJECT %>"  >       
  111.                            <vnex:items select='<%= String.valueOf( templateId )  %>'>
  112.                              <option value="<vnex_workflow:routeAttribute attribute='route_id' />" <vnex_workflow:routeAttribute attribute='isSelected' /> >
  113.                                 <vnex_workflow:routeAttribute attribute="route_name" />
  114.                              </option>
  115.                            </vnex:items>
  116.                         </vnex_workflow:routeList>
  117.                         </select>
  118.                       </select>
  119.                     </td>
  120.                   </tr>
  121.                   <tr bgcolor="#fafafa"> 
  122.                     <td width="169"> 
  123.                       <input type="radio" value=2 
  124.                        <% if( iCheck == 2 ) { %>checked
  125.                       <%}%>
  126.                       name=R1>
  127.                       <font  class="strong"> 选择个人工作流模板:</font></td>
  128.                     <td width="418"> 
  129.                       <select name="templateId2" onChange="getRoute( this.form, 2 )">
  130.                         <option value= -1 selected>请选择</option>
  131.                         <vnex_workflow:routeList routeType="<%=WorkFlowType.TEMPLATE_TYPE_PERSONAL%>" workflowType="<%=WorkFlowType.PROJECT %>" PersonId="<%= BusinessName.getEmpId() %>" >       
  132.                            <vnex:items select='<%= String.valueOf( templateId ) %>'>
  133.                              <option value="<vnex_workflow:routeAttribute attribute='route_id' />"  <vnex_workflow:routeAttribute attribute='isSelected' />>
  134.                                     <vnex_workflow:routeAttribute attribute="route_name" />
  135.                              </option>
  136.                            </vnex:items>
  137.                         </vnex_workflow:routeList>
  138.                       </select>
  139.                     </td>
  140.                   </tr>
  141.                   <tr bgcolor="#e0e0e0"> 
  142.                     <td width="169"> 
  143.                       <input type="radio" value=3 name=R1 onClick="getRoute( this.form, 3 )"
  144.                       <% if( iCheck == 3 ) { %>checked
  145.                       <%}%>
  146.                        >
  147.                       <font  class="strong">新建项目管理路径</font></td>
  148.                     <td width="418"> </td>
  149.                   </tr>
  150.                 </table>
  151.                 <table border="0" cellspacing="1" cellpadding="2" width="600" class=title>
  152.                   <tr class="table_row_title"> 
  153.                     <td width="13%" align="center" nowrap><font  class="strong">顺序</font></td>
  154.                     <td width="36%" align="center" nowrap><font  class="strong">子任务名称</font></td>
  155.                     <td width="28%" align="center" nowrap><font  class="strong">执行者</font></td>
  156.                     <td width="23%" align="center" nowrap><font  class="strong">角色</font></td>
  157.                   </tr>
  158.         
  159.                   <vnex_workflow:subtaskList routevalue="<%=routeInfo %>">                       
  160.                      <vnex:items> 
  161.                   <tr bgcolor="<vnex:itemsColor />"> 
  162.                     <td width="13%" align="center" ><vnex_workflow:subtaskAttribute attribute="subtask_stepNo"/></td>
  163.                     <td width="36%" align="center"><vnex_workflow:subtaskAttribute attribute="subtask_name" /></td>
  164.                     <td width="28%"> 
  165.                         <div align="center"><vnex_workflow:subtaskAttribute attribute="executor_names" /></div>
  166.                     </td>
  167.                     <td width="23%"> 
  168.                         <div align="center"><vnex_workflow:subtaskAttribute attribute="subtask_type" /></div>
  169.                     </td>
  170.                   </tr>
  171.                   </vnex:items> 
  172.                  </vnex_workflow:subtaskList> 
  173.                 </table>
  174.               </td>
  175.             </tr>
  176.           </table>          
  177.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  178.        </TD>
  179.     </TR>
  180.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  181.     </TABLE>
  182.   <BR>
  183.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  184. </form></DIV>
  185. </BODY></HTML>