You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

178 lines
8.3 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-06-17 09:17
  5. * 描 述:健康打卡时段
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var startTime;
  11. var endTime;
  12. var page = {
  13. init: function () {
  14. page.initGird();
  15. page.bind();
  16. },
  17. bind: function () {
  18. // 时间搜索框
  19. $('#datesearch').lrdate({
  20. dfdata: [
  21. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  22. { name: '昨天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59', 'd', -1) } },
  23. { name: '前天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -2) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59', 'd', -2) } }
  24. ],
  25. // 月
  26. mShow: false,
  27. premShow: false,
  28. // 季度
  29. jShow: false,
  30. prejShow: false,
  31. // 年
  32. ysShow: false,
  33. yxShow: false,
  34. preyShow: false,
  35. yShow: false,
  36. // 默认
  37. dfvalue: '0',
  38. selectfn: function (begin, end) {
  39. startTime = begin;
  40. endTime = end;
  41. page.search();
  42. }
  43. });
  44. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  45. page.search(queryJson);
  46. }, 220, 400);
  47. $('#F_School').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
  48. $('#IsStatus').lrselect({
  49. data: [{ text: "未打卡", value: "0" }, { text: "缺卡", value: "1" }, { text: "已打卡", value: "2" }],
  50. text: "text",
  51. value: "value"
  52. })
  53. $('#MajorNo').lrselect({
  54. allowSearch: true,
  55. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  56. value: "majorno",
  57. text: "majorname",
  58. param: { strWhere: "1=1 AND CheckMark=1 order by majorno asc" },
  59. select: function (item) {
  60. if (item) {
  61. $('#ClassNo').lrselectRefresh({
  62. allowSearch: true,
  63. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  64. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 order by classno asc" }
  65. });
  66. } else {
  67. $('#ClassNo').lrselectRefresh({
  68. allowSearch: true,
  69. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  70. param: { strWhere: "1=1 AND CheckMark=1 order by classno asc" }
  71. });
  72. }
  73. }
  74. });
  75. $('#ClassNo').lrselect({
  76. allowSearch: true,
  77. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  78. param: { strWhere: "1=1 AND CheckMark=1" },
  79. value: "classno",
  80. text: "classname"
  81. });
  82. // 刷新
  83. $('#lr_refresh').on('click', function () {
  84. location.reload();
  85. });
  86. },
  87. // 初始化列表
  88. initGird: function () {
  89. $('#gridtable').jfGrid({
  90. url: top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/GetStatistics',
  91. headData: [
  92. {
  93. label: "院校", name: "F_School", width: 130, align: "left",
  94. formatterAsync: function (callback, value, row, op, $cell) {
  95. learun.clientdata.getAsync('custmerData', {
  96. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
  97. key: value,
  98. keyId: 'f_companyid',
  99. callback: function (_data) {
  100. callback(_data['f_fullname']);
  101. }
  102. });
  103. }
  104. },
  105. {
  106. label: "专业", name: "MajorNo", width: 130, align: "left",
  107. formatterAsync: function (callback, value, row, op, $cell) {
  108. learun.clientdata.getAsync('custmerData', {
  109. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  110. key: value,
  111. keyId: 'majorno',
  112. callback: function (_data) {
  113. callback(_data['majorname']);
  114. }
  115. });
  116. }
  117. },
  118. {
  119. label: "班级", name: "ClassNo", width: 90, align: "left",
  120. formatterAsync: function (callback, value, row, op, $cell) {
  121. learun.clientdata.getAsync('custmerData', {
  122. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  123. key: value,
  124. keyId: 'classno',
  125. callback: function (_data) {
  126. callback(_data['classname']);
  127. }
  128. });
  129. }
  130. },
  131. { label: "学工号", name: "StuNo", width: 90, align: "left" },
  132. { label: "学生姓名", name: "StuName", width: 150, align: "left" },
  133. { label: "联系方式", name: "Phone", width: 100, align: "left" },
  134. {
  135. label: "日期", name: "DKDate", width: 90, align: "left",
  136. formatter: function (cellvalue) {
  137. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  138. }
  139. },
  140. { label: "早打卡地址", name: "Address1", width: 200, align: "left" },
  141. { label: "午打卡地址", name: "Address2", width: 200, align: "left" },
  142. { label: "晚打卡地址", name: "Address3", width: 200, align: "left" },
  143. { label: "早体温", name: "Temperature1", width: 80, align: "left" },
  144. { label: "午体温", name: "Temperature2", width: 80, align: "left" },
  145. { label: "晚体温", name: "Temperature3", width: 80, align: "left" },
  146. {
  147. label: "打卡状态", name: "Num", width: 100, align: "left",
  148. formatter: function (cellvalue) {
  149. if (cellvalue == 0) {
  150. return '<span class=\"label label-danger\">未打卡</span>';
  151. } else if (cellvalue < "3") {
  152. return '<span class=\"label label-warning\">缺卡</span>';
  153. } else if (cellvalue == "3") {
  154. return "<span class=\"label label-success\">已打卡</span>";
  155. }
  156. }
  157. },
  158. ],
  159. mainId: 'ID',
  160. isPage: true,
  161. sidx: 'DKDate desc,MajorNo asc,ClassNo asc',
  162. });
  163. page.search();
  164. },
  165. search: function (param) {
  166. param = param || {};
  167. param.StartTime = startTime;
  168. param.EndTime = endTime;
  169. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  170. }
  171. };
  172. refreshGirdData = function () {
  173. $('#gridtable').jfGridSet('reload');
  174. };
  175. page.init();
  176. }