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.

IsHelpForm.js 2.8 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-05-25
  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. //$('#SupportGrade').lrDataItemSelect({
  19. // code: 'SupportGrade'
  20. // //,select: function (item) {
  21. // // if (item != undefined) {
  22. // // if (item.id == '1') {
  23. // // $('#SupportType').lrDataItemSelect({ code: 'SupportType1' });
  24. // // }
  25. // // else if (item.id == '2') {
  26. // // $('#SupportType').lrDataItemSelect({ code: 'SupportType2' });
  27. // // }
  28. // // }
  29. // //}
  30. //});
  31. //$('#SupportGrade').lrselectSet("1");
  32. $('#SupportType').lrRadioCheckbox({
  33. type: 'checkbox',
  34. code: 'SupportType1',
  35. });
  36. $('#SupportType1').lrRadioCheckbox({
  37. type: 'checkbox',
  38. code: 'SupportType2',
  39. });
  40. },
  41. initData: function () {
  42. if (!!keyValue) {
  43. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetFormData?keyValue=' + keyValue, function (data) {
  44. for (var id in data) {
  45. if (!!data[id].length && data[id].length > 0) {
  46. $('#' + id).jfGridSet('refreshdata', data[id]);
  47. }
  48. else {
  49. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  50. }
  51. }
  52. });
  53. }
  54. }
  55. };
  56. // 保存数据
  57. acceptClick = function (callBack) {
  58. if (!$('body').lrValidform()) {
  59. return false;
  60. }
  61. var strEntity = $('body').lrGetFormData();
  62. if (strEntity.SupportType) {
  63. strEntity.SupportGrade = '1';
  64. }
  65. else if (strEntity.SupportType1) {
  66. strEntity.SupportGrade = '2';
  67. }
  68. //console.log(strEntity);
  69. var postData = {
  70. strEntity: JSON.stringify(strEntity)
  71. };
  72. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SupplySupport?keyValue=' + keyValue, postData, function (res) {
  73. // 保存成功后才回调
  74. if (!!callBack) {
  75. callBack();
  76. }
  77. });
  78. };
  79. page.init();
  80. }