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.
 
 
 
 
 
 

138 lines
6.1 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-06-17 11:00
  5. * 描 述:体温上报
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. // 刷新
  17. $('#lr_refresh').on('click', function () {
  18. location.reload();
  19. });
  20. // 新增
  21. $('#lr_add').on('click', function () {
  22. learun.layerForm({
  23. id: 'form',
  24. title: '新增',
  25. url: top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/Form',
  26. width: 600,
  27. height: 400,
  28. callBack: function (id) {
  29. return top[id].acceptClick(refreshGirdData);
  30. }
  31. });
  32. });
  33. // 编辑
  34. $('#lr_edit').on('click', function () {
  35. var keyValue = $('#gridtable').jfGridValue('ID');
  36. if (learun.checkrow(keyValue)) {
  37. learun.layerForm({
  38. id: 'form',
  39. title: '编辑',
  40. url: top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/Form?keyValue=' + keyValue,
  41. width: 600,
  42. height: 400,
  43. callBack: function (id) {
  44. return top[id].acceptClick(refreshGirdData);
  45. }
  46. });
  47. }
  48. });
  49. // 删除
  50. $('#lr_delete').on('click', function () {
  51. var keyValue = $('#gridtable').jfGridValue('ID');
  52. if (learun.checkrow(keyValue)) {
  53. learun.layerConfirm('是否确认删除该项!', function (res) {
  54. if (res) {
  55. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/DeleteForm', { keyValue: keyValue }, function () {
  56. refreshGirdData();
  57. });
  58. }
  59. });
  60. }
  61. });
  62. },
  63. // 初始化列表
  64. initGird: function () {
  65. $('#gridtable').jfGrid({
  66. url: top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/GetPageList',
  67. headData: [
  68. { label: "学工号", name: "StuNo", width: 100, align: "left" },
  69. { label: "学生姓名", name: "StuName", width: 100, align: "left" },
  70. {
  71. label: "性别", name: "Sex", width: 100, align: "left",
  72. formatter: function (cellvalue) {
  73. return cellvalue == 1 ? "男" : "女";
  74. }
  75. },
  76. {
  77. label: "所属院校", name: "F_School", width: 150, align: "left",
  78. formatterAsync: function (callback, value, row, op, $cell) {
  79. learun.clientdata.getAsync('custmerData', {
  80. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
  81. key: value,
  82. keyId: 'f_companyid',
  83. callback: function (_data) {
  84. callback(_data['f_fullname']);
  85. }
  86. });
  87. }
  88. },
  89. {
  90. label: "所属专业", name: "MajorNo", width: 150, align: "left",
  91. formatterAsync: function (callback, value, row, op, $cell) {
  92. learun.clientdata.getAsync('custmerData', {
  93. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  94. key: value,
  95. keyId: 'majorno',
  96. callback: function (_data) {
  97. callback(_data['majorname']);
  98. }
  99. });
  100. }
  101. },
  102. {
  103. label: "所属班级", name: "ClassNo", width: 150, align: "left",
  104. formatterAsync: function (callback, value, row, op, $cell) {
  105. learun.clientdata.getAsync('custmerData', {
  106. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  107. key: value,
  108. keyId: 'classno',
  109. callback: function (_data) {
  110. callback(_data['classname']);
  111. }
  112. });
  113. }
  114. },
  115. { label: "年级", name: "Grade", width: 100, align: "left" },
  116. { label: "联系方式", name: "Phone", width: 100, align: "left" },
  117. { label: "体温", name: "Temperature", width: 100, align: "left" },
  118. { label: "打卡所在地址", name: "Address", width: 200, align: "left" },
  119. { label: "打卡时间", name: "CreateTime", width: 140, align: "left" },
  120. { label: "备注", name: "Remark", width: 200, align: "left" },
  121. ],
  122. mainId: 'ID',
  123. isPage: true,
  124. sidx: 'CreateTime desc',
  125. });
  126. page.search();
  127. },
  128. search: function (param) {
  129. param = param || {};
  130. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  131. }
  132. };
  133. refreshGirdData = function () {
  134. $('#gridtable').jfGridSet('reload');
  135. };
  136. page.init();
  137. }