userAttendanceTotal-conform.jsp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <style type="text/css">
  4. .plantoolli {
  5. text-align: left;
  6. width: 25%;
  7. height: 25px;
  8. float: left;
  9. list-style-type: none;
  10. }
  11. </style>
  12. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  13. <link rel="stylesheet" type="text/css" href="css/commoncss.css"/>
  14. <script src="plug-in/layer/layer.js"></script>
  15. <script>
  16. var totalinfo = ${userAttendanceTotalPage};
  17. function btn_ok(){
  18. window.location.href='userAttendanceTotalController.do?list&queryParams='+encodeURI('${queryParams}');
  19. }
  20. function callback(data){
  21. if(data.success){
  22. layer.alert(data.msg, function(index){
  23. window.location.href='userAttendanceTotalController.do?list&queryParams='+encodeURI('${queryParams}');
  24. layer.close(index);
  25. });
  26. }
  27. else{
  28. layer.alert(data.msg);
  29. }
  30. }
  31. </script>
  32. <script type="text/javascript">
  33. //编写自定义JS代码
  34. </script>
  35. <div id ='userattendancedetaillisttb' >
  36. 员工姓名:${userAttendanceTotalPage.userrealName} 考勤年月: ${userAttendanceTotalPage.yearmonth}
  37. </div>
  38. <div >
  39. <div id='userattendancedatagrid' style=" width:98% ; height:58%;">
  40. <t:datagrid name="userattendancedetaillist"
  41. autoLoadData="true" checkbox="false" fitColumns="true"
  42. pagination = 'false'
  43. extendParams="queryParams:{attendanceId:'${userAttendanceTotalPage.id}'},"
  44. actionUrl="userAttendanceDetailController.do?datagrid" idField="id" fit="true" queryMode="group">
  45. <t:dgCol sortable="false" title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
  46. <t:dgCol sortable="false" title="json字段" field="jsonObj" hidden="true" queryMode="single" width="120"></t:dgCol>
  47. <t:dgCol sortable="false" title="主键attendanceId" field="attendanceId" hidden="true" width="120"></t:dgCol>
  48. <t:dgCol sortable="false" title="日期" field="ymdDate" formatter="yyyy-MM-dd" extendParams="align:'center'," queryMode="single" width="120"></t:dgCol>
  49. <t:dgCol sortable="false" title="状态" field="status" hidden="false" queryMode="single" dictionary="attendance_status_edit" extendParams="align:'center'," width="80"></t:dgCol>
  50. <t:dgCol sortable="false" title="出勤时间" field="attendanceDate" formatterjs="attendanceDatefmt" extendParams="align:'center'," queryMode="single" width="120"></t:dgCol>
  51. <t:dgCol sortable="false" title="退勤时间" field="retreatDate" formatterjs="retreatDatefmt" extendParams="align:'center'," queryMode="single" width="120"></t:dgCol>
  52. <t:dgCol sortable="false" title="班次" field="dutyId" queryMode="single" dictionary="t_bus_arrange_duty,id,duty_name" width="120"></t:dgCol>
  53. <t:dgCol sortable="false" title="应出勤时长" field="datumDate" style="text-align:right," formatterjs="minsToHoursandMinsfmt" queryMode="single" width="120"></t:dgCol>
  54. <t:dgCol sortable="false" title="全月时间差" style="text-align:right," field="timeDifference" formatterjs="minsToHoursandMinsfmt" queryMode="single" width="120"></t:dgCol>
  55. <t:dgCol sortable="false" title="临时借调项目" style="fmstatus" field="borrowspid" dictionary="t_s_depart,id,departname, and org_type != '1' " queryMode="single" width="120"></t:dgCol>
  56. <t:dgCol sortable="false" title="调整类型" field="fineTuningType" dictionary="attendance_timeFineTuning" width="120"></t:dgCol>
  57. <t:dgCol sortable="false" title="调整理由" field="adjustReason" queryMode="single" width="120"></t:dgCol>
  58. <t:dgCol sortable="false" title="时间微调" field="timeFineTuning" style="text-align:right," formatterjs="minsToHoursandMinsfmt" queryMode="single" width="120"></t:dgCol>
  59. </t:datagrid>
  60. </div>
  61. </div>
  62. <div style="width: 100%; padding-bottom: 40px;margin-top: 10px;">
  63. <span ><b style=" font-size: 18px; font-weight: 800;">数据合计</b></span>
  64. <br>
  65. <ul >
  66. <li class = 'plantoolli' >
  67. 月度应出勤时长:<b id = 'datumAttendanceDate'> </b>
  68. </li>
  69. <li class = 'plantoolli' >
  70. 月度实际出勤时长:<b id = 'actualAttendanceDate'> </b>
  71. </li>
  72. <li class = 'plantoolli' >
  73. 调整时间:<b id = 'adjustTime'> </b>
  74. </li>
  75. <li class = 'plantoolli' >
  76. 总加班时长:<b id = 'overtimeTotalTime' > </b>
  77. </li>
  78. </ul>
  79. <ul>
  80. <li class = 'plantoolli' >
  81. 早退次数:<b>${userAttendanceTotalPage.earlyLeaveAmount}次</b>
  82. </li>
  83. <li class = 'plantoolli' >
  84. 迟到次数:<b>${userAttendanceTotalPage.lateAmount}次</b>
  85. </li>
  86. <li class = 'plantoolli' >
  87. 未打卡次数:<b>${userAttendanceTotalPage.noPunchCardAmount}次</b>
  88. </li>
  89. <li class = 'plantoolli' >
  90. 旷工时长:<b id='absenteeismAmount'>${userAttendanceTotalPage.absenteeismAmount}小时</b>
  91. </li>
  92. </ul>
  93. <br>
  94. <br>
  95. <br>
  96. <ul style="padding-bottom: 20px">
  97. <li class = 'plantoolli' style="width: 48%;padding-right: 4%;">
  98. <table id = "xiujiatable" ></table>
  99. <!-- <div style=" background-color: #5187c9; width: 35px; height: 41px; ">
  100. 休假
  101. </div> -->
  102. <!-- <div style=" background-color: #5187c9; width: 35px; height: 41px; ">
  103. 休假
  104. </div> -->
  105. </li>
  106. <li class = 'plantoolli' style="width: 48%;">
  107. <!-- <div style=" background-color: #5187c9; width: 35px; height: 41px; ">
  108. 加班
  109. </div> -->
  110. <table id = "jiabantable" >
  111. </table>
  112. </li>
  113. </ul>
  114. <br>
  115. <br>
  116. <br>
  117. <ul >
  118. <li class = 'plantoolli' style="width: 100%;">
  119. <table id = "canbutable"></table>
  120. </li>
  121. </ul>
  122. </div>
  123. <div style=" margin-left: 43%;margin-top: 50px;">
  124. <td height="30px" align="center" colspan="4" >
  125. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  126. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">确定</a>
  127. <a href="#" iconcls="icon-return" class="easyui-linkbutton l-btn" plain="true" onclick="history.go(-1)">返回</a>
  128. </td>
  129. </div>
  130. <script type="text/javascript">
  131. $(function(){
  132. $('#userattendancedetaillist').datagrid(
  133. {rownumbers : false});
  134. $('#xiujiatable').datagrid(
  135. {
  136. idField : 'id',
  137. title : '',
  138. rownumbers : false,
  139. loadMsg : '数据加载中...',
  140. pageSize : 10,
  141. pagination : false,
  142. pageList : [ 10, 20, 30 ],
  143. sortOrder : 'asc',
  144. singleSelect : true,
  145. fitColumns : true,
  146. striped : true,
  147. showFooter : true,
  148. frozenColumns : [ [] ],
  149. columns : [ [
  150. {
  151. field : 'id',
  152. title : '主键',
  153. width : 120,
  154. hidden : true,
  155. sortable : true
  156. },
  157. {
  158. field : 'paidLeave',
  159. title : '带薪假(日)',
  160. halign: 'center',
  161. align:'right',
  162. width : 120,
  163. hidden : false,
  164. sortable : false
  165. },
  166. {
  167. field : 'thingLeave',
  168. title : '事假',
  169. formatter:function(value,rec,index){
  170. return minsToHoursandMinsfmt(value,rec,index);
  171. },
  172. halign: 'center',
  173. align:'right',
  174. width : 100,
  175. hidden : false,
  176. sortable : false
  177. },
  178. {
  179. field : 'sickLeave',
  180. title : '病假',
  181. formatter:function(value,rec,index){
  182. return minsToHoursandMinsfmt(value,rec,index);
  183. },
  184. halign: 'center',
  185. align:'right',
  186. width : 100,
  187. hidden : false,
  188. sortable : false
  189. },
  190. {
  191. field : 'marriageLeave',
  192. title : '婚假(日)',
  193. halign: 'center',
  194. align:'right',
  195. width : 120,
  196. hidden : false,
  197. sortable : false
  198. },
  199. {
  200. field : 'funeralLeave',
  201. title : '丧假(日)',
  202. halign: 'center',
  203. align:'right',
  204. width : 120,
  205. hidden : false,
  206. sortable : false
  207. },
  208. {
  209. field : 'maternityLeave',
  210. title : '产假(日)',
  211. halign: 'center',
  212. align:'right',
  213. width : 100,
  214. hidden : false,
  215. sortable : false
  216. },
  217. {
  218. field : 'accompanyMaternityLeave',
  219. title : '陪产假(日)',
  220. halign: 'center',
  221. align:'right',
  222. width : 100,
  223. hidden : false,
  224. sortable : false
  225. },
  226. {
  227. field : 'exchangeTime',
  228. title : '调休',
  229. formatter:function(value,rec,index){
  230. return minsToHoursandMinsfmt(value,rec,index);
  231. },
  232. halign: 'center',
  233. align:'right',
  234. width : 100,
  235. hidden : false,
  236. sortable : false
  237. },
  238. ] ],
  239. });
  240. var jsonobj =JSON.parse( totalinfo.jsonObj);
  241. var sickLeavemin = jsonobj.sickLeavetotalmins;
  242. $('#xiujiatable').datagrid('loadData',[{
  243. paidLeave:totalinfo.paidLeave,
  244. thingLeave:totalinfo.thingLeave,
  245. sickLeave:sickLeavemin,
  246. marriageLeave:totalinfo.marriageLeave,
  247. funeralLeave:totalinfo.funeralLeave,
  248. maternityLeave:totalinfo.maternityLeave,
  249. accompanyMaternityLeave:totalinfo.accompanyMaternityLeave,
  250. exchangeTime:totalinfo.exchangeTime
  251. }]);
  252. $('#jiabantable').datagrid(
  253. {
  254. idField : 'id',
  255. title : '',
  256. rownumbers : false,
  257. loadMsg : '数据加载中...',
  258. pageSize : 10,
  259. pagination : false,
  260. pageList : [ 10, 20, 30 ],
  261. sortOrder : 'asc',
  262. singleSelect : true,
  263. fitColumns : true,
  264. align:'center',
  265. striped : true,
  266. showFooter : true,
  267. frozenColumns : [ [] ],
  268. columns : [ [
  269. {
  270. field : 'id',
  271. title : '主键',
  272. width : 120,
  273. hidden : true,
  274. sortable : true
  275. },
  276. {
  277. field : 'timeoutOvertimeDuration',
  278. title : '超时加班时长',
  279. width : 100,
  280. halign: 'center',
  281. align:'right',
  282. formatter:function(value,rec,index){
  283. return getOvertimeValue();
  284. },
  285. hidden : false,
  286. sortable : false
  287. },
  288. {
  289. field : 'nationalOvertimeDuration',
  290. title : '国定加班时长',
  291. halign: 'center',
  292. width : 110,
  293. align:'right',
  294. formatter:function(value,rec,index){
  295. return minsToHoursandMinsfmt(value,rec,index);
  296. },
  297. hidden : false,
  298. sortable : false
  299. },
  300. {
  301. field : 'dutyDuration',
  302. title : '普通值班天数(日)',
  303. halign: 'center',
  304. width : 110,
  305. align:'right',
  306. hidden : false,
  307. sortable : false
  308. },
  309. {
  310. field : 'nationalDutyDuration',
  311. title : '国定值班天数(日)',
  312. halign: 'center',
  313. width : 110,
  314. align:'right',
  315. hidden : false,
  316. sortable : false
  317. }/* ,
  318. {
  319. field : 'specialOvertime',
  320. title : '加班申请时长',
  321. halign: 'center',
  322. width : 110,
  323. align:'right',
  324. formatter:function(value,rec,index){
  325. return minsToHoursandMinsfmt(value,rec,index);
  326. },
  327. hidden : false,
  328. sortable : false
  329. } */
  330. ] ],
  331. });
  332. $('#jiabantable').datagrid('loadData',[{
  333. timeoutOvertimeDuration:totalinfo.timeoutOvertimeDuration,
  334. nationalOvertimeDuration:totalinfo.nationalOvertimeDuration,
  335. dutyDuration:totalinfo.dutyDuration,
  336. nationalDutyDuration:totalinfo.nationalDutyDuration,
  337. specialOvertime:totalinfo.specialOvertime
  338. }]);
  339. $('#canbutable').datagrid(
  340. {
  341. idField : 'id',
  342. title : '',
  343. rownumbers : false,
  344. loadMsg : '数据加载中...',
  345. pageSize : 10,
  346. titleAlign:'center',
  347. pagination : false,
  348. pageList : [ 10, 20, 30 ],
  349. sortOrder : 'asc',
  350. singleSelect : true,
  351. fitColumns : true,
  352. striped : true,
  353. showFooter : true,
  354. frozenColumns : [ [] ],
  355. columns : [ [
  356. {
  357. field : 'id',
  358. title : '主键',
  359. width : 120,
  360. hidden : true,
  361. sortable : true
  362. },
  363. {
  364. field : 'dayShiftSubsidy',
  365. title : '夜班白班津贴(顿)',
  366. halign: 'center',
  367. align:'right',
  368. width : 120,
  369. hidden : false,
  370. sortable : false
  371. },
  372. {
  373. field : 'nightShiftSubsidy',
  374. title : '夜班夜班津贴(顿)',
  375. halign: 'center',
  376. align:'right',
  377. width : 120,
  378. hidden : false,
  379. sortable : false
  380. },
  381. {
  382. field : 'dayShift',
  383. title : '日班(顿)',
  384. halign: 'center',
  385. align:'right',
  386. width : 120,
  387. hidden : false,
  388. sortable : false
  389. },
  390. {
  391. field : 'regularShift',
  392. title : '常班(顿)',
  393. halign: 'center',
  394. width : 120,
  395. align:'right',
  396. hidden : false,
  397. sortable : false
  398. } ,{
  399. field : 'dutyShift',
  400. title : '值班(顿)',
  401. halign: 'center',
  402. width : 120,
  403. align:'right',
  404. hidden : false,
  405. sortable : false
  406. } ,
  407. /* {
  408. field : 'extraOvertime',
  409. title : '加班餐费(元)',
  410. halign: 'center',
  411. width : 120,
  412. align:'right',
  413. hidden : false,
  414. sortable : false
  415. }, */
  416. ] ],
  417. });
  418. $('#canbutable').datagrid('loadData',[{
  419. dayShiftSubsidy:totalinfo.dayShiftSubsidy,
  420. nightShiftSubsidy:totalinfo.nightShiftSubsidy,
  421. dayShift:totalinfo.dayShift,
  422. regularShift:totalinfo.regularShift ,
  423. fixedValue:totalinfo.fixedValue, /* ,
  424. extraOvertime:totalinfo.overtimeMeal */
  425. dutyShift:totalinfo.dutyShift
  426. }]);
  427. $("#datumAttendanceDate").html(minsToHoursandMinsfmt(${userAttendanceTotalPage.datumAttendanceDate}));
  428. $("#actualAttendanceDate").html(minsToHoursandMinsfmt(${userAttendanceTotalPage.actualAttendanceDate}));
  429. $("#adjustTime").html(minsToHoursandMinsfmt(${userAttendanceTotalPage.adjustTime}));
  430. $("#overtimeTotalTime").html(minsToHoursandMinsfmt(${userAttendanceTotalPage.overtimeTotalTime}));
  431. $("#absenteeismAmount").html(getabsenteeValue());
  432. });
  433. function getabsenteeValue(){
  434. if(null == ${userAttendanceTotalPage.absenteeismAmount_orig}){
  435. return minsToHoursandMinsfmt(${userAttendanceTotalPage.absenteeismAmount});
  436. }else{
  437. return minsToHoursandMinsfmt(${userAttendanceTotalPage.absenteeismAmount});
  438. }
  439. }
  440. function getOvertimeValue(){
  441. if(null == ${userAttendanceTotalPage.timeoutOvertimeDuration_orig}){
  442. return minsToHoursandMinsfmt(${userAttendanceTotalPage.timeoutOvertimeDuration});
  443. }else{
  444. return minsToHoursandMinsfmt(${userAttendanceTotalPage.timeoutOvertimeDuration});
  445. }
  446. }
  447. function attendanceDatefmt(value, rec, index) {
  448. var s = new Date().format('MM-dd hh:mm', value);
  449. var result = s;
  450. var josnobj=JSON.parse(rec.jsonObj);
  451. if (undefined == josnobj.adjustRecord|| '0' == josnobj.adjustRecord) {
  452. } else {
  453. var pri = '';
  454. if(!(undefined == josnobj.primevalAttendanceDate|| null== josnobj.primevalAttendanceDate)){
  455. pri = (new Date(josnobj.primevalAttendanceDate)).Format('MM-dd hh:mm');
  456. }
  457. if(result!= pri){
  458. result = '<div style = "color: blue;font-weight: 800;">'
  459. + result + '</div> '+pri ;
  460. }
  461. }
  462. return result;
  463. }
  464. function fmstatus(val, row, index) {
  465. //可添加更多CSS样式
  466. var s0 = '';
  467. var s1 = 'background-color:#4bb15b;color:#4bb15b;';
  468. var s2 = 'background-color:#b2c038;color:#b2c038;';
  469. var s3 = 'background-color:#f4b93b;color:#f4b93b;';
  470. var s4 = 'background-color:#ee6f48;color:#ee6f48;';
  471. var s5 = 'background-color:#d34650;color:#d34650;';
  472. if (val == 1) {
  473. return s1
  474. } else if (val == 2) {
  475. return s2
  476. } else if (val == 3) {
  477. return s3
  478. } else if (val == 4) {
  479. return s4
  480. } else if (val == 5) {
  481. return s5
  482. } else {
  483. return s1
  484. }
  485. }
  486. function retreatDatefmt(value, rec, index) {
  487. var s = new Date().format('MM-dd hh:mm', value);
  488. var result = s;
  489. var josnobj=JSON.parse(rec.jsonObj);
  490. if (undefined == josnobj.adjustRecord|| '0' == josnobj.adjustRecord) {
  491. } else {
  492. var pri = '';
  493. if(!(undefined == josnobj.primevalRetreatDate|| null== josnobj.primevalRetreatDate)){
  494. pri = (new Date(josnobj.primevalRetreatDate)).Format('MM-dd hh:mm');
  495. }
  496. if(result!= pri){
  497. result = ' <div style = "color: blue;font-weight: 800;">'
  498. + result + '</div> '+pri ;
  499. }
  500. }
  501. return result;
  502. }
  503. function btn_ok() {
  504. var url = 'userAttendanceTotalController.do?${backurl}&queryParams='+encodeURI('${queryParams}');
  505. window.location.href = url;
  506. }
  507. </script>