flow_query.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:7k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="java.util.*"%>
  3. <%@ page import="cn.js.fan.util.*"%>
  4. <%@ page import="cn.js.fan.web.*"%>
  5. <%@ page import="com.redmoon.oa.flow.*"%>
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <link rel="stylesheet" type="text/css" href="common.css">
  11. <title>流程查询</title>
  12. <script>
  13. function findObj(theObj, theDoc)
  14. {
  15.   var p, i, foundObj;
  16.   
  17.   if(!theDoc) theDoc = document;
  18.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  19.   {
  20.     theDoc = parent.frames[theObj.substring(p+1)].document;
  21.     theObj = theObj.substring(0,p);
  22.   }
  23.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  24.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  25.     foundObj = theDoc.forms[i][theObj];
  26.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  27.     foundObj = findObj(theObj,theDoc.layers[i].document);
  28.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  29.   
  30.   return foundObj;
  31. }
  32. var GetDate=""; 
  33. function SelectDate(ObjName,FormatDate){
  34. var PostAtt = new Array;
  35. PostAtt[0]= FormatDate;
  36. PostAtt[1]= findObj(ObjName);
  37. GetDate = showModalDialog("util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:221px;status:no;help:no;");
  38. }
  39. function SetDate()
  40. findObj(ObjName).value = GetDate; 
  41. }
  42. </script>
  43. </head>
  44. <body>
  45. <%
  46. String dirCode = ParamUtil.get(request, "dirCode");
  47. if (dirCode.equals("")) {
  48. out.print(StrUtil.p_center("请选择流程类型!"));
  49. return;
  50. }
  51. Leaf lf = new Leaf();
  52. lf = lf.getLeaf(dirCode);
  53. if (lf==null || !lf.isLoaded()) {
  54. out.print(SkinUtil.makeErrMsg(request, "节点不存在!"));
  55. return;
  56. }
  57. if (lf.getType()==lf.TYPE_NONE)
  58. return;
  59. FormDb fd = new FormDb();
  60. fd = fd.getFormDb(lf.getFormCode());
  61. %>
  62. <table class="main" cellSpacing="1" width="98%" align="center" border="0">
  63.   <form name="form1" action="flow_query_result.jsp?op=queryFlow" method="post">
  64.     <tbody>
  65.       <tr>
  66.         <td noWrap colSpan="3" class="right-title"><b>工作流程基本信息</b></td>
  67.       </tr>
  68.       <tr>
  69.         <td width="136" noWrap><b>流程类型:</b></td>
  70.         <td colSpan="2">
  71.   <%=lf.getName()%><input type="hidden" name="typeCode" value="<%=lf.getCode()%>" />   </td>
  72.       </tr>
  73.       <tr>
  74.         <td noWrap><b>工作流状态:</b></td>
  75.         <td colSpan="2"><select name="status">
  76.             <option value="1000" selected>所有</option>
  77.             <option value="<%=WorkflowDb.STATUS_NOT_STARTED%>">未开始</option>
  78.             <option value="<%=WorkflowDb.STATUS_STARTED%>">处理中</option>
  79.             <option value="<%=WorkflowDb.STATUS_FINISHED%>">已完成</option>
  80.             <option value="<%=WorkflowDb.STATUS_DISCARDED%>">已放弃</option>
  81.           </select></td>
  82.       </tr>
  83.       <tr>
  84.         <td noWrap><b>流程名称:</b></td>
  85.         <td width="89" noWrap><select name="title_cond">
  86.             <option value="0" selected>包含</option>
  87.             <option value="1">等于</option>
  88.         </select></td>
  89.         <td width="253"><input maxLength="100" size="30" name="title"></td>
  90.       </tr>
  91.       <tr>
  92.         <td noWrap><b>流程开始日期:</b></td>
  93.         <td colSpan="2">
  94.   从 <input size="10" name="fromDate"><img style="CURSOR: hand" onclick="SelectDate('fromDate', 'yyyy-MM-dd')" src="images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26"> 
  95.           至 <input size="10" name="toDate"><img style="CURSOR: hand" onclick="SelectDate('toDate', 'yyyy-MM-dd')" src="images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26"> </td>
  96.       </tr>
  97.       <tr>
  98.         <td noWrap><b>流程结束日期:</b></td>
  99.         <td colSpan="2">从
  100.           <input size="10" name="fromEndDate" />
  101.           <img style="CURSOR: hand" onclick="SelectDate('fromEndDate', 'yyyy-MM-dd')" src="images/form/calendar.gif" align="absmiddle" border="0" width="26" height="26" /> 至
  102.           <input size="10" name="toEndDate" />
  103.         <img style="CURSOR: hand" onclick="SelectDate('toEndDate', 'yyyy-MM-dd')" src="images/form/calendar.gif" align="absmiddle" border="0" width="26" height="26" /> </td>
  104.       </tr>
  105.       
  106.       <tr class="TableControl" align="middle">
  107.         <td colSpan="3" align="center" noWrap><input class="BigButton"  type="submit" value="查询">&nbsp;&nbsp;&nbsp;&nbsp; 
  108.           <input type="reset" value="重设" name="back1"></td>
  109.       </tr>
  110.   </form>
  111.   <form method="post" name=form2 action="flow_query_result.jsp?op=queryForm">
  112.       <tr>
  113.         <td class="TableHeader" noWrap colSpan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  114.   <tr class="TableLine2">
  115.     <td colspan="3"><b>表单数据信息(表单名称:<%=fd.getName()%>)</b>       </td>
  116.       </tr>
  117.             <%
  118. Iterator ir = fd.getFields().iterator();
  119. while (ir.hasNext()) {
  120. FormField ff = (FormField)ir.next();
  121. %>
  122.   <tr class="TableLine2">
  123.             <td width="29%"><%=ff.getTitle()%>:</td>
  124.     <td width="19%" nowrap="nowrap">
  125.   <%if (ff.getType().equals(ff.TYPE_DATE) || ff.getType().equals(ff.TYPE_DATE_TIME)) {%>
  126. 从 <input size="10" name="<%=ff.getName()%>FromDate"><img style="CURSOR: hand" onclick="SelectDate('<%=ff.getName()%>FromDate', 'yyyy-MM-dd')" src="images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26"> 
  127.      <%}else{%>
  128. <select name="<%=ff.getName()%>_cond">
  129.   <option value="1">等于</option>
  130.   <%if (ff.getType().equals(ff.TYPE_TEXTFIELD) || ff.getType().equals(ff.TYPE_TEXTAREA) || ff.getType().equals(ff.TYPE_MACRO)) {%>
  131.   <option value="0" selected>包含</option>
  132.   <%}%>
  133. </select>
  134.  <%}%> </td>
  135.     <td width="52%">
  136. <%if (ff.getType().equals(ff.TYPE_DATE) || ff.getType().equals(ff.TYPE_DATE_TIME)) {%>
  137.            至 <input size="10" name="<%=ff.getName()%>ToDate"><img style="CURSOR: hand" onclick="SelectDate('<%=ff.getName()%>ToDate', 'yyyy-MM-dd')" src="images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26">
  138. <%}else{%>
  139. <input name="<%=ff.getName()%>" />
  140. <%}%>
  141.     (<%=ff.getTypeDesc()%>) </td>
  142.       </tr>
  143.   <%}%>
  144.         </table></td>
  145.       </tr>
  146.       <tr class="TableControl" align="middle">
  147.         <td colSpan="3" align="center" noWrap><input class="BigButton"  type="submit" value="查询">&nbsp;&nbsp;&nbsp;&nbsp; 
  148.           <input type="hidden" name="typeCode" value="<%=lf.getCode()%>" /></td>
  149.       </tr>
  150.     </tbody>
  151.   </form>
  152. </table>
  153. </body>
  154. </html>