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