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.
 
 
 
 
 
 

113 lines
4.8 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-03-04 16:17
  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. $('#ScholarshipType').lrDataItemSelect({ code: 'ScholarshipType' });
  20. $('#ScholarshipDegree').lrDataItemSelect({ code: 'ScholarshipDegree' });
  21. // 刷新
  22. $('#lr_refresh').on('click', function () {
  23. location.reload();
  24. });
  25. // 新增
  26. $('#lr_add').on('click', function () {
  27. learun.layerForm({
  28. id: 'form',
  29. title: '新增',
  30. url: top.$.rootUrl + '/PersonnelManagement/ScholarshipManagement/Form',
  31. width: 600,
  32. height: 400,
  33. callBack: function (id) {
  34. return top[id].acceptClick(refreshGirdData);
  35. }
  36. });
  37. });
  38. // 编辑
  39. $('#lr_edit').on('click', function () {
  40. var keyValue = $('#gridtable').jfGridValue('Id');
  41. if (learun.checkrow(keyValue)) {
  42. learun.layerForm({
  43. id: 'form',
  44. title: '编辑',
  45. url: top.$.rootUrl + '/PersonnelManagement/ScholarshipManagement/Form?keyValue=' + keyValue,
  46. width: 600,
  47. height: 400,
  48. callBack: function (id) {
  49. return top[id].acceptClick(refreshGirdData);
  50. }
  51. });
  52. }
  53. });
  54. // 删除
  55. $('#lr_delete').on('click', function () {
  56. var keyValue = $('#gridtable').jfGridValue('Id');
  57. if (learun.checkrow(keyValue)) {
  58. learun.layerConfirm('是否确认删除该项!', function (res) {
  59. if (res) {
  60. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ScholarshipManagement/DeleteForm', { keyValue: keyValue}, function () {
  61. refreshGirdData();
  62. });
  63. }
  64. });
  65. }
  66. });
  67. },
  68. // 初始化列表
  69. initGird: function () {
  70. $('#gridtable').lrAuthorizeJfGrid({
  71. url: top.$.rootUrl + '/PersonnelManagement/ScholarshipManagement/GetPageList',
  72. headData: [
  73. { label: "奖学金类型", name: "ScholarshipType", width: 100, align: "left",
  74. formatterAsync: function (callback, value, row, op,$cell) {
  75. learun.clientdata.getAsync('dataItem', {
  76. key: value,
  77. code: 'ScholarshipType',
  78. callback: function (_data) {
  79. callback(_data.text);
  80. }
  81. });
  82. }},
  83. { label: "奖学金等级", name: "ScholarshipDegree", width: 100, align: "left",
  84. formatterAsync: function (callback, value, row, op,$cell) {
  85. learun.clientdata.getAsync('dataItem', {
  86. key: value,
  87. code: 'ScholarshipDegree',
  88. callback: function (_data) {
  89. callback(_data.text);
  90. }
  91. });
  92. }},
  93. { label: "金额", name: "Money", width: 100, align: "left"},
  94. { label: "人数", name: "Count", width: 100, align: "left"},
  95. { label: "评选条件", name: "Condition", width: 200, align: "left"},
  96. { label: "备注", name: "Remark", width: 100, align: "left"},
  97. ],
  98. mainId:'Id',
  99. isPage: true
  100. });
  101. page.search();
  102. },
  103. search: function (param) {
  104. param = param || {};
  105. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  106. }
  107. };
  108. refreshGirdData = function () {
  109. page.search();
  110. };
  111. page.init();
  112. }