listFlowForDefine.jsp 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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/core/base.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  13. <script
  14. src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js"
  15. type="text/javascript"></script>
  16. <script
  17. src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerToolBar.js"
  18. type="text/javascript"></script>
  19. <script
  20. src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js"
  21. type="text/javascript"></script>
  22. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  23. <script type="text/javascript" src="/shares/js/constant.js"></script>
  24. <script type="text/javascript" src="/shares/js/common.js"></script>
  25. <script type="text/javascript" src="/shares/js/yw/bpm/oa.js"></script>
  26. <script type="text/javascript">
  27. var grid = null;
  28. $(function () {
  29. grid = $("#maingrid4").ligerGrid({
  30. columns: [
  31. { display: '流程标题', name: 'v_ins_name', width: 120 },
  32. { display: '流程发起者', name: 'name', width: 100 },
  33. { display: '流程类型', name: 'v_type_name', width: 120 },
  34. { display: '流程模版', name: 'v_model_name', width: 120 },
  35. { display: '流程发起时间', name: 'd_createdate', width: 200 },
  36. { display: '流程状态', name: 'dataName', width: 100 },
  37. {
  38. display: '操作', isAllowHide: false,
  39. render: function (row)
  40. {
  41. var html;
  42. if(row.n_state!=0 ||(row.n_state==0 && row.n_cancel_can_read==1)){
  43. html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'查看流程信息\', \'${pageContext.request.contextPath }/FlowAction.do?task=toInfo&l_ins_id='
  44. + row.l_ins_id + '&tabid='+getCurrentTabId()+'\');\">查看</a>&nbsp;';
  45. }
  46. if (row.n_is_cancel == 1){
  47. if(row.n_end_cancel == 1 || (row.n_end_cancel ==0 && row.n_state != 2)){
  48. if(row.v_allow_cancels > 0 && row.n_state != 0){
  49. html += '<a href=\"#\" onclick=\"if(confirm(\'确定撤销该流程?\')){location=\'${pageContext.request.contextPath }/FlowAction.do?task=cancel&l_ins_id='
  50. + row.l_ins_id + '&next=all\';}\">撤销</a>';
  51. }
  52. }
  53. }
  54. return html;
  55. }
  56. }
  57. ],
  58. usePager:true,
  59. pageSize:20,
  60. parms: [{name: "v_ins_name", value: ""},
  61. {name: "starttime", value: ""},
  62. {name: "endtime", value: ""},
  63. {name: "l_model_id", value: ""}],
  64. url: 'FlowAction.do?task=all&time=' + new Date().getTime(),
  65. pageParmName: 'p', //页索引参数名,(提交给服务器)
  66. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  67. width: '99.6%',
  68. height: '99%',
  69. onError: function(){alert("数据加载失败,请刷新页面!");}
  70. });
  71. $("#pageloading").hide();
  72. $("#starttime").ligerDateEditor({ showTime: true, width:120, labelAlign: 'left', format :"yyyy-MM-dd"});
  73. $("#endtime").ligerDateEditor({ showTime: true, width:120, labelAlign: 'left', format :"yyyy-MM-dd"});
  74. // $("#l_model_id").ligerComboBox();
  75. // $("#model_has_form").ligerComboBox();
  76. });
  77. function searchByKword(){
  78. grid.set("parms", [ {
  79. name : "v_ins_name",
  80. value : $("#v_ins_name").val()
  81. }, {
  82. name : "starttime",
  83. value : $("#starttime").val()
  84. }, {
  85. name : "endtime",
  86. value : $("#endtime").val()
  87. }, {
  88. name : "l_model_id",
  89. value : $("#l_model_id").val()
  90. }]);
  91. grid.loadData(true);
  92. }
  93. function searchAll() {
  94. $("#v_ins_name").val("");
  95. $("#starttime").val("");
  96. $("#endtime").val("");
  97. $("#l_model_id").val("");
  98. searchByKword();
  99. }
  100. function showDefine(){
  101. $(".before_define").toggle();
  102. $(".after_define").toggle();
  103. grid.reRender();
  104. }
  105. </script>
  106. </head>
  107. <body >
  108. <div class="container-layout">
  109. <div id="title" class="form-button">
  110. <input onclick="closeTabUseInOA();" type="button" value="关闭" class="l-button">
  111. </div>
  112. <div class="default_search" style="margin: 0; width: 99.7%;">
  113. <ul class="list_search" style="width:250px;">
  114. <li class="title">流程标题:</li>
  115. <li class="text">
  116. <input type="text" id="v_ins_name" name="v_ins_name" style="width: 130px;">
  117. </li>
  118. </ul>
  119. <ul class="list_search" style="width:450px;">
  120. <li class="title">发起时间:</li>
  121. <li class="text">
  122. <input type="text" id="starttime" name="starttime" style="width: 130px;">
  123. </li>
  124. <li class="title" style="width:10px; text-align: center; padding-left: 0px; padding-right: 3px;">
  125. </li>
  126. <li class="text">
  127. <input type="text" id="endtime" name="endtime" style="width: 130px;">
  128. </li>
  129. </ul>
  130. </div>
  131. <div class="default_search before_define" style="margin: 0; width: 99.7%;">
  132. <ul class="list_search" style="width:250px;">
  133. <li class="title">流程模版:</li>
  134. <li class="text">
  135. <select name="l_model_id" id="l_model_id" style="width: 130px;">
  136. <option value="" selected="selected">全部</option>
  137. <c:forEach items="${requestScope.flows }" var="flow" varStatus="status">
  138. <option value="${flow.l_model_id }">${flow.v_model_name }</option>
  139. </c:forEach>
  140. </select>
  141. </li>
  142. </ul>
  143. <ul style="width:350px;"><li class="title">&nbsp;</li>
  144. <li class="search-button">
  145. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  146. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  147. <!-- <input type="button" class='l-button' name="search" onclick="showDefine()" value="自定义查询"/> -->
  148. </li>
  149. </ul>
  150. </div>
  151. <div class="default_search after_define" style="margin: 0; width: 99.7%; padding:0; display: none;">
  152. <ul class="list_search" style="width:450px;">
  153. <!-- <li class="title" >自定义条件:</li> -->
  154. <li class="title">带表单模版:</li>
  155. <li class="text">
  156. <select name="model_has_form" id="model_has_form" style="width: 130px;">
  157. <option value="" selected="selected">全部</option>
  158. <c:forEach items="${requestScope.flows }" var="flow" varStatus="status">
  159. <option value="${flow.l_model_id }">${flow.v_model_name }</option>
  160. </c:forEach>
  161. </select>
  162. </li>
  163. </ul>
  164. </div>
  165. <div class="default_search after_define" style="margin: 0; width: 99.7%; padding:0; display: none;">
  166. <ul class="list_search" style="width:250px;">
  167. <li class="title">&nbsp;</li>
  168. <li class="text">&nbsp;</li>
  169. </ul>
  170. <ul style="width:350px;">
  171. <li class="search-button">
  172. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  173. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  174. <input type="button" class='l-button' name="search" onclick="showDefine()" value="隐藏自定义"/>
  175. </li>
  176. </ul>
  177. </div>
  178. <div id="maingrid4" style="margin:0; padding:0; clear: both;"></div>
  179. <div style="display:none;">
  180. <!-- g data total ttt -->
  181. </div>
  182. <%@ include file="/include/message.jsp"%>
  183. </body>
  184. </html>