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="java.util.*"%>
  11. <jsp:useBean id="routeValueBean" scope="page" class="com.vnex.intranet.workflow.pub.value.RouteValueBean"/>
  12. <jsp:useBean id="routeProxy" scope="application" class="com.vnex.intranet.workflow.route.proxy.RouteProxyBean" />
  13. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  14. <jsp:useBean id="routeInfo" scope="page" class="com.vnex.intranet.workflow.pub.value.RouteValueBean" />
  15. <jsp:useBean id="persondocbean" scope="session" class="com.vnex.intranet.workflow.document.value.DocumentSendValueBean"/>
  16. <%            
  17.     persondocbean = new DocumentSendValueBean();
  18.     ArrayList subtasks = new ArrayList(); 
  19.     int templateId = 0;
  20.     int iCheck = 1;
  21.     if ( request.getParameter("check")!=null  )
  22.         iCheck = Integer.parseInt(request.getParameter("check"));
  23.         
  24.     if( request.getParameter("templateId") !=null && iCheck < 3 )
  25.     {
  26.         if( iCheck == 1 )
  27.             templateId = Integer.parseInt(request.getParameter("templateId"));
  28.         else if( iCheck == 2 )
  29.             templateId = Integer.parseInt(request.getParameter("templateId2"));
  30.         if ( templateId!= -1 ) 
  31.         {  
  32.             routeInfo = routeProxy.getRouteDetails( templateId );
  33.             subtasks = routeInfo.getSubtaskList();
  34.         }
  35.     }
  36.     persondocbean.setRoute( routeInfo );
  37.     persondocbean.setTitle( routeInfo.getRouteName() );
  38.     persondocbean.setDescription( routeInfo.getDescription() );
  39.     persondocbean.setFiles( routeInfo.getRouteFiles() );
  40.     
  41.     session.setAttribute( "persondocument", persondocbean );
  42.         
  43. %>
  44. <script language=JavaScript>
  45. function getRoute(form,iCheck)
  46. {
  47.    form.action="/mainctrl/personal/document/sentcreateselect?check=" + iCheck;
  48.    form.submit();
  49. }
  50. function create(form)
  51. {
  52.    if( check( form ) )
  53.    {
  54.        form.action="/mainctrl/personal/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_person.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"><font class="strongw"><a href="/mainctrl/system/main"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/personal/main">
  97.                     <font color="#FFFFFF">个人办公</font></a>&gt;&gt;<a href="/mainctrl/personal/document/sentlist"><font color="#FFFFFF">发文管理</font></a>&gt;&gt;选择路径 
  98.                       </font></td>
  99.                   </tr>
  100.                   <tr bgcolor="#fafafa"> 
  101.                     <td colspan="2" height="30">&nbsp; 
  102.                       <input type="button" name="Submit" style="width:30px" value="新建" class="file" onClick="create( this.form )">&nbsp;&nbsp;
  103.                       <input type="reset" name="Submit2" value="放弃" class="file" onClick="location='/mainctrl/personal/document/sentlist'">
  104.                     </td>
  105.                   </tr>
  106.                   <tr bgcolor="#e0e0e0"> 
  107.                     <td width="169"> 
  108.                       <input type="radio" value=1 
  109.                       <% if( iCheck == 1 ) { %>checked
  110.                       <%}%>
  111.                       name=R1>
  112.                       <font  class="strong"> 选择标准工作流模板:</font></td>
  113.                     <td width="418"> 
  114.                       <select name="templateId" onChange="getRoute( this.form, 1 )"> 
  115.                         <option value= -1 selected>请选择</option>                                            
  116.                         <vnex_workflow:routeList routeType="<%=WorkFlowType.TEMPLATE_TYPE_COMMON%>" workflowType="<%=WorkFlowType.PERSONAL %>" >       
  117.                            <vnex:items select='<%= String.valueOf( templateId )  %>'>
  118.                              <option value="<vnex_workflow:routeAttribute attribute='route_id' />" <vnex_workflow:routeAttribute attribute='isSelected' /> >
  119.                                 <vnex_workflow:routeAttribute attribute="route_name" />
  120.                              </option>
  121.                            </vnex:items>
  122.                         </vnex_workflow:routeList>
  123.                         </select>
  124.                       </select>
  125.                     </td>
  126.                   </tr>
  127.                   <tr bgcolor="#fafafa"> 
  128.                     <td width="169"> 
  129.                       <input type="radio" value=2 
  130.                        <% if( iCheck == 2 ) { %>checked
  131.                       <%}%>
  132.                       name=R1>
  133.                       <font  class="strong"> 选择个人工作流模板:</font></td>
  134.                     <td width="418"> 
  135.                       <select name="templateId2" onChange="getRoute( this.form, 2 )">
  136.                         <option value= -1 selected>请选择</option>
  137.                         <vnex_workflow:routeList routeType="<%=WorkFlowType.TEMPLATE_TYPE_PERSONAL%>" workflowType="<%=WorkFlowType.PERSONAL %>" PersonId="<%= BusinessName.getEmpId() %>" >       
  138.                            <vnex:items select='<%= String.valueOf( templateId ) %>'>
  139.                              <option value="<vnex_workflow:routeAttribute attribute='route_id' />"  <vnex_workflow:routeAttribute attribute='isSelected' />>
  140.                                     <vnex_workflow:routeAttribute attribute="route_name" />
  141.                              </option>
  142.                            </vnex:items>
  143.                         </vnex_workflow:routeList>
  144.                       </select>
  145.                     </td>
  146.                   </tr>
  147.                   <tr bgcolor="#e0e0e0"> 
  148.                     <td width="169"> 
  149.                       <input type="radio" value=3 name=R1 onClick="getRoute( this.form, 3 )"
  150.                       <% if( iCheck == 3 ) { %>checked
  151.                       <%}%>
  152.                        >
  153.                       <font  class="strong">新建发文路径</font></td>
  154.                     <td width="418"> </td>
  155.                   </tr>
  156.                 </table>
  157.                 <table border="0" cellspacing="1" cellpadding="2" width="600" class=title>
  158.                   <tr class="table_row_title"> 
  159.                     <td width="13%" align="center" nowrap><font  class="strong">顺序</font></td>
  160.                     <td width="36%" align="center" nowrap><font  class="strong">子任务名称</font></td>
  161.                     <td width="28%" align="center" nowrap><font  class="strong">执行者</font></td>
  162.                     <td width="23%" align="center" nowrap><font  class="strong">角色</font></td>
  163.                   </tr>
  164.         
  165.                   <vnex_workflow:subtaskList routevalue="<%=routeInfo %>">                       
  166.                      <vnex:items> 
  167.                   <tr bgcolor="<vnex:itemsColor />"> 
  168.                     <td width="13%" align="center"><vnex_workflow:subtaskAttribute attribute="subtask_stepNo"/></td>
  169.                     <td width="36%" align="center"><vnex_workflow:subtaskAttribute attribute="subtask_name" /></td>
  170.                     <td width="28%" > 
  171.                         <div align="center"><vnex_workflow:subtaskAttribute attribute="executor_names" /></div>
  172.                     </td>
  173.                     <td width="23%" > 
  174.                         <div align="center"><vnex_workflow:subtaskAttribute attribute="subtask_type" /></div>
  175.                     </td>
  176.                   </tr>
  177.                   </vnex:items> 
  178.                  </vnex_workflow:subtaskList> 
  179.                 </table>
  180.               </td>
  181.             </tr>
  182.           </table>
  183. <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  184. </TD>
  185.     </TR>
  186.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  187.     </TABLE>
  188.   <BR>
  189.    <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  190. </form></DIV>
  191. </BODY></HTML>