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.
 
 
 
 
 
 

111 lines
4.5 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-03-03 11:47
  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. // 刷新
  20. $('#lr_refresh').on('click', function () {
  21. location.reload();
  22. });
  23. // 新增
  24. $('#lr_add').on('click', function () {
  25. learun.layerForm({
  26. id: 'form',
  27. title: '新增',
  28. url: top.$.rootUrl + '/PersonnelManagement/LaborUnionMember/Form',
  29. width: 600,
  30. height: 400,
  31. callBack: function (id) {
  32. return top[id].acceptClick(refreshGirdData);
  33. }
  34. });
  35. });
  36. // 编辑
  37. $('#lr_edit').on('click', function () {
  38. var keyValue = $('#gridtable').jfGridValue('Id');
  39. if (learun.checkrow(keyValue)) {
  40. learun.layerForm({
  41. id: 'form',
  42. title: '编辑',
  43. url: top.$.rootUrl + '/PersonnelManagement/LaborUnionMember/Form?keyValue=' + keyValue,
  44. width: 600,
  45. height: 400,
  46. callBack: function (id) {
  47. return top[id].acceptClick(refreshGirdData);
  48. }
  49. });
  50. }
  51. });
  52. // 删除
  53. $('#lr_delete').on('click', function () {
  54. var keyValue = $('#gridtable').jfGridValue('Id');
  55. if (learun.checkrow(keyValue)) {
  56. learun.layerConfirm('是否确认删除该项!', function (res) {
  57. if (res) {
  58. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/LaborUnionMember/DeleteForm', { keyValue: keyValue }, function () {
  59. refreshGirdData();
  60. });
  61. }
  62. });
  63. }
  64. });
  65. },
  66. // 初始化列表
  67. initGird: function () {
  68. $('#gridtable').lrAuthorizeJfGrid({
  69. url: top.$.rootUrl + '/PersonnelManagement/LaborUnionMember/GetPageList',
  70. headData: [
  71. { label: "姓名", name: "Name", width: 100, align: "left" },
  72. {
  73. label: "性别", name: "Sex", width: 100, align: "left",
  74. formatter: function (callback, cellvalue, row, op, $cell) {
  75. return cellvalue == true ? "男" : "女";
  76. }
  77. },
  78. {
  79. label: "民族", name: "Nation", width: 100, align: "left",
  80. formatterAsync: function (callback, value, row, op, $cell) {
  81. learun.clientdata.getAsync('dataItem', {
  82. key: value,
  83. code: 'National',
  84. callback: function (_data) {
  85. callback(_data.text);
  86. }
  87. });
  88. }
  89. },
  90. { label: "身份证", name: "IDCard", width: 150, align: "left" },
  91. { label: "学历", name: "Education", width: 100, align: "left" },
  92. { label: "联系方式", name: "Phone", width: 100, align: "left" },
  93. { label: "工会职务", name: "Position", width: 100, align: "left" },
  94. { label: "入会时间", name: "JoinTime", width: 130, align: "left" },
  95. ],
  96. mainId: 'Id',
  97. isPage: true
  98. });
  99. page.search();
  100. },
  101. search: function (param) {
  102. param = param || {};
  103. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  104. }
  105. };
  106. refreshGirdData = function () {
  107. page.search();
  108. };
  109. page.init();
  110. }