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.
 
 
 
 
 
 

117 lines
4.9 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-11-19 11:03
  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. $('#StudentID').lrDataSourceSelect({ code: 'StuInfoBasic',value: 'stuid',text: 'stuname' });
  20. $('#Month').lrDataItemSelect({ code: 'MPMonth' });
  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 + '/EducationalAdministration/StuGrant/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 + '/EducationalAdministration/StuGrant/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 + '/EducationalAdministration/StuGrant/DeleteForm', { keyValue: keyValue}, function () {
  61. refreshGirdData();
  62. });
  63. }
  64. });
  65. }
  66. });
  67. //  导出
  68. $('#lr_export').on('click', function () {
  69. });
  70. },
  71. // 初始化列表
  72. initGird: function () {
  73. $('#gridtable').lrAuthorizeJfGrid({
  74. url: top.$.rootUrl + '/EducationalAdministration/StuGrant/GetPageList',
  75. headData: [
  76. { label: "年", name: "Year", width: 100, align: "left"},
  77. { label: "月份", name: "Month", width: 100, align: "left",
  78. formatterAsync: function (callback, value, row, op,$cell) {
  79. learun.clientdata.getAsync('dataItem', {
  80. key: value,
  81. code: 'MPMonth',
  82. callback: function (_data) {
  83. callback(_data.text);
  84. }
  85. });
  86. }},
  87. { label: "学生", name: "StudentID", width: 100, align: "left",
  88. formatterAsync: function (callback, value, row, op,$cell) {
  89. learun.clientdata.getAsync('custmerData', {
  90. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic',
  91. key: value,
  92. keyId: 'stuid',
  93. callback: function (_data) {
  94. callback(_data['stuname']);
  95. }
  96. });
  97. }},
  98. { label: "状态", name: "Status", width: 100, align: "left"},
  99. { label: "价格", name: "Price", width: 100, align: "left"},
  100. { label: "流程id", name: "ProcessID", width: 100, align: "left"},
  101. ],
  102. mainId:'ID',
  103. isPage: true
  104. });
  105. page.search();
  106. },
  107. search: function (param) {
  108. param = param || {};
  109. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  110. }
  111. };
  112. refreshGirdData = function () {
  113. page.search();
  114. };
  115. page.init();
  116. }