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.
 
 
 
 
 
 

215 lines
9.9 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-02-03 14:37
  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. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. page.search(queryJson);
  18. }, 220, 400);
  19. $('#Type').lrDataItemSelect({ code: 'EUserType' });
  20. // 刷新
  21. $('#lr_refresh').on('click', function () {
  22. location.reload();
  23. });
  24. // 新增
  25. $('#lr_add').on('click', function () {
  26. learun.layerForm({
  27. id: 'form',
  28. title: '新增',
  29. url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituation/Form',
  30. width: 1000,
  31. height: 650,
  32. callBack: function (id) {
  33. return top[id].acceptClick(refreshGirdData);
  34. }
  35. });
  36. });
  37. // 编辑
  38. $('#lr_edit').on('click', function () {
  39. var keyValue = $('#gridtable').jfGridValue('ID');
  40. if (learun.checkrow(keyValue)) {
  41. learun.layerForm({
  42. id: 'form',
  43. title: '编辑',
  44. url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituation/Form?keyValue=' + keyValue,
  45. width: 1000,
  46. height: 650,
  47. callBack: function (id) {
  48. return top[id].acceptClick(refreshGirdData);
  49. }
  50. });
  51. }
  52. });
  53. // 详情
  54. $('#lr_detail').on('click', function () {
  55. var keyValue = $('#gridtable').jfGridValue('ID');
  56. if (learun.checkrow(keyValue)) {
  57. learun.layerFormForPercent({
  58. id: 'form',
  59. title: '详情',
  60. url: top.$.rootUrl + '/PersonnelManagement/ContactsDetails/Index?keyValue=' + keyValue,
  61. width: '90%',
  62. height: '80%',
  63. btn: null,
  64. callBack: function (id) {
  65. return top[id].acceptClick(refreshGirdData);
  66. }
  67. });
  68. }
  69. });
  70. // 删除
  71. $('#lr_delete').on('click', function () {
  72. var keyValue = $('#gridtable').jfGridValue('ID');
  73. if (learun.checkrow(keyValue)) {
  74. learun.layerConfirm('是否确认删除该项!', function (res) {
  75. if (res) {
  76. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/EpidemicSituation/DeleteForm', { keyValue: keyValue }, function () {
  77. refreshGirdData();
  78. });
  79. }
  80. });
  81. }
  82. });
  83. },
  84. // 初始化列表
  85. initGird: function () {
  86. $('#gridtable').lrAuthorizeJfGrid({
  87. url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituation/GetPageList',
  88. headData: [
  89. { label: "填表人员", name: "Creater", width: 100, align: "left" },
  90. { label: "填报日期", name: "CreaterTime", width: 100, align: "left" },
  91. {
  92. label: "单位名称", name: "UnitName", width: 100, align: "left",
  93. formatterAsync: function (callback, value, row, op, $cell) {
  94. learun.clientdata.getAsync('custmerData', {
  95. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
  96. key: value,
  97. keyId: 'f_companyid',
  98. callback: function (_data) {
  99. callback(_data['f_fullname']);
  100. }
  101. });
  102. }
  103. },
  104. {
  105. label: "类别", name: "Type", width: 100, align: "left",
  106. formatterAsync: function (callback, value, row, op, $cell) {
  107. learun.clientdata.getAsync('dataItem', {
  108. key: value,
  109. code: 'EUserType',
  110. callback: function (_data) {
  111. callback(_data.text);
  112. }
  113. });
  114. }
  115. },
  116. {
  117. label: "所在部门", name: "Department", width: 100, align: "left",
  118. formatterAsync: function (callback, value, row, op, $cell) {
  119. learun.clientdata.getAsync('custmerData', {
  120. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  121. key: value,
  122. keyId: 'id',
  123. callback: function (_data) {
  124. callback(_data['name']);
  125. }
  126. });
  127. }
  128. },
  129. { label: "返工人员", name: "BackUser", width: 100, align: "left" },
  130. {
  131. label: "与填报人关系", name: "RelationShip", width: 100, align: "left",
  132. formatterAsync: function (callback, value, row, op, $cell) {
  133. learun.clientdata.getAsync('dataItem', {
  134. key: value,
  135. code: 'ERelationship',
  136. callback: function (_data) {
  137. callback(_data.text);
  138. }
  139. });
  140. }
  141. },
  142. {
  143. label: "性别", name: "Gender", width: 100, align: "left",
  144. formatterAsync: function (callback, value, row, op, $cell) {
  145. learun.clientdata.getAsync('dataItem', {
  146. key: value,
  147. code: 'usersex',
  148. callback: function (_data) {
  149. callback(_data.text);
  150. }
  151. });
  152. }
  153. },
  154. { label: "身份证号", name: "IDCard", width: 100, align: "left" },
  155. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  156. { label: "联系方式", name: "Mobile", width: 100, align: "left" },
  157. {
  158. label: "前往省份", name: "Provice", width: 100, align: "left",
  159. formatterAsync: function (callback, value, row, op, $cell) {
  160. learun.clientdata.getAsync('custmerData', {
  161. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE',
  162. key: value,
  163. keyId: 'pcode',
  164. callback: function (_data) {
  165. callback(_data['pname']);
  166. }
  167. });
  168. }
  169. },
  170. { label: "前往详细地址", name: "Objective", width: 100, align: "left" },
  171. {
  172. label: "外出原因", name: "OutReason", width: 100, align: "left",
  173. formatterAsync: function (callback, value, row, op, $cell) {
  174. learun.clientdata.getAsync('dataItem', {
  175. key: value,
  176. code: 'OutReason',
  177. callback: function (_data) {
  178. callback(_data.text);
  179. }
  180. });
  181. }
  182. },
  183. { label: "外出时间", name: "OutTime", width: 100, align: "left" },
  184. { label: "返回时间", name: "BackHomeTime", width: 100, align: "left" },
  185. {
  186. label: "交通工具", name: "Vehicle", width: 100, align: "left",
  187. formatterAsync: function (callback, value, row, op, $cell) {
  188. learun.clientdata.getAsync('dataItem', {
  189. key: value,
  190. code: 'Vehicle',
  191. callback: function (_data) {
  192. callback(_data.text);
  193. }
  194. });
  195. }
  196. },
  197. { label: "交通工具号码", name: "VehicleNum", width: 100, align: "left" },
  198. { label: "返回抵达目的地", name: "BackAddress", width: 100, align: "left" },
  199. ],
  200. mainId: 'ID',
  201. isPage: true
  202. });
  203. page.search();
  204. },
  205. search: function (param) {
  206. param = param || {};
  207. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  208. }
  209. };
  210. refreshGirdData = function () {
  211. page.search();
  212. };
  213. page.init();
  214. }