Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

199 rader
8.9 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: 1, IsValid :0}),
  26. value: "Id",
  27. text: "ItemName"
  28. });
  29. $('#State').lrselect({
  30. data: [{ text: "待审核", value: "0" }, { text: "审核通过", value: "1" }, { text: "不通过", value: "2" }],
  31. text: "text",
  32. value: "value"
  33. })
  34. // 新增
  35. $('#lr_add').on('click', function () {
  36. learun.layerForm({
  37. id: 'form',
  38. title: '新增',
  39. url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/Formzxj',
  40. width: 600,
  41. height: 400,
  42. callBack: function (id) {
  43. return top[id].acceptClick(refreshGirdData);
  44. }
  45. });
  46. });
  47. // 编辑
  48. $('#lr_edit').on('click', function () {
  49. var keyValue = $('#gridtable').jfGridValue('Id');
  50. if (learun.checkrow(keyValue)) {
  51. if (keyValue.indexOf(",") != -1) {
  52. learun.alert.warning("只能选择一条记录进行操作!");
  53. return false;
  54. }
  55. var State = $('#gridtable').jfGridValue('State');
  56. if (State != 0) {
  57. learun.alert.warning("当前项不可进行编辑!");
  58. return false;
  59. }
  60. learun.layerForm({
  61. id: 'form',
  62. title: '编辑',
  63. url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/Formzxj?keyValue=' + keyValue,
  64. width: 600,
  65. height: 400,
  66. callBack: function (id) {
  67. return top[id].acceptClick(refreshGirdData);
  68. }
  69. });
  70. }
  71. });
  72. // 删除
  73. $('#lr_delete').on('click', function () {
  74. var keyValue = $('#gridtable').jfGridValue('Id');
  75. if (learun.checkrow(keyValue)) {
  76. var State = $('#gridtable').jfGridValue('State');
  77. if (State != 0) {
  78. learun.alert.warning("当前项不可进行删除!");
  79. return false;
  80. }
  81. learun.layerConfirm('是否确认删除该项!', function (res) {
  82. if (res) {
  83. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/DeleteForm', { keyValue: keyValue}, function () {
  84. refreshGirdData();
  85. });
  86. }
  87. });
  88. }
  89. });
  90. // 导入
  91. $('#lr_import').on('click', function () {
  92. learun.layerForm({
  93. id: 'ImportForm',
  94. title: '导入模板',
  95. url: top.$.rootUrl + '/LR_NewWorkFlow/NWFScheme/ImportForm',
  96. width: 600,
  97. height: 400,
  98. maxmin: true,
  99. btn: null
  100. });
  101. });
  102. // 导出
  103. $('#lr_export').on('click', function () {
  104. learun.layerForm({
  105. id: "ExcelExportForm",
  106. title: '导出Excel数据',
  107. url: top.$.rootUrl + '/Utility/ExcelExportForm?gridId=gridtable&filename=log',
  108. width: 500,
  109. height: 380,
  110. callBack: function (id) {
  111. return top[id].acceptClick();
  112. },
  113. btn: ['导出Excel', '关闭']
  114. });
  115. });
  116. },
  117. // 初始化列表
  118. initGird: function () {
  119. $('#gridtable').jfGrid({
  120. url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/GetPageList',
  121. headData: [
  122. { label: "学生", name: "StuName", width: 200, align: "left"},
  123. { label: "学生学号", name: "StuNo", width: 200, align: "left" },
  124. { label: "身份证号", name: "IdentityCardNo", width: 200, align: "left" },
  125. { label: "班级", name: "ClassNo", width: 200, align: "left",
  126. formatterAsync: function (callback, value, row, op, $cell) {
  127. learun.clientdata.getAsync('custmerData', {
  128. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  129. key: value,
  130. keyId: 'classno',
  131. callback: function (_data) {
  132. callback(_data['classname']);
  133. }
  134. });
  135. }
  136. },
  137. {
  138. label: "助学金类型", name: "SchoolType", width: 200, align: "left",
  139. formatterAsync: function (callback, value, row, op, $cell) {
  140. learun.clientdata.getAsync('custmerData', {
  141. url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }),
  142. key: value,
  143. keyId: 'Id',
  144. callback: function (_data) {
  145. callback(_data['ItemName']);
  146. }
  147. });
  148. }
  149. },
  150. { label: "申请时间", name: "GetTime", width: 200, align: "left",
  151. formatter: function (cellvalue) {
  152. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  153. }
  154. },
  155. { label: "审核状态", name: "State", width: 200, align: "left" ,
  156. formatter: function(cellvalue) {
  157. if (cellvalue == '0') {
  158. return '<span class=\"label label-warning\">待审核</span>';
  159. } else if (cellvalue == '1') {
  160. return '<span class=\"label label-success\">审核通过</span>';
  161. } else if (cellvalue == '2') {
  162. return '<span class=\"label label-danger\">不通过</span>';
  163. }
  164. }
  165. },
  166. {
  167. label: "审核时间", name: "AuditTime", width: 200, align: "left",
  168. formatter: function (cellvalue) {
  169. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  170. }
  171. },
  172. ],
  173. mainId:'Id',
  174. isPage: true,
  175. isMultiselect: true,//复选框
  176. });
  177. page.search();
  178. },
  179. search: function (param) {
  180. param = param || {};
  181. param.IsType = 1;
  182. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  183. },
  184. downLoad: function (fileId) {
  185. top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: top.$.lrToken }, method: 'POST' });
  186. }
  187. };
  188. refreshGirdData = function () {
  189. $('#gridtable').jfGridSet('reload');
  190. };
  191. page.init();
  192. }
  193. function downLoad(fileId, fileTwo) {
  194. if (fileTwo) {
  195. top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () {
  196. });
  197. }
  198. top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' });
  199. }