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.
 
 
 
 
 
 

128 lines
5.3 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-02-03 14:44
  5. * 描 述:疫情详细信息
  6. */
  7. var refreshGirdData;
  8. var EID = request('keyValue');
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. page.initGird();
  14. page.bind();
  15. },
  16. bind: function () {
  17. // 刷新
  18. $('#lr_refresh').on('click', function () {
  19. location.reload();
  20. });
  21. // 新增
  22. $('#lr_add').on('click', function () {
  23. learun.layerForm({
  24. id: 'formDetail',
  25. title: '新增',
  26. url: top.$.rootUrl + '/PersonnelManagement/ContactsDetails/Form?EID=' + EID,
  27. width: 600,
  28. height: 500,
  29. callBack: function (id) {
  30. return top[id].acceptClick(refreshGirdData);
  31. }
  32. });
  33. });
  34. // 编辑
  35. $('#lr_edit').on('click', function () {
  36. var keyValue = $('#gridtable').jfGridValue('ID');
  37. if (learun.checkrow(keyValue)) {
  38. learun.layerForm({
  39. id: 'formDetail',
  40. title: '编辑',
  41. url: top.$.rootUrl + '/PersonnelManagement/ContactsDetails/Form?keyValue=' + keyValue,
  42. width: 600,
  43. height: 500,
  44. callBack: function (id) {
  45. return top[id].acceptClick(refreshGirdData);
  46. }
  47. });
  48. }
  49. });
  50. // 删除
  51. $('#lr_delete').on('click', function () {
  52. var keyValue = $('#gridtable').jfGridValue('ID');
  53. if (learun.checkrow(keyValue)) {
  54. learun.layerConfirm('是否确认删除该项!', function (res) {
  55. if (res) {
  56. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ContactsDetails/DeleteForm', { keyValue: keyValue }, function () {
  57. refreshGirdData();
  58. });
  59. }
  60. });
  61. }
  62. });
  63. },
  64. // 初始化列表
  65. initGird: function () {
  66. $('#gridtable').lrAuthorizeJfGrid({
  67. url: top.$.rootUrl + '/PersonnelManagement/ContactsDetails/GetPageList',
  68. headData: [
  69. { label: "姓名", name: "Name", width: 100, align: "left" },
  70. {
  71. label: "性别", name: "Gender", width: 100, align: "left",
  72. formatterAsync: function (callback, value, row, op, $cell) {
  73. learun.clientdata.getAsync('dataItem', {
  74. key: value,
  75. code: 'usersex',
  76. callback: function (_data) {
  77. callback(_data.text);
  78. }
  79. });
  80. }
  81. },
  82. { label: "联系方式", name: "Mobile", width: 100, align: "left" },
  83. { label: "身份证号", name: "IDCard", width: 100, align: "left" },
  84. {
  85. label: "隔离方式", name: "QTType", width: 100, align: "left",
  86. formatterAsync: function (callback, value, row, op, $cell) {
  87. learun.clientdata.getAsync('dataItem', {
  88. key: value,
  89. code: 'QuarantineType',
  90. callback: function (_data) {
  91. callback(_data.text);
  92. }
  93. });
  94. }
  95. },
  96. { label: "隔离地点", name: "QTAddress", width: 100, align: "left" },
  97. { label: "隔离时间", name: "QTTime", width: 100, align: "left" },
  98. { label: "解除隔离时间", name: "QTContactTime", width: 100, align: "left" },
  99. {
  100. label: "是否发热", name: "Fever", width: 100, align: "left",
  101. formatterAsync: function (callback, value, row, op, $cell) {
  102. learun.clientdata.getAsync('dataItem', {
  103. key: value,
  104. code: 'YesOrNoInt',
  105. callback: function (_data) {
  106. callback(_data.text);
  107. }
  108. });
  109. }
  110. },
  111. ],
  112. mainId: 'ID',
  113. isPage: true
  114. });
  115. page.search();
  116. },
  117. search: function (param) {
  118. param = param || {};
  119. param.EID = EID;
  120. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  121. }
  122. };
  123. refreshGirdData = function () {
  124. page.search();
  125. };
  126. page.init();
  127. }