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.
 
 
 
 
 
 

115 lines
4.8 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-11-19 15:35
  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. $('#Department').lrDepartmentSelect();
  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/PartyMember/Form',
  30. width: 600,
  31. height: 400,
  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/PartyMember/Form?keyValue=' + keyValue,
  45. width: 600,
  46. height: 400,
  47. callBack: function (id) {
  48. return top[id].acceptClick(refreshGirdData);
  49. }
  50. });
  51. }
  52. });
  53. // 删除
  54. $('#lr_delete').on('click', function () {
  55. var keyValue = $('#gridtable').jfGridValue('ID');
  56. if (learun.checkrow(keyValue)) {
  57. learun.layerConfirm('是否确认删除该项!', function (res) {
  58. if (res) {
  59. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/PartyMember/DeleteForm', { keyValue: keyValue}, function () {
  60. refreshGirdData();
  61. });
  62. }
  63. });
  64. }
  65. });
  66. },
  67. // 初始化列表
  68. initGird: function () {
  69. $('#gridtable').lrAuthorizeJfGrid({
  70. url: top.$.rootUrl + '/PersonnelManagement/PartyMember/GetPageList',
  71. headData: [
  72. { label: "名字", name: "Name", width: 100, align: "left"},
  73. { label: "性别", name: "Gender", width: 100, align: "left",
  74. formatterAsync: function (callback, value, row, op,$cell) {
  75. learun.clientdata.getAsync('dataItem', {
  76. key: value,
  77. code: 'usersex',
  78. callback: function (_data) {
  79. callback(_data.text);
  80. }
  81. });
  82. }},
  83. { label: "职位", name: "Position", width: 100, align: "left"},
  84. { label: "部门", name: "Department", width: 100, align: "left",
  85. formatterAsync: function (callback, value, row, op,$cell) {
  86. learun.clientdata.getAsync('department', {
  87. key: value,
  88. callback: function (_data) {
  89. callback(_data.name);
  90. }
  91. });
  92. }},
  93. { label: "学历", name: "Education", width: 100, align: "left"},
  94. { label: "联系方式", name: "Mobile", width: 100, align: "left"},
  95. { label: "特长", name: "Speciality", width: 100, align: "left"},
  96. { label: "时间", name: "Time", width: 100, align: "left"},
  97. { label: "备注", name: "Remark", width: 100, align: "left" },
  98. { label: "审核状态", name: "CheckStatus", width: 100, align: "left" },
  99. ],
  100. mainId:'ID',
  101. isPage: true
  102. });
  103. page.search();
  104. },
  105. search: function (param) {
  106. param = param || {};
  107. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  108. }
  109. };
  110. refreshGirdData = function () {
  111. page.search();
  112. };
  113. page.init();
  114. }