statForCountOfSendedFlow.jsp 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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. <script src="/shares/js/jquery-1.8.2.js" type="text/javascript"></script>
  10. <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  11. <link href="/shares/Zebra_Datepicker-master/public/css/bootstrap.css"
  12. rel="stylesheet" type="text/css" />
  13. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  14. <script type="text/javascript" src="/shares/js/constant.js"></script>
  15. <script type="text/javascript" src="/shares/js/common.js"></script>
  16. <script type="text/javascript" src="/shares/js/yw/master1_bpm/oa.js"></script>
  17. <script type="text/javascript" src="/shares/Zebra_Datepicker-master/public/javascript/zebra_datepicker.js"></script>
  18. <script type="text/javascript" src="/shares/js/yw/master1_bpm/promptDefine.js"></script>
  19. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  20. <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
  21. <script type="text/javascript">
  22. $(document).ready(function(){
  23. loadTypeTree("userButton",{type:"users", tab:"1", backId:"users", backName:"usersName"});
  24. loadTypeTree("deptButton",{type:"deptonly", tab:"1", backId:"depts", backName:"deptNames"});
  25. $("#starttime0").Zebra_DatePicker({
  26. format: 'Y',
  27. days: ['日', '一', '二', '三', '四', '五', '六'],
  28. months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  29. lang_clear_date: '清除',
  30. show_select_today: '今天'
  31. });
  32. $("#starttime1").Zebra_DatePicker({
  33. format: 'Y-m',
  34. days: ['日', '一', '二', '三', '四', '五', '六'],
  35. months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  36. lang_clear_date: '清除',
  37. show_select_today: '今天'
  38. });
  39. $("#starttime2").Zebra_DatePicker({
  40. format: 'Y-m-d',
  41. days: ['日', '一', '二', '三', '四', '五', '六'],
  42. months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  43. lang_clear_date: '清除',
  44. show_select_today: '今天'
  45. });
  46. $("#starttime3").Zebra_DatePicker({
  47. format: 'Y-m-d',
  48. days: ['日', '一', '二', '三', '四', '五', '六'],
  49. months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  50. lang_clear_date: '清除',
  51. show_select_today: '今天',
  52. pair : $("#endtime3")
  53. });
  54. $("#endtime3").Zebra_DatePicker({
  55. format: 'Y-m-d',
  56. days: ['日', '一', '二', '三', '四', '五', '六'],
  57. months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  58. lang_clear_date: '清除',
  59. show_select_today: '今天'
  60. });
  61. changeTimer();
  62. });
  63. function changeTree(){
  64. var stype = $("#stype").val();
  65. if(stype == 0){
  66. $("#deptTree").show();
  67. $("#userTree").hide();
  68. } else {
  69. $("#deptTree").hide();
  70. $("#userTree").show();
  71. }
  72. }
  73. function changeTimer(){
  74. var dtype = $("#dtype").val();
  75. $("[id*='timer']").hide();
  76. if(dtype == 0){
  77. $("#timer0").show();
  78. } else if (dtype == 1){
  79. $("#timer1").show();
  80. } else if (dtype == 2){
  81. $("#timer2").show();
  82. } else if (dtype == 3){
  83. $("#timer3").show();
  84. }
  85. }
  86. function submitForm(submitType){
  87. var rs = true;
  88. var stype = $("#stype").val();
  89. var target = null;
  90. var starttime = null;
  91. var endtime = null;
  92. if(stype == 0){
  93. rs = $.validate({
  94. name : "depts",
  95. model : [ {
  96. type : "require",
  97. msg : "请选择部门!"
  98. }]
  99. }) && rs;
  100. target = $("#depts").val();
  101. } else {
  102. rs = $.validate({
  103. name : "users",
  104. model : [ {
  105. type : "require",
  106. msg : "请选择人员!"
  107. }]
  108. }) && rs;
  109. target = $("#users").val();
  110. }
  111. var dtype = $("#dtype").val();
  112. if(dtype == 0){
  113. rs = $.validate({
  114. name : "starttime0",
  115. model : [ {
  116. type : "require",
  117. msg : "请选择年份!"
  118. }]
  119. }) && rs;
  120. starttime = $("#starttime0").val();
  121. } else if (dtype == 1){
  122. rs = $.validate({
  123. name : "starttime1",
  124. model : [ {
  125. type : "require",
  126. msg : "请选择月份!"
  127. }]
  128. }) && rs;
  129. starttime = $("#starttime1").val();
  130. } else if (dtype == 2){
  131. rs = $.validate({
  132. name : "starttime2",
  133. model : [ {
  134. type : "require",
  135. msg : "请选择日期!"
  136. }]
  137. }) && rs;
  138. starttime = $("#starttime2").val();
  139. } else if (dtype == 3){
  140. rs = $.validate({
  141. name : "starttime3",
  142. model : [ {
  143. type : "require",
  144. msg : "请选择起始日期!"
  145. }]
  146. }) && rs;
  147. rs = $.validate({
  148. name : "endtime3",
  149. model : [ {
  150. type : "require",
  151. msg : "请选择结束日期!"
  152. }]
  153. }) && rs;
  154. starttime = $("#starttime3").val();
  155. endtime = $("#endtime3").val();
  156. }
  157. if(rs){
  158. if(submitType == 'countOfSend'){
  159. window.open("${pageContext.request.contextPath}/MTStatAction.do?task=countOfSend&stype="
  160. + stype + "&target=" + target + "&dtype=" + dtype + "&starttime=" + starttime +
  161. "&endtime=" + endtime, "流程使用数量统计", 'location=no, resizable=yes,scrollbars=yes');
  162. }else if(submitType == 'exportCountOfSendExcel'){
  163. document.cform.action="MTStatAction.do?task=exportCountOfSendExcel&stype="
  164. + stype + "&target=" + target + "&dtype=" + dtype + "&starttime=" + starttime + "&endtime=" + endtime;
  165. document.cform.submit();
  166. }else if(submitType == 'countOfSendList'){
  167. $("#maingrid4").ligerGrid({
  168. columns: [
  169. { display: '统计对象', name: 'name', width: 150 },
  170. { display: '流程使用情况', name: 'createcount', width: 150,
  171. render: function (row){
  172. var html = '';
  173. if(row.createcount != '' && row.createcount != null){
  174. html = row.createcount;
  175. }else{
  176. html = '0';
  177. }
  178. return html;
  179. }}
  180. ],
  181. pageSize:20,
  182. url: '${pageContext.request.contextPath}/MTStatAction.do?task=countOfSendList&stype='
  183. + stype + '&target=' + target + '&dtype=' + dtype + '&starttime=' + starttime +
  184. '&endtime=' + endtime+'&time=' + new Date().getTime(),
  185. pageParmName: 'p', //页索引参数名,(提交给服务器)
  186. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  187. width: '99.9%',
  188. height: '99%',
  189. enabledSort : true,
  190. onError: function(){alert("数据加载失败,请刷新页面!");}
  191. });
  192. }
  193. }
  194. return false;
  195. }
  196. </script>
  197. </head>
  198. <body style="background: #ffffff;">
  199. <div class="s_title b10 f6">
  200. <img src="/shares/images/master1/gg_ico.png" width="27" height="26" /> 流程发起数量统计
  201. <div class="article_title">
  202. <!-- <input class="art_back" title="返回" name="" onclick="location='MTFlowAction.do?task=toDealList';" type="button" /> -->
  203. <input class="art_back" title="返回" name="" onclick="history.back(-1);" type="button" />
  204. </div>
  205. </div>
  206. <form action="MTStatAction.do" method="post" id="cform" name="cform" >
  207. <div class="container-layout" style="padding-top: 105px;">
  208. <div class="default_search" style="margin: 0; width: 100%; padding:0; ">
  209. <ul class="list_search" style="width:700px;">
  210. <li class="title">统计对象:</li>
  211. <li class="text">
  212. <select id="stype" name="stype" style="width : 100px;" onchange="changeTree()">
  213. <option value="0" selected="selected">部门</option>
  214. <option value="1">员工</option>
  215. </select>
  216. </li>
  217. <li class="text" style="width : 400px;" id="deptTree">
  218. <input type="text" style="width : 200px;" id="deptNames" name="deptNames" value="">
  219. <input type="button" class="l-button" id="deptButton" name="deptButton" value="选择部门">
  220. <input type="hidden" id="depts" name="depts" value="">
  221. </li>
  222. <li class="text" style="display: none; width : 400px;" id="userTree">
  223. <input type="text" style="width : 200px;" id="usersName" name="usersName" value="">
  224. <input type="button" class="l-button" id="userButton" name="userButton" value="选择人员">
  225. <input type="hidden" id="users" name="users" value="">
  226. </li>
  227. </ul>
  228. </div>
  229. <div class="default_search" style="margin: 0; width: 100%; padding:0;">
  230. <ul class="list_search" style="width:700px;">
  231. <li class="title">统计时间:</li>
  232. <li class="text">
  233. <select id="dtype" name="dtype" style="width : 100px;" onchange="changeTimer()">
  234. <option value="0" selected="selected">年</option>
  235. <option value="1">月</option>
  236. <!-- <option value="2">日</option> -->
  237. <option value="3">区间</option>
  238. </select>
  239. </li>
  240. <li id="timer0" class="text" style="width : 300px; " >
  241. <input type="text" id="starttime0" name="starttime0" style="width: 100px;">
  242. </li>
  243. <li id="timer1" class="text" style="width : 300px; " >
  244. <input type="text" id="starttime1" name="starttime1" style="width: 100px;">
  245. </li>
  246. <li id="timer2" class="text" style="width : 300px;" >
  247. <input type="text" id="starttime2" name="starttime2" style="width: 100px;">
  248. </li>
  249. <li id="timer3" class="text" style="width : 450px; " >
  250. <input type="text" id="starttime3" name="starttime3" style="width: 100px;">
  251. &nbsp;至
  252. <input type="text" id="endtime3" name="endtime3" style="width: 100px;">
  253. </li>
  254. </ul>
  255. </div>
  256. <div class="default_search" style="margin: 0; width: 100%; padding:0;">
  257. <ul class="list_search" style="width:600px;">
  258. <li class="title">&nbsp;
  259. <input type="hidden" id="task" name="task" value="countOfSend">
  260. </li>
  261. <li class="text">
  262. <input type="button" class="l-button" value="打印" onclick="submitForm('countOfSend')">
  263. </li>
  264. <li class="text">
  265. <input type="button" class="l-button" value="导出EXCEL" onclick="submitForm('exportCountOfSendExcel')">
  266. </li>
  267. <li class="text">
  268. <input type="button" class="l-button" value="开始统计" onclick="submitForm('countOfSendList')">
  269. </li>
  270. </ul>
  271. </div>
  272. <div style="clear: both;">
  273. <div id="maingrid4" style="margin:0; padding:0"></div>
  274. </div>
  275. </div>
  276. </form>
  277. </body>
  278. </html>