listFlowForDealing.jsp 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <%@ page language="java" contentType="text/html;charset=GBK"
  2. pageEncoding="GBK"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  8. <title>流程列表</title>
  9. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  10. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  12. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  13. <script type="text/javascript" src="/shares/js/constant.js"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script type="text/javascript" src="/shares/js/yw/bpm/oa.js"></script>
  16. <script type="text/javascript" src="/shares/js/yw/bpm/promptDefine.js"></script>
  17. <script type="text/javascript">
  18. var grid = null;
  19. $(function() {
  20. grid = $("#maingrid4").ligerGrid(
  21. {columns : [{ display : '流程标题',
  22. name : 'insName',
  23. width : 250
  24. }, { display : '流程类型',
  25. name : 'modelId.typeId.typeName',
  26. width : 120,
  27. render: function(row){
  28. var html = row.modelId.typeId.typeName;
  29. return html;
  30. }}, { display : '流程模版',
  31. name : 'modelId.modelName',
  32. width : 120,
  33. render: function(row){
  34. var html = row.modelId.modelName;
  35. return html;
  36. }}, { display : '流程状态',
  37. name : 'state.dataName',
  38. width : 100,
  39. render: function(row){
  40. var html = row.state.dataName;
  41. return html;
  42. }}, { display : '流程发起者',
  43. name : 'creator.username',
  44. width : 100,
  45. render: function(row){
  46. var html = row.creator.username;
  47. return html;
  48. }}, { display : '流程发起时间',
  49. name : 'createdate',
  50. width : 150
  51. }, { display : '操作', width : 200,
  52. isAllowHide : false,
  53. render : function(row) {
  54. var html = '';
  55. // var html = '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/FlowAction.do?task=toInfo&insId='
  56. // + row.insId + '&tabid=' + getCurrentTabId()
  57. // + '&dialogId='+row.insId+'\'+getTime(), \'流程办理\', \''+row.insId+'\'+getTime());\">查看</a>&nbsp;';
  58. if(row.modelId.control.value == "1"){
  59. html = '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/FlowAction.do?task=toInfo&insId='
  60. + row.insId + '&tabid=' + getCurrentTabId()
  61. + '&dialogId='+row.insId+'\'+getTime(), \'流程办理\', \''+row.insId+'\'+getTime());\">查看</a>&nbsp;';
  62. }else if(row.modelId.control.value == "0"){
  63. html = '<a href=\"#\" onclick=\"openODialog(\''+row.modelId.controlUrl+'?task=toInfo&insId='
  64. + row.insId + '&tabid=' + getCurrentTabId()
  65. + '&dialogId='+row.insId+'\'+getTime(), \'流程办理\', \''+row.insId+'\'+getTime());\">查看</a>&nbsp;';
  66. }
  67. html += '<a href=\"#\" onclick=\"urge('+row.insId+')\">催办</a>&nbsp;';
  68. if (row.modelId.isCancel.value == 1){
  69. if (row.modelId.allowCancels > 0
  70. && row.state.value != 0) {
  71. var url = "";
  72. if(row.modelId.control.value == "1"){
  73. url = "FlowAction.do";
  74. }else if(row.modelId.control.value == "0"){
  75. url = row.modelId.controlUrl;
  76. }
  77. html += '<a href=\"#\" onclick=\"cancelFlow('
  78. + row.insId
  79. + ',\''+url+'\');\">撤销</a>&nbsp;';
  80. }
  81. }
  82. if(row.formId.formId != '' && row.formId.formId != null && row.formId.formId != '0'){
  83. html += '<a target="_blank" href=\"${pageContext.request.contextPath }/bpmFormInstanceAction.do?task=printIns&formInsId='
  84. + row.formInsId
  85. + '&formId='
  86. + row.formId.formId
  87. + '&tabid='
  88. + getCurrentTabId()
  89. + '\">表单打印</a>&nbsp;';
  90. }
  91. return html;
  92. }
  93. } ],
  94. usePager : true,
  95. pageSize : 20,
  96. parms: [{name: "insName", value: ""},
  97. {name: "starttime", value: ""},
  98. {name: "endtime", value: ""},
  99. {name: "name", value: ""},
  100. {name: "modelId", value: ""}],
  101. url : 'FlowAction.do?task=dealingList&time='
  102. + new Date().getTime(),
  103. pageParmName : 'p', //页索引参数名,(提交给服务器)
  104. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  105. width : '99.9%',
  106. height : '99%',
  107. detail: { onShowDetail: showProcess },
  108. onError: function(){alert("数据加载失败,请刷新页面!");}
  109. });
  110. $("#pageloading").hide();
  111. $("#starttime").ligerDateEditor({ showTime: false, width:120, labelAlign: 'left', format :"yyyy-MM-dd"});
  112. $("#endtime").ligerDateEditor({ showTime: false, width:120, labelAlign: 'left', format :"yyyy-MM-dd"});
  113. //$("#modelId").ligerComboBox();
  114. });
  115. function getTime(){
  116. return new Date().getTime();
  117. }
  118. function showProcess(row, detailPanel,callback){
  119. var gProcess = document.createElement('div');
  120. $(detailPanel).append(gProcess);
  121. $(gProcess).css('margin',10).ligerGrid({
  122. columns:[
  123. { display: '环节名称', name: 'tmodelId.tmodelName', width: 100,
  124. render : function (row){
  125. return row.tmodelId.tmodelName;
  126. }},
  127. { display: '操作人', name: 'user.username', width: 150,
  128. render : function (row){
  129. var au = row.authorizedUser.userId;
  130. if(au != null && au != "" && au != "0"){
  131. return row.user.username + "(授权:"
  132. + row.authorizedUser.username + ")";
  133. }
  134. return row.user.username;
  135. }},
  136. { display: '状态', name: 'state.dataName', width: 100,
  137. render : function (row){
  138. return row.state.dataName;
  139. }},
  140. { display: '环节启动时间', name: 'createdate', width: 150 },
  141. { display: '环节结束时间', name: 'finishdate', width: 150 }
  142. ],
  143. usePager:false,
  144. width: '90%',
  145. url: 'FlowAction.do?task=processList&insId=' + row.insId + '&time=' + new Date().getTime()
  146. });
  147. }
  148. function searchByKword(){
  149. grid.set("parms", [ {
  150. name : "insName",
  151. value : encodeURI($("#insName").val())
  152. }, {
  153. name : "starttime",
  154. value : $("#starttime").val()
  155. }, {
  156. name : "endtime",
  157. value : $("#endtime").val()
  158. }, {
  159. name : "modelId",
  160. value : $("#modelId").val()
  161. }, {
  162. name : "name",
  163. value : encodeURI($("#name").val())
  164. }]);
  165. grid.set("newPage", "1");
  166. grid.loadData(true);
  167. }
  168. function searchAll() {
  169. $("#insName").val("");
  170. $("#starttime").val("");
  171. $("#endtime").val("");
  172. $("#modelId").val("");
  173. $("#name").val("");
  174. searchByKword();
  175. }
  176. function urge(insId){
  177. $.ajax({
  178. url : "FlowAction.do",
  179. async : false,
  180. type : "post",
  181. data : {
  182. "task" : "urge",
  183. "insId" : insId
  184. },
  185. success : function(data) {
  186. addInfo(data);
  187. },
  188. error : function() {
  189. alert("数据处理失败,请检查网络重新登录或联系管理员!");
  190. }
  191. });
  192. }
  193. </script>
  194. </head>
  195. <body>
  196. <div class="container-layout">
  197. <div id="title" class="form-button" style="width: 100%;">
  198. <input onclick="closeTabUseInOA();" type="button" value="关闭" class="l-button">
  199. </div>
  200. <div class="default_search" style="margin: 0; width: 100%;">
  201. <ul class="list_search" style="width:250px;">
  202. <li class="title">流程标题:</li>
  203. <li class="text">
  204. <input type="text" id="insName" name="insName" style="width: 130px;">
  205. </li>
  206. </ul>
  207. <ul class="list_search" style="width:450px;">
  208. <li class="title">发起时间:</li>
  209. <li class="text">
  210. <input type="text" id="starttime" name="starttime" style="width: 130px;">
  211. </li>
  212. <li class="title" style="width:10px; text-align: center; padding-left: 0px; padding-right: 3px;">
  213. </li>
  214. <li class="text">
  215. <input type="text" id="endtime" name="endtime" style="width: 130px;">
  216. </li>
  217. </ul>
  218. </div>
  219. <div class="default_search" style="margin: 0; width: 100%;">
  220. <ul class="list_search" style="width:250px;">
  221. <li class="title">流程模版:</li>
  222. <li class="text">
  223. <select name="modelId" id="modelId" style="width: 130px;" >
  224. <option value="" selected="selected">全部</option>
  225. <c:forEach items="${requestScope.flows }" var="flow" varStatus="status">
  226. <option value="${flow.modelId }">${flow.modelName }</option>
  227. </c:forEach>
  228. </select>
  229. </li>
  230. </ul>
  231. <ul style="width:250px;"><li class="title">发起者:</li>
  232. <li class="text">
  233. <input type="text" id="name" name="name" style="width: 130px;">
  234. </li>
  235. </ul>
  236. <ul>
  237. <li class="search-button">
  238. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  239. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  240. </li>
  241. </ul>
  242. </div>
  243. <div id="maingrid4" style="margin: 0; padding: 0; clear: both;"></div>
  244. <div style="display: none;">
  245. </div>
  246. </div>
  247. <%@ include file="/include/message.jsp"%>
  248. </body>
  249. </html>