RoadFlow2.1 临时演示

InstanceList.aspx 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InstanceList.aspx.cs" Inherits="WebForm.Platform.WorkFlowTasks.InstanceList" %>
  2. <!DOCTYPE html>
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head runat="server">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6. <title></title>
  7. </head>
  8. <body>
  9. <form id="form1" runat="server">
  10. <div class="querybar">
  11. <table cellpadding="0" cellspacing="1" border="0" width="100%">
  12. <tr>
  13. <td>
  14. 标题:<input type="text" class="mytext" id="Title1" style="width:100px;" name="Title1" runat="server" />
  15. 流程:<select class="mycombox" style="width:100px;" width1="156" more="1" id="FlowID" name="FlowID"><asp:Literal ID="FlowOptions" runat="server"></asp:Literal></select>
  16. 发送人:<input type="text" style="width:80px;" class="mymember" id="SenderID" unit="0" dept="0" station="0" user="1" group="0" more="0" name="SenderID" runat="server" />
  17. 发送时间:<input type="text" class="mycalendar" runat="server" style="width:80px;" name="Date1" /> 至 <input type="text" style="width:80px;" runat="server" class="mycalendar" name="Date2" />
  18. 状态:<select class="myselect" style="width:80px;" id="Status" name="Status" runat="server"></select>
  19. <input type="submit" name="Search" value="&nbsp;&nbsp;查询&nbsp;&nbsp;" class="mybutton" />
  20. </td>
  21. </tr>
  22. </table>
  23. </div>
  24. <table class="listtable">
  25. <thead>
  26. <tr>
  27. <th width="25%">标题</th>
  28. <th width="13%">所属流程</th>
  29. <th width="12%">所在步骤</th>
  30. <th width="10%">处理者</th>
  31. <th width="15%">接收时间</th>
  32. <th width="10%">当前状态</th>
  33. <th width="15%" sort="0"></th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <%
  38. foreach (var task in taskList)
  39. {
  40. string flowName;
  41. string stepName = bworkFlow.GetStepName(task.StepID, task.FlowID, out flowName);
  42. string query1 = string.Format("flowid={0}&stepid={1}&instanceid={2}&taskid={3}&groupid={4}&appid={5}&display=1",
  43. task.FlowID, task.StepID, task.InstanceID, task.ID, task.GroupID, Request.QueryString["appid"]
  44. );
  45. string timeout = string.Empty;// task.CompletedTime.HasValue && task.CompletedTime.Value < RoadFlow.Utility.DateTimeNew.Now ? "<span style='color:red;'>(已超时)<span>" : "";
  46. %>
  47. <tr>
  48. <td><a href="javascript:void(0);" onclick="openTask('<%=WebForm.Common.Tools.BaseUrl %>/Platform/WorkFlowRun/Default.aspx?<%=query1 %>','<%=task.Title %>','<%=task.ID %>');return false;" class="blue"><%=task.Title %></a></td>
  49. <td><%=flowName %></td>
  50. <td><%=stepName %></td>
  51. <td><%=task.ReceiveName %></td>
  52. <td><%=task.ReceiveTime.ToDateTimeStringS() %></td>
  53. <td><%=bworkFlowTask.GetStatusTitle(task.Status) %><%=timeout %></td>
  54. <td>
  55. <a style="margin-right:3px; background:url(<%=WebForm.Common.Tools.BaseUrl%>/Images/ico/Properties.png) no-repeat left center; padding-left:18px;" href="javascript:void(0);" onclick="manage('<%=task.FlowID %>','<%=task.GroupID %>');">管理</a>
  56. <%if(task.Status.In(0,1)){%>
  57. <a style="margin-right:3px; background:url(<%=WebForm.Common.Tools.BaseUrl%>/Images/ico/trash.gif) no-repeat left center; padding-left:18px;" href="javascript:void(0);" onclick="delete1('<%=task.FlowID %>','<%=task.GroupID %>');">删除</a>
  58. <% }%>
  59. </td>
  60. </tr>
  61. <%}%>
  62. </tbody>
  63. </table>
  64. <div class="buttondiv"><asp:Literal ID="Pager" runat="server"></asp:Literal></div>
  65. </form>
  66. <script type="text/javascript">
  67. function openTask(url, title, id)
  68. {
  69. top.openApp(url, 0, title, id, 0, 0, false);
  70. }
  71. function manage(flowid, groupid)
  72. {
  73. top.mainDialog.open({
  74. url: top.rootdir + '/Platform/WorkFlowTasks/InstanceManage.aspx?flowid1=' + flowid + "&groupid=" + groupid + '<%=query%>',
  75. width: 800, height: 400, title: "管理流程实例"
  76. });
  77. }
  78. function delete1(flowid, groupid)
  79. {
  80. if (confirm("您真的要删除该流程实例吗?"))
  81. {
  82. $.ajax({
  83. url: top.rootdir + "/Platform/WorkFlowTasks/Delete.ashx?flowid1=" + flowid + "&groupid=" + groupid, async: false, cache: false, success: function (txt)
  84. {
  85. alert(txt);
  86. window.location = window.location;
  87. }
  88. });
  89. }
  90. }
  91. </script>
  92. </body>
  93. </html>