overtimeList.jsp 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  7. <title>加班记录列表</title>
  8. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  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. <script type="text/javascript" src="/shares/js/constant.js"></script>
  13. <script type="text/javascript" src="/shares/js/common.js"></script>
  14. <script type="text/javascript" src="/shares/js/yw/bpm/oa.js"></script>
  15. <script type="text/javascript" src="/shares/js/yw/bpm/promptDefine.js"></script>
  16. <script type="text/javascript" src="${pageContext.request.contextPath }/yw/bpm/datacenter/js/flowInsDataCommon.js"></script>
  17. <script type="text/javascript">
  18. var grid = null;
  19. $(function() {
  20. grid = $("#maingrid4")
  21. .ligerGrid(
  22. {
  23. columns : [
  24. {
  25. display : '标题',
  26. name : 'flow_ins_name',
  27. width : 200
  28. },
  29. // {
  30. // display : '申请人',
  31. // name : 'create_name',
  32. // width : 100
  33. // },
  34. {
  35. display : '加班开始时间',
  36. name : 'start_date',
  37. width : 130
  38. },
  39. {
  40. display : '加班截止时间',
  41. name : 'end_date',
  42. width : 130
  43. },
  44. {
  45. display : '加班时长(时)',
  46. name : 'total_amount',
  47. width : 90
  48. },
  49. {
  50. display : '已调(时)',
  51. name : 'paid_amount',
  52. width : 90,
  53. render : function(row) {
  54. if (row.paid_amount) {
  55. return row.paid_amount;
  56. } else {
  57. return "0";
  58. }
  59. }
  60. },
  61. {
  62. display : '未调(时)',
  63. name : 'remain_amount',
  64. width : 90,
  65. render : function(row) {
  66. if (row.remain_amount) {
  67. return row.remain_amount;
  68. } else {
  69. return "0";
  70. }
  71. }
  72. },
  73. {
  74. display : '调休状态',
  75. name : 'state',
  76. width : 100,
  77. render : function(row) {
  78. var html = "";
  79. if (row.state == ""
  80. || row.state == "0") {
  81. html = "<font color=red>未调休</font>";
  82. } else if (row.state == "1"
  83. && row.paid_amount >= row.total_amount) {
  84. html = "<font color=green>已全部调休</font>";
  85. } else if (row.state == "1"
  86. && row.paid_amount < row.total_amount) {
  87. html = "<font color=green>已部分调休</font>";
  88. }
  89. return html;
  90. }
  91. },
  92. {
  93. display : '创建时间',
  94. name : 'create_date',
  95. width : 130
  96. },
  97. {
  98. display : '操作',
  99. isAllowHide : false,
  100. render : function(row) {
  101. var dialogId = row.flow_ins_id
  102. + new Date().getTime();
  103. var html = '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/FlowAction.do?task=toInfo&state=all&insId='
  104. + row.flow_ins_id
  105. + '&tabid='
  106. + getCurrentTabId()
  107. + '&dialogId='
  108. + dialogId
  109. + '\', \'查看流程信息\', \''
  110. + dialogId
  111. + '\');\">查看</a>&nbsp;';
  112. if (row.flow_model_id
  113. && (row.state == ""
  114. || row.state == "0" || (row.paid_amount < row.total_amount))) {
  115. html += '<a href=\"#\" onclick=\"startFlow('
  116. + row.flow_model_id
  117. + ','
  118. + row.flow_ins_id
  119. + ',\''
  120. + row.model_name
  121. + '\',\'${session.name}\')\" >发起流程</a>';
  122. }
  123. return html;
  124. }
  125. } ],
  126. usePager : true,
  127. pageSize : 20,
  128. parms : [ {
  129. name : "flow_ins_name",
  130. value : ""
  131. }, {
  132. name : "starttime",
  133. value : ""
  134. }, {
  135. name : "endtime",
  136. value : ""
  137. } ],
  138. url : 'bpmDataCenterAction.do?task=getOvertimeData&time='
  139. + new Date().getTime(),
  140. pageParmName : 'p', //页索引参数名,(提交给服务器)
  141. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  142. width : '99.9%',
  143. enabledSort : true,
  144. height : '99%',//getParentHeight()-67,
  145. detail : {
  146. onShowDetail : showDatOff
  147. },
  148. onError : function() {
  149. alert("数据加载失败,请刷新页面!");
  150. }
  151. });
  152. $("#pageloading").hide();
  153. $("#starttime").ligerDateEditor({
  154. showTime : false,
  155. width : 120,
  156. labelAlign : 'left',
  157. format : "yyyy-MM-dd"
  158. });
  159. $("#endtime").ligerDateEditor({
  160. showTime : false,
  161. width : 120,
  162. labelAlign : 'left',
  163. format : "yyyy-MM-dd"
  164. });
  165. //$("#modelId").ligerComboBox();
  166. });
  167. function showDatOff(row, detailPanel, callback) {
  168. var gProcess = document.createElement('div');
  169. $(detailPanel).append(gProcess);
  170. $(gProcess)
  171. .css('margin', 10)
  172. .ligerGrid(
  173. {
  174. columns : [
  175. {
  176. display : '标题',
  177. name : 'flow_ins_name',
  178. width : 180
  179. },
  180. {
  181. display : '申请日期',
  182. name : 'apply_date',
  183. width : 100
  184. },
  185. {
  186. display : '调休开始时间',
  187. name : 'start_date',
  188. width : 130
  189. },
  190. {
  191. display : '调休截止时间',
  192. name : 'end_date',
  193. width : 130
  194. },
  195. {
  196. display : '调休时长(时)',
  197. name : 'duration',
  198. width : 90
  199. },
  200. {
  201. display : '流转状态',
  202. name : 'state_name',
  203. width : 90
  204. },
  205. {
  206. display : '创建时间',
  207. name : 'create_date',
  208. width : 130
  209. },
  210. {
  211. display : '操作',
  212. width : 100,
  213. isAllowHide : false,
  214. render : function(row) {
  215. var dialogId = row.flow_ins_id
  216. + new Date().getTime();
  217. var html = '<a href=\"#\" onclick=\"openODialog(\'${pageContext.request.contextPath }/FlowAction.do?task=toInfo&state=all&insId='
  218. + row.flow_ins_id
  219. + '&tabid='
  220. + getCurrentTabId()
  221. + '&dialogId='
  222. + dialogId
  223. + '\', \'查看流程信息\', \''
  224. + dialogId
  225. + '\');\">查看</a>&nbsp;';
  226. // if (row.flow_model_id
  227. // && (row.state == "" || row.state == "0")) {
  228. // html += '<a href=\"#\" onclick=\"startFlow('
  229. // + row.flow_model_id
  230. // + ','
  231. // + row.flow_ins_id
  232. // + ',\''
  233. // + row.model_name
  234. // + '\',\'${session.name}\')\" >发起流程</a>';
  235. // }
  236. return html;
  237. }
  238. } ],
  239. usePager : false,
  240. width : '90%',
  241. frozen : false,
  242. url : 'bpmDataCenterAction.do?task=getDayOffData&linFlowInsId='
  243. + row.link_flow_ins_id
  244. + '&time='
  245. + new Date().getTime()
  246. });
  247. }
  248. function searchByKword() {
  249. grid.set("parms", [ {
  250. name : "flow_ins_name",
  251. value : encodeURI($("#flow_ins_name").val())
  252. }, {
  253. name : "starttime",
  254. value : $("#starttime").val()
  255. }, {
  256. name : "endtime",
  257. value : $("#endtime").val()
  258. } ]);
  259. grid.set("newPage", "1");
  260. grid.loadData(true);
  261. }
  262. function loadData() {
  263. grid.loadData(true);
  264. }
  265. function searchAll() {
  266. $("#flow_ins_name").val("");
  267. $("#starttime").val("");
  268. $("#endtime").val("");
  269. searchByKword();
  270. }
  271. </script>
  272. </head>
  273. <body>
  274. <div class="container-layout">
  275. <div id="title" class="form-button" style="width: 100%;">
  276. <input onclick="closeTabUseInOA();" type="button" value="关闭" class="l-button">
  277. </div>
  278. <div class="default_search" style="margin: 0; width: 100%;">
  279. <ul class="list_search">
  280. <li class="title">标题:</li>
  281. <li class="text"><input type="text" id="flow_ins_name" name="flow_ins_name" style="width: 130px;"></li>
  282. </ul>
  283. <ul class="list_search">
  284. <li class="title">创建时间:</li>
  285. <li class="text"><input type="text" id="starttime" name="starttime" style="width: 130px;"></li>
  286. <li class="title" style="width: 10px; text-align: center; padding-left: 0px; padding-right: 3px;">至</li>
  287. <li class="text"><input type="text" id="endtime" name="endtime" style="width: 130px;"></li>
  288. </ul>
  289. <!-- </div> -->
  290. <!-- <div class="default_search" style="margin: 0; width: 100%;"> -->
  291. <ul>
  292. <li class="search-button"><input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询" /> <input type="button" class='l-button' name="search"
  293. onclick="searchAll()" value="查询全部" /></li>
  294. </ul>
  295. </div>
  296. <div id="maingrid4" style="margin: 0; padding: 0; clear: both;"></div>
  297. <div style="display: none;"></div>
  298. </div>
  299. <%@ include file="/include/message.jsp"%>
  300. </body>
  301. </html>