flow_list_doingorreturn.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="com.redmoon.oa.flow.*"%>
  5. <%@ page import="com.redmoon.oa.person.*"%>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  7. <html>
  8. <head>
  9. <title>待办流程列表</title>
  10. <link href="admin/default.css" rel="stylesheet" type="text/css">
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <style type="text/css">
  13. <!--
  14. .style4 {
  15. color: #FFFFFF;
  16. font-weight: bold;
  17. }
  18. -->
  19. </style>
  20. </head>
  21. <body bgcolor="#FFFFFF" text="#000000">
  22. <jsp:useBean id="docmanager" scope="page" class="cn.js.fan.module.cms.DocumentMgr"/>
  23. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  24. <%
  25. String priv="read";
  26. if (!privilege.isUserPrivValid(request,priv))
  27. {
  28. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  29. return;
  30. }
  31. String op = StrUtil.getNullString(request.getParameter("op"));
  32. if (op.equals("del")) {
  33. }
  34. %>
  35. <table cellSpacing="0" cellPadding="0" width="100%">
  36.   <tbody>
  37.     <tr>
  38.       <td class="head">待办工作流&nbsp;</td>
  39.     </tr>
  40.   </tbody>
  41. </table>
  42. <%
  43. String strcurpage = StrUtil.getNullString(request.getParameter("CPages"));
  44. if (strcurpage.equals(""))
  45. strcurpage = "1";
  46. if (!StrUtil.isNumeric(strcurpage)) {
  47. out.print(StrUtil.makeErrMsg("标识非法!"));
  48. return;
  49. }
  50. int pagesize = 20;
  51. int curpage = Integer.parseInt(strcurpage);
  52. String myname = privilege.getUser(request);
  53. MyActionDb mad = new MyActionDb();
  54. String sql = "select id from flow_my_action where (user_name=" + StrUtil.sqlstr(myname) + " or proxy=" + StrUtil.sqlstr(myname) + ") and is_checked=0 order by receive_date desc";
  55. ListResult lr = mad.listResult(sql, curpage, pagesize);
  56. int total = lr.getTotal();
  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. %>
  68. <br>
  69. <table width="92%" border="0" align="center" class="p9">
  70.   <tr>
  71.     <td height="24" align="right">找到符合条件的记录 <b><%=paginator.getTotal() %></b> 条 每页显示 <b><%=paginator.getPageSize() %></b> 条 页次 <b><%=paginator.getCurrentPage() %>/<%=paginator.getTotalPages() %></b></td>
  72.   </tr>
  73. </table>
  74. <table width="99%" border="0" align="center" cellPadding="3" cellSpacing="1" bordercolor="#EFEBDE" bgcolor="#EFEBDE" style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid">
  75.   <tbody>
  76.     <tr>
  77.       <td class="thead" style="PADDING-LEFT: 10px" noWrap width="34%">标题</td>
  78.       <td class="thead" noWrap width="14%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">类型</td>
  79.       <td class="thead" noWrap width="15%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">开始时间</td>
  80.       <td class="thead" noWrap width="10%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">发起人</td>
  81.       <td class="thead" noWrap width="10%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">状态</td>
  82.       <td class="thead" noWrap width="6%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">操作</td>
  83.     </tr>
  84.     <%
  85. java.util.Iterator ir = lr.getResult().iterator();
  86. com.redmoon.oa.person.UserMgr um = new com.redmoon.oa.person.UserMgr();
  87. Directory dir = new Directory();
  88. while (ir.hasNext()) {
  89.   mad = (MyActionDb)ir.next();
  90. WorkflowDb wfd = new WorkflowDb();
  91. wfd = wfd.getWorkflowDb((int)mad.getFlowId());
  92. String userName = wfd.getUserName();
  93. String userRealName = "";
  94. if (userName!=null) {
  95. UserDb user = um.getUserDb(wfd.getUserName());
  96. userRealName = user.getRealName();
  97. }
  98. %>
  99.     <tr onMouseOver="this.className='tbg1sel'" onMouseOut="this.className='tbg1'" class="tbg1">
  100.       <td>&nbsp;&nbsp;<a href="flow_dispose.jsp?myActionId=<%=mad.getId()%>" title="<%=wfd.getTitle()%>"><%=StrUtil.getLeft(wfd.getTitle(), 40)%></a></td>
  101.       <td>
  102.   <%
  103.   Leaf ft = dir.getLeaf(wfd.getTypeCode());
  104.   if (ft!=null)
  105.    out.print(ft.getName());
  106.   %>   </td>
  107.       <td><%=DateUtil.format(wfd.getBeginDate(), "yy-MM-dd HH:mm:ss")%> </td>
  108.       <td><%=userRealName%></td>
  109.       <td><%=WorkflowActionDb.getStatusName(mad.getActionStatus())%>   </td>
  110.       <td align="center"><a href="flow_dispose.jsp?myActionId=<%=mad.getId()%>">处理</a></td>
  111.     </tr>
  112.     <%}%>
  113.   </tbody>
  114. </table>
  115. <table width="96%"  border="0" align="center" cellpadding="0" cellspacing="0">
  116.   <tr>
  117.     <td align="right">&nbsp;</td>
  118.   </tr>
  119.   <tr>
  120.     <td align="right"><%
  121. String querystr = "op="+op;
  122.     out.print(paginator.getCurPageBlock("?"+querystr));
  123. %></td>
  124.   </tr>
  125. </table>
  126. </body>
  127. </html>