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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import="java.util.*"%>
  3. <%@ page import="cn.js.fan.util.*"%>
  4. <%@ page import="cn.js.fan.db.*"%>
  5. <%@ page import="com.redmoon.oa.person.*"%>
  6. <%@ page import="com.redmoon.oa.flow.*"%>
  7. <%@ page import="com.redmoon.oa.dept.*"%>
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  9. <html>
  10. <head>
  11. <title>我参与的流程列表</title>
  12. <link href="admin/default.css" rel="stylesheet" type="text/css">
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  14. <style type="text/css">
  15. <!--
  16. .style4 {
  17. color: #FFFFFF;
  18. font-weight: bold;
  19. }
  20. .STYLE5 {color: #CC6600}
  21. -->
  22. </style>
  23. </head>
  24. <body bgcolor="#FFFFFF" text="#000000">
  25. <jsp:useBean id="docmanager" scope="page" class="cn.js.fan.module.cms.DocumentMgr"/>
  26. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  27. <%
  28. String priv="read";
  29. if (!privilege.isUserPrivValid(request,priv))
  30. {
  31. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  32. return;
  33. }
  34. String op = StrUtil.getNullString(request.getParameter("op"));
  35. %>
  36. <table cellSpacing="0" cellPadding="0" width="100%">
  37.   <tbody>
  38.     <tr>
  39.       <td height="28" class="head"><span class="STYLE5">我参与的工作流</span>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="flow_list_mine.jsp">我发起的工作流</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="flow_list_done.jsp">历史办理记录</a></td>
  40.     </tr>
  41.   </tbody>
  42. </table>
  43. <%
  44. String strcurpage = StrUtil.getNullString(request.getParameter("CPages"));
  45. if (strcurpage.equals(""))
  46. strcurpage = "1";
  47. if (!StrUtil.isNumeric(strcurpage)) {
  48. out.print(StrUtil.makeErrMsg("标识非法!"));
  49. return;
  50. }
  51. int pagesize = 20;
  52. int curpage = Integer.parseInt(strcurpage);
  53. WorkflowDb wf = new WorkflowDb();
  54. ListResult lr = wf.listUserAttended(privilege.getUser(request), curpage, pagesize);
  55. int total = lr.getTotal();
  56. Paginator paginator = new Paginator(request, total, pagesize);
  57. // 设置当前页数和总页数
  58. int totalpages = paginator.getTotalPages();
  59. if (totalpages==0)
  60. {
  61. curpage = 1;
  62. totalpages = 1;
  63. }
  64. Vector v = lr.getResult();
  65. Iterator ir = null;
  66. if (v!=null)
  67. ir = v.iterator();
  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="35%">标题</td>
  79.       <td class="thead" noWrap width="18%"><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="10%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">状态</td>
  83.       <td class="thead" noWrap width="9%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">管理</td>
  84.     </tr>
  85.     <%
  86. Leaf ft = new Leaf();
  87. com.redmoon.oa.person.UserMgr um = new com.redmoon.oa.person.UserMgr();
  88. while (ir.hasNext()) {
  89.   WorkflowDb wfd = (WorkflowDb)ir.next(); 
  90. UserDb user = null;
  91. if (wfd.getUserName()!=null)
  92. user = um.getUserDb(wfd.getUserName());
  93. String userRealName = "";
  94. if (user!=null)
  95. userRealName = user.getRealName();
  96. %>
  97.     <tr onMouseOver="this.className='tbg1sel'" onMouseOut="this.className='tbg1'" class="tbg1">
  98.       <td>&nbsp;&nbsp;<a href="flow_modify.jsp?flowId=<%=wfd.getId()%>" title="<%=wfd.getTitle()%>"><%=StrUtil.getLeft(wfd.getTitle(), 40)%></a></td>
  99.       <td>
  100.   <%
  101.   Leaf lf = ft.getLeaf(wfd.getTypeCode());
  102.   if (lf!=null)
  103.    out.print(lf.getName());
  104.   %>   </td>
  105.       <td><%=DateUtil.format(wfd.getBeginDate(), "yy-MM-dd HH:mm:ss")%> </td>
  106.       <td><%=userRealName%></td>
  107.       <td><%=wfd.getStatusDesc()%>   </td>
  108.       <td align="center"><a href="flow_modify.jsp?flowId=<%=wfd.getId()%>">查看/修改</a></td>
  109.     </tr>
  110. <%}%>
  111.   </tbody>
  112. </table>
  113. <table width="96%"  border="0" align="center" cellpadding="0" cellspacing="0">
  114.   <tr>
  115.     <td align="right">&nbsp;</td>
  116.   </tr>
  117.   <tr>
  118.     <td align="right"><%
  119. String querystr = "op="+op;
  120.     out.print(paginator.getCurPageBlock("?"+querystr));
  121. %></td>
  122.   </tr>
  123. </table>
  124. </body>
  125. <script language="javascript">
  126. <!--
  127. function form1_onsubmit()
  128. {
  129. errmsg = "";
  130. if (form1.pwd.value!=form1.pwd_confirm.value)
  131. errmsg += "密码与确认密码不致,请检查!n"
  132. if (errmsg!="")
  133. {
  134. alert(errmsg);
  135. return false;
  136. }
  137. }
  138. //-->
  139. </script>
  140. </html>