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.
 
 
 
 
 
 

206 regels
9.1 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-04-16 15:52
  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. $('#lr_refresh').on('click', function () {
  20. location.reload();
  21. });
  22. //生成上午批次的测量体温人员
  23. //$('#lr_morning').on('click', function () {
  24. // learun.httpAsync('post', top.$.rootUrl + '/EducationalAdministration/Thermography/CreateMorningStudents', { timeType: "0" }, function (res) {
  25. // page.search({ MeasureTime: '0', CreateTime: "" });
  26. // })
  27. //});
  28. //提交上午测温
  29. $('#lr_morning').on('click', function () {
  30. var datas = $('#gridtable').jfGridGet('rowdatas');
  31. if (datas.length > 0) {
  32. learun.layerConfirm('是否确认提交上午测温!', function (res) {
  33. if (res) {
  34. learun.postForm(top.$.rootUrl + '/EducationalAdministration/Thermography/DoSave', { measureTime: '0', rowdatas: JSON.stringify(datas) }, function () {
  35. refreshGirdData();
  36. });
  37. }
  38. });
  39. }
  40. });
  41. //提交中午测温
  42. $('#lr_noon').on('click', function () {
  43. var datas = $('#gridtable').jfGridGet('rowdatas');
  44. if (datas.length > 0) {
  45. learun.layerConfirm('是否确认提交中午测温!', function (res) {
  46. if (res) {
  47. learun.postForm(top.$.rootUrl + '/EducationalAdministration/Thermography/DoSave', { measureTime: '1', rowdatas: JSON.stringify(datas) }, function () {
  48. refreshGirdData();
  49. });
  50. }
  51. });
  52. }
  53. });
  54. //提交晚上测温
  55. $('#lr_neight').on('click', function () {
  56. var datas = $('#gridtable').jfGridGet('rowdatas');
  57. if (datas.length > 0) {
  58. learun.layerConfirm('是否确认提交晚上测温!', function (res) {
  59. if (res) {
  60. learun.postForm(top.$.rootUrl + '/EducationalAdministration/Thermography/DoSave', { measureTime: '2', rowdatas: JSON.stringify(datas) }, function () {
  61. refreshGirdData();
  62. });
  63. }
  64. });
  65. }
  66. });
  67. //提交测温
  68. $('#lr_submit').on('click', function () {
  69. var datas = $('#gridtable').jfGridGet('rowdatas');
  70. if (datas.length > 0) {
  71. learun.layerConfirm('是否确认提交测温!', function (res) {
  72. if (res) {
  73. learun.postForm(top.$.rootUrl + '/EducationalAdministration/Thermography/DoSave', { measureTime: '-1', rowdatas: JSON.stringify(datas) }, function () {
  74. refreshGirdData();
  75. });
  76. }
  77. });
  78. }
  79. });
  80. },
  81. // 初始化列表
  82. initGird: function () {
  83. $('#gridtable').lrAuthorizeJfGrid({
  84. url: top.$.rootUrl + '/EducationalAdministration/Thermography/GetPageListOfStudent',
  85. headData: [
  86. {
  87. label: "系", name: "DeptNo", width: 100, align: "left",
  88. formatterAsync: function (callback, value, row, op, $cell) {
  89. learun.clientdata.getAsync('custmerData', {
  90. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  91. key: value,
  92. keyId: 'deptno',
  93. callback: function (_data) {
  94. callback(_data['deptname']);
  95. }
  96. });
  97. }
  98. },
  99. {
  100. label: "专业", name: "MajorNo", width: 100, align: "left",
  101. formatterAsync: function (callback, value, row, op, $cell) {
  102. learun.clientdata.getAsync('custmerData', {
  103. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  104. key: value,
  105. keyId: 'majorno',
  106. callback: function (_data) {
  107. callback(_data['majorname']);
  108. }
  109. });
  110. }
  111. },
  112. {
  113. label: "班级", name: "ClassNo", width: 100, align: "left",
  114. formatterAsync: function (callback, value, row, op, $cell) {
  115. learun.clientdata.getAsync('custmerData', {
  116. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  117. key: value,
  118. keyId: 'classno',
  119. callback: function (_data) {
  120. callback(_data['classname']);
  121. }
  122. });
  123. }
  124. },
  125. {
  126. label: "测温人", name: "MeasurerID", width: 100, align: "left",
  127. formatterAsync: function (callback, value, row, op, $cell) {
  128. learun.clientdata.getAsync('custmerData', {
  129. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  130. key: value,
  131. keyId: 'f_account',
  132. callback: function (_data) {
  133. callback(_data['f_realname']);
  134. }
  135. });
  136. }
  137. },
  138. {
  139. label: "被测温人学号", name: "PersonBeingMeasured", width: 100, align: "left"
  140. },
  141. {
  142. label: "被测温人", name: "PersonBeingMeasuredName", width: 100, align: "left",
  143. formatterAsync: function (callback, value, row, op, $cell) {
  144. learun.clientdata.getAsync('custmerData', {
  145. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  146. key: row.PersonBeingMeasured,
  147. keyId: 'f_account',
  148. callback: function (_data) {
  149. callback(_data['f_realname']);
  150. }
  151. });
  152. }
  153. },
  154. {
  155. label: "状态", name: "Status", width: 80, align: "left",
  156. edit: {
  157. type: 'select',
  158. datatype: 'dataItem',
  159. code: 'TemperatureMeasure'
  160. }
  161. },
  162. {
  163. label: "温度", name: "Temperature", width: 100, align: "left",
  164. edit: {
  165. type: 'input',
  166. inputType: 'number'
  167. }
  168. },
  169. {
  170. label: "处理结果", name: "ProcessingResult", width: 100, align: "left",
  171. edit: {
  172. type: 'input',
  173. }
  174. },
  175. {
  176. label: "备注", name: "Remark", width: 100, align: "left",
  177. edit: {
  178. type: 'input',
  179. }
  180. },
  181. ],
  182. mainId: 'ID',
  183. isPage: false
  184. });
  185. page.search();
  186. },
  187. search: function (param) {
  188. var loginInfo = top.learun.clientdata.get(['userinfo']);
  189. param = param || {};
  190. param.StartTime = startTime;
  191. param.EndTime = endTime;
  192. param.MeasurerID = loginInfo.account;
  193. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  194. }
  195. };
  196. refreshGirdData = function () {
  197. page.search();
  198. };
  199. page.init();
  200. }