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.

Index.js 6.9 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-12-31 10:38
  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 + '/PersonnelManagement/PMMembership/Form',
  26. width: 800,
  27. height: 600,
  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 + '/PersonnelManagement/PMMembership/Form?keyValue=' + keyValue,
  41. width: 800,
  42. height: 600,
  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 + '/PersonnelManagement/PMMembership/DeleteForm', { keyValue: keyValue }, function () {
  56. refreshGirdData();
  57. });
  58. }
  59. });
  60. }
  61. });
  62. },
  63. // 初始化列表
  64. initGird: function () {
  65. $('#gridtable').lrAuthorizeJfGrid({
  66. url: top.$.rootUrl + '/PersonnelManagement/PMMembership/GetPageList',
  67. headData: [
  68. { label: "姓名", name: "Name", width: 100, align: "left" },
  69. {
  70. label: "性别", name: "Gender", width: 100, align: "left",
  71. formatterAsync: function (callback, value, row, op, $cell) {
  72. learun.clientdata.getAsync('dataItem', {
  73. key: value,
  74. code: 'usersex',
  75. callback: function (_data) {
  76. callback(_data.text);
  77. }
  78. });
  79. }
  80. },
  81. {
  82. label: "民族", name: "Nation", width: 100, align: "left",
  83. formatterAsync: function (callback, value, row, op, $cell) {
  84. learun.clientdata.getAsync('custmerData', {
  85. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdNationality',
  86. key: value,
  87. keyId: 'nationalityno',
  88. callback: function (_data) {
  89. callback(_data['nationality']);
  90. }
  91. });
  92. }
  93. },
  94. { label: "出生年月", name: "Birthday", width: 100, align: "left" },
  95. { label: "身份证号", name: "IDCard", width: 150, align: "left" },
  96. { label: "入党时间", name: "AccessionDate", width: 100, align: "left" },
  97. {
  98. label: "是否在职", name: "IsInJob", width: 100, align: "left",
  99. formatterAsync: function (callback, value, row, op, $cell) {
  100. learun.clientdata.getAsync('dataItem', {
  101. key: value,
  102. code: 'YesOrNoInt',
  103. callback: function (_data) {
  104. callback(_data.text);
  105. }
  106. });
  107. }
  108. },
  109. { label: "参加工作时间", name: "JobDate", width: 100, align: "left" },
  110. {
  111. label: "学历", name: "Education", width: 100, align: "left",
  112. formatterAsync: function (callback, value, row, op, $cell) {
  113. learun.clientdata.getAsync('custmerData', {
  114. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree',
  115. key: value,
  116. keyId: 'culturedegreeno',
  117. callback: function (_data) {
  118. callback(_data['culturedegree']);
  119. }
  120. });
  121. }
  122. },
  123. { label: "人员类别", name: "Category", width: 100, align: "left" },
  124. { label: "所在党支部", name: "PartyBranch", width: 100, align: "left" },
  125. { label: "正式党员日期", name: "FormalDate", width: 100, align: "left" },
  126. { label: "工作岗位", name: "Post", width: 100, align: "left" },
  127. { label: "联系电话", name: "Mobile", width: 100, align: "left" },
  128. { label: "家庭住址", name: "Address", width: 100, align: "left" },
  129. { label: "培养人", name: "TrainPerson", width: 100, align: "left" },
  130. {
  131. label: "审核状态", name: "CheckStatus", width: 100, align: "left",
  132. formatter: function (cellvalue) {
  133. return cellvalue == true ? "是" : "否";
  134. }
  135. },
  136. ],
  137. mainId: 'ID',
  138. isPage: true
  139. });
  140. page.search();
  141. },
  142. search: function (param) {
  143. param = param || {};
  144. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  145. }
  146. };
  147. refreshGirdData = function () {
  148. page.search();
  149. };
  150. page.init();
  151. }