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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import="cn.js.fan.util.*"%>
  3. <%@ page import="cn.js.fan.db.*"%>
  4. <%@ page import="cn.js.fan.web.*"%>
  5. <%@ page import="com.redmoon.oa.flow.*"%>
  6. <%@ page import="com.redmoon.oa.dept.*"%>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  8. <html>
  9. <head>
  10. <title>我发起的流程列表</title>
  11. <link href="admin/default.css" rel="stylesheet" type="text/css">
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <style type="text/css">
  14. <!--
  15. .style4 {
  16. color: #FFFFFF;
  17. font-weight: bold;
  18. }
  19. .STYLE5 {color: #CC6600}
  20. -->
  21. </style>
  22. </head>
  23. <body bgcolor="#FFFFFF" text="#000000">
  24. <jsp:useBean id="docmanager" scope="page" class="cn.js.fan.module.cms.DocumentMgr"/>
  25. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  26. <%
  27. String priv="read";
  28. if (!privilege.isUserPrivValid(request,priv))
  29. {
  30. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  31. return;
  32. }
  33. String op = StrUtil.getNullString(request.getParameter("op"));
  34. if (op.equals("del")) {
  35. }
  36. %>
  37. <table cellSpacing="0" cellPadding="0" width="100%">
  38.   <tbody>
  39.     <tr>
  40.       <td height="28" class="head"><a href="flow_list_attend.jsp">我参与的工作流</a>&nbsp;&nbsp;|&nbsp;&nbsp;<span class="STYLE5">我发起的工作流</span>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="flow_list_done.jsp">历史办理记录</a></td>
  41.     </tr>
  42.   </tbody>
  43. </table>
  44. <%
  45. String strcurpage = StrUtil.getNullString(request.getParameter("CPages"));
  46. if (strcurpage.equals(""))
  47. strcurpage = "1";
  48. if (!StrUtil.isNumeric(strcurpage)) {
  49. out.print(StrUtil.makeErrMsg("标识非法!"));
  50. return;
  51. }
  52. int pagesize = 20;
  53. int curpage = Integer.parseInt(strcurpage);
  54. WorkflowDb wf = new WorkflowDb();
  55. String sql = "select id from flow where userName=" + StrUtil.sqlstr(privilege.getUser(request)) + " order by mydate desc";
  56. int total = wf.getWorkflowCount(sql);
  57. Paginator paginator = new Paginator(request, total, pagesize);
  58. // 设置当前页数和总页数
  59. int totalpages = paginator.getTotalPages();
  60. if (totalpages==0)
  61. {
  62. curpage = 1;
  63. totalpages = 1;
  64. }
  65. int start = (curpage-1)*pagesize;
  66. int end = curpage*pagesize;
  67. WorkflowBlockIterator ir = wf.getWorkflows(sql, WorkflowCacheMgr.FLOW_GROUP_KEY, start, end);
  68. %>
  69. <br>
  70. <table width="92%" border="0" align="center" class="p9">
  71.   <tr>
  72.     <td height="24" align="right">找到符合条件的记录 <b><%=paginator.getTotal() %></b> 条 每页显示 <b><%=paginator.getPageSize() %></b> 条 页次 <b><%=paginator.getCurrentPage() %>/<%=paginator.getTotalPages() %></b></td>
  73.   </tr>
  74. </table>
  75. <table style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" cellSpacing="1" cellPadding="3" width="99%" align="center">
  76.   <tbody>
  77.     <tr>
  78.       <td class="thead" style="PADDING-LEFT: 10px" noWrap width="45%">标题</td>
  79.       <td class="thead" noWrap width="19%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">类型</td>
  80.       <td class="thead" noWrap width="16%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">创建时间</td>
  81.       <td class="thead" noWrap width="12%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">状态</td>
  82.       <td class="thead" noWrap width="8%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">管理</td>
  83.     </tr>
  84.     <%
  85. com.redmoon.oa.flow.Directory dir = new com.redmoon.oa.flow.Directory();
  86. while (ir.hasNext()) {
  87.   WorkflowDb wfd = (WorkflowDb)ir.next(); 
  88. %>
  89.     <tr onMouseOver="this.className='tbg1sel'" onMouseOut="this.className='tbg1'" class="tbg1">
  90.       <td>&nbsp;&nbsp;<a href="flow_modify.jsp?flowId=<%=wfd.getId()%>" title="<%=wfd.getTitle()%>"><%=StrUtil.getLeft(wfd.getTitle(), 40)%></a></td>
  91.       <td>
  92.   <%
  93.   Leaf lf = dir.getLeaf(wfd.getTypeCode());
  94.   if (lf!=null)
  95.    out.print(lf.getName());
  96.   %></td>
  97.       <td>
  98.   <%=DateUtil.format(wfd.getMydate(), "yy-MM-dd HH:mm:ss")%>   </td>
  99.       <td><%=wfd.getStatusDesc()%>   </td>
  100.       <td align="center"><a href="flow_modify.jsp?flowId=<%=wfd.getId()%>">查看/修改</a></td>
  101.     </tr>
  102. <%}%>
  103.   </tbody>
  104. </table>
  105. <table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0">
  106.   <tr>
  107.     <td height="24" align="right"><span style="WIDTH: 95%">
  108.       <%
  109. String querystr = "op="+op;
  110.     out.print(paginator.getCurPageBlock("flow_list_mine.jsp?"+querystr));
  111. %>
  112.     </span></td>
  113.   </tr>
  114. </table>
  115. </body>
  116. </html>