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.
 
 
 
 
 
 

91 lines
3.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 acceptClick;
  8. var keyValue = request('keyValue');
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. $('.lr-form-wrap').lrscroll();
  14. page.bind();
  15. page.initData();
  16. },
  17. bind: function () {
  18. $('#State').lrselect({
  19. data: [{ text: "待审核", value: "0" }, { text: "审核通过", value: "1" }, { text: "不通过", value: "2" }],
  20. text: "text",
  21. value: "value"
  22. })
  23. $('#AttachmentName').lrUploader();
  24. $('#SchoolType').lrselect({
  25. allowSearch: true,
  26. url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }),
  27. value: "Id",
  28. text: "ItemName"
  29. });
  30. $('#StuName').lrGirdSelect({
  31. // 字段
  32. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic',
  33. selectWord: 'stuname',
  34. value: 'stuname',
  35. text: 'stuname',
  36. headData: [
  37. { label: "学号", name: "stuno", width: 100, align: "left" },
  38. { label: "姓名", name: "stuname", width: 100, align: "left" },
  39. {
  40. label: "班级", name: "classno", width: 100, align: "left",
  41. formatterAsync: function (callback, value, row, op, $cell) {
  42. learun.clientdata.getAsync('custmerData', {
  43. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  44. key: value,
  45. keyId: 'classno',
  46. callback: function (_data) {
  47. callback(_data['classname']);
  48. }
  49. });
  50. }
  51. }
  52. ],
  53. select: function (item) {
  54. $("#StuNo").val(item.stuno);
  55. $("#ClassNo").val(item.classno);
  56. }
  57. });
  58. },
  59. initData: function () {
  60. if (!!keyValue) {
  61. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/GetFormData?keyValue=' + keyValue, function (data) {
  62. for (var id in data) {
  63. if (!!data[id].length && data[id].length > 0) {
  64. $('#' + id ).jfGridSet('refreshdata', data[id]);
  65. }
  66. else {
  67. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  68. }
  69. }
  70. });
  71. }
  72. }
  73. };
  74. // 保存数据
  75. acceptClick = function (callBack) {
  76. if (!$('body').lrValidform()) {
  77. return false;
  78. }
  79. var postData = {
  80. strEntity: JSON.stringify($('body').lrGetFormData())
  81. };
  82. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/SaveForm?keyValue=' + keyValue, postData, function (res) {
  83. // 保存成功后才回调
  84. if (!!callBack) {
  85. callBack();
  86. }
  87. });
  88. };
  89. page.init();
  90. }