statForTimeCostOfPersonal.jsp 10 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:"user", tab:"1", backId:"users", backName:"usersName"});
  24. $("#starttime0").Zebra_DatePicker({
  25. format: 'Y',
  26. days: ['日', '一', '二', '三', '四', '五', '六'],
  27. months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  28. lang_clear_date: '清除',
  29. show_select_today: '今天'
  30. });
  31. $("#starttime1").Zebra_DatePicker({
  32. format: 'Y-m',
  33. days: ['日', '一', '二', '三', '四', '五', '六'],
  34. months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  35. lang_clear_date: '清除',
  36. show_select_today: '今天'
  37. });
  38. $("#starttime2").Zebra_DatePicker({
  39. format: 'Y-m-d',
  40. days: ['日', '一', '二', '三', '四', '五', '六'],
  41. months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  42. lang_clear_date: '清除',
  43. show_select_today: '今天'
  44. });
  45. $("#starttime3").Zebra_DatePicker({
  46. format: 'Y-m-d',
  47. days: ['日', '一', '二', '三', '四', '五', '六'],
  48. months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  49. lang_clear_date: '清除',
  50. show_select_today: '今天',
  51. pair : $("#endtime3")
  52. });
  53. $("#endtime3").Zebra_DatePicker({
  54. format: 'Y-m-d',
  55. days: ['日', '一', '二', '三', '四', '五', '六'],
  56. months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  57. lang_clear_date: '清除',
  58. show_select_today: '今天'
  59. });
  60. changeTimer();
  61. });
  62. function changeTimer(){
  63. var dtype = $("#dtype").val();
  64. $("[id*='timer']").hide();
  65. if(dtype == 0){
  66. $("#timer0").show();
  67. } else if (dtype == 1){
  68. $("#timer1").show();
  69. } else if (dtype == 2){
  70. $("#timer2").show();
  71. } else if (dtype == 3){
  72. $("#timer3").show();
  73. }
  74. }
  75. function submitForm(submitType){
  76. var rs = true;
  77. var target = null;
  78. var starttime = null;
  79. var endtime = null;
  80. rs = $.validate({
  81. name : "users",
  82. model : [ {
  83. type : "require",
  84. msg : "请选择人员!"
  85. }]
  86. }) && rs;
  87. target = $("#users").val();
  88. var dtype = $("#dtype").val();
  89. if(dtype == 0){
  90. rs = $.validate({
  91. name : "starttime0",
  92. model : [ {
  93. type : "require",
  94. msg : "请选择年份!"
  95. }]
  96. }) && rs;
  97. starttime = $("#starttime0").val();
  98. } else if (dtype == 1){
  99. rs = $.validate({
  100. name : "starttime1",
  101. model : [ {
  102. type : "require",
  103. msg : "请选择月份!"
  104. }]
  105. }) && rs;
  106. starttime = $("#starttime1").val();
  107. } else if (dtype == 2){
  108. rs = $.validate({
  109. name : "starttime2",
  110. model : [ {
  111. type : "require",
  112. msg : "请选择日期!"
  113. }]
  114. }) && rs;
  115. starttime = $("#starttime2").val();
  116. } else if (dtype == 3){
  117. rs = $.validate({
  118. name : "starttime3",
  119. model : [ {
  120. type : "require",
  121. msg : "请选择起始日期!"
  122. }]
  123. }) && rs;
  124. rs = $.validate({
  125. name : "endtime3",
  126. model : [ {
  127. type : "require",
  128. msg : "请选择结束日期!"
  129. }]
  130. }) && rs;
  131. starttime = $("#starttime3").val();
  132. endtime = $("#endtime3").val();
  133. }
  134. if(rs){
  135. if(submitType == 'timeOfCost'){
  136. window.open("${pageContext.request.contextPath}/MTStatAction.do?task=timeOfCost&target="
  137. + target + "&dtype=" + dtype + "&starttime=" + starttime +
  138. "&endtime=" + endtime, "流程办理耗时统计", 'location=no, resizable=yes,scrollbars=yes');
  139. return true;
  140. }else if(submitType == 'exportTimeOfCostExcel'){
  141. document.cform.action="MTStatAction.do?task=exportTimeOfCostExcel&target="
  142. + target + "&dtype=" + dtype + "&starttime=" + starttime + "&endtime=" + endtime;
  143. document.cform.submit();
  144. }else if(submitType == 'timeOfCostList'){
  145. $("#maingrid4").ligerGrid({
  146. columns: [
  147. { display: '姓名', name: 'name', width: 150 },
  148. { display: '平均办理时间(单位:小时)', name: 'avgcost', width: 250,
  149. render: function (row){
  150. var html = '';
  151. if(row.avgcost != '' && row.avgcost != null){
  152. html = row.avgcost;
  153. }else{
  154. html = '0';
  155. }
  156. return html;
  157. }},
  158. { display: '最少办理时间(单位:小时)', name: 'mincost', width: 250 ,
  159. render: function (row){
  160. var html = '';
  161. if(row.mincost != '' && row.mincost != null){
  162. html = row.mincost;
  163. }else{
  164. html = '0';
  165. }
  166. return html;
  167. }},
  168. { display: '最长办理时间(单位:小时)', name: 'maxcost', width: 250,
  169. render: function (row){
  170. var html = '';
  171. if(row.maxcost != '' && row.maxcost != null){
  172. html = row.maxcost;
  173. }else{
  174. html = '0';
  175. }
  176. return html;
  177. }},
  178. { display: '办理环节数量', name: 'counts', width: 150,render: function (row){
  179. var html = '';
  180. if(row.counts != '' && row.counts != null){
  181. html = row.counts;
  182. }else{
  183. html = '0';
  184. }
  185. return html;
  186. }}
  187. ],
  188. pageSize:20,
  189. url: '${pageContext.request.contextPath}/MTStatAction.do?task=timeOfCostList&target=' + target + '&dtype=' + dtype + '&starttime=' + starttime +
  190. '&endtime=' + endtime+'&time=' + new Date().getTime(),
  191. pageParmName: 'p', //页索引参数名,(提交给服务器)
  192. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  193. width: '99.9%',
  194. height: '99%',
  195. enabledSort : true,
  196. onError: function(){alert("数据加载失败,请刷新页面!");}
  197. });
  198. }
  199. }
  200. return false;
  201. }
  202. </script>
  203. </head>
  204. <body style="background: #ffffff;">
  205. <div class="s_title b10 f6">
  206. <img src="/shares/images/master1/gg_ico.png" width="27" height="26" /> 流程环节耗时统计
  207. <div class="article_title">
  208. <!-- <input class="art_back" title="返回" name="" onclick="location='MTFlowAction.do?task=toDealList';" type="button" /> -->
  209. <input class="art_back" title="返回" name="" onclick="history.back(-1);" type="button" />
  210. </div>
  211. </div>
  212. <form action="MTStatAction.do" method="post" id="cform" name="cform" >
  213. <div style="padding-top: 105px;">
  214. <div class="default_search" style="margin: 0; width: 100%; padding:0;">
  215. <ul class="list_search" style="width:700px;">
  216. <li class="title">统计对象:</li>
  217. <li class="text">
  218. <select id="stype" name="stype" style="width : 100px;" onchange="changeTree()">
  219. <option value="1">员工</option>
  220. </select>
  221. </li>
  222. <li class="text" style="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('timeOfCost')">
  263. </li>
  264. <li class="text">
  265. <input type="button" class="l-button" value="导出EXCEL" onclick="submitForm('exportTimeOfCostExcel')">
  266. </li>
  267. <li class="text">
  268. <input type="button" class="l-button" value="开始统计" onclick="submitForm('timeOfCostList')">
  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>