Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

158 Zeilen
6.6 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-10-11 16:46
  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. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  21. page.search(queryJson);
  22. }, 220, 400);
  23. $('#SchoolType').lrselect({
  24. allowSearch: true,
  25. url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 0, IsValid: 0 }),
  26. value: "Id",
  27. text: "ItemName"
  28. });
  29. // 新增
  30. $('#lr_add').on('click', function () {
  31. learun.layerForm({
  32. id: 'form',
  33. title: '新增',
  34. url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/Form',
  35. width: 600,
  36. height: 400,
  37. callBack: function (id) {
  38. return top[id].acceptClick(refreshGirdData);
  39. }
  40. });
  41. });
  42. // 编辑
  43. $('#lr_edit').on('click', function () {
  44. var keyValue = $('#gridtable').jfGridValue('Id');
  45. if (learun.checkrow(keyValue)) {
  46. if (keyValue.indexOf(",") != -1) {
  47. learun.alert.warning("只能选择一条记录进行操作!");
  48. return false;
  49. }
  50. learun.layerForm({
  51. id: 'form',
  52. title: '编辑',
  53. url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/Form?keyValue=' + keyValue,
  54. width: 600,
  55. height: 400,
  56. callBack: function (id) {
  57. return top[id].acceptClick(refreshGirdData);
  58. }
  59. });
  60. }
  61. });
  62. // 删除
  63. $('#lr_delete').on('click', function () {
  64. var keyValue = $('#gridtable').jfGridValue('Id');
  65. if (learun.checkrow(keyValue)) {
  66. learun.layerConfirm('是否确认删除该项!', function (res) {
  67. if (res) {
  68. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/DeleteForm', { keyValue: keyValue}, function () {
  69. refreshGirdData();
  70. });
  71. }
  72. });
  73. }
  74. });
  75. // 导入
  76. $('#lr_import').on('click', function () {
  77. learun.layerForm({
  78. id: 'ImportForm',
  79. title: '导入模板',
  80. url: top.$.rootUrl + '/LR_NewWorkFlow/NWFScheme/ImportForm',
  81. width: 600,
  82. height: 400,
  83. maxmin: true,
  84. btn: null
  85. });
  86. });
  87. // 导出
  88. $('#lr_export').on('click', function () {
  89. learun.layerForm({
  90. id: "ExcelExportForm",
  91. title: '导出Excel数据',
  92. url: top.$.rootUrl + '/Utility/ExcelExportForm?gridId=gridtable&filename=log',
  93. width: 500,
  94. height: 380,
  95. callBack: function (id) {
  96. return top[id].acceptClick();
  97. },
  98. btn: ['导出Excel', '关闭']
  99. });
  100. });
  101. },
  102. // 初始化列表
  103. initGird: function () {
  104. $('#gridtable').jfGrid({
  105. url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/GetPageList',
  106. headData: [
  107. { label: "学生", name: "StuName", width: 200, align: "left"},
  108. { label: "学生学号", name: "StuNo", width: 200, align: "left"},
  109. { label: "身份证号", name: "IdentityCardNo", width: 200, align: "left"},
  110. { label: "班级", name: "ClassNo", width: 200, align: "left" ,
  111. formatterAsync: function (callback, value, row, op, $cell) {
  112. learun.clientdata.getAsync('custmerData', {
  113. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  114. key: value,
  115. keyId: 'classno',
  116. callback: function (_data) {
  117. callback(_data['classname']);
  118. }
  119. });
  120. }
  121. },
  122. {
  123. label: "奖学金类型", name: "SchoolType", width: 200, align: "left",
  124. formatterAsync: function (callback, value, row, op, $cell) {
  125. learun.clientdata.getAsync('custmerData', {
  126. url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 0, IsValid: 0 }),
  127. key: value,
  128. keyId: 'Id',
  129. callback: function (_data) {
  130. callback(_data['ItemName']);
  131. }
  132. });
  133. }
  134. },
  135. {
  136. label: "获得时间", name: "AuditTime", width: 200, align: "left",
  137. formatter: function (cellvalue) {
  138. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  139. }
  140. },
  141. ],
  142. mainId:'Id',
  143. isPage: true,
  144. isMultiselect: true,//复选框
  145. });
  146. page.search();
  147. },
  148. search: function (param) {
  149. param = param || {};
  150. param.IsType = 0;
  151. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  152. },
  153. };
  154. refreshGirdData = function () {
  155. $('#gridtable').jfGridSet('reload');
  156. };
  157. page.init();
  158. }