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.
 
 
 
 
 
 

98 lines
3.8 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2023-03-16 11:49
  5. * 描 述:校级奖学金
  6. */
  7. var acceptClick;
  8. var bindData;
  9. var keyValue = request('keyValue');
  10. var Step = request('Step');//第几步
  11. var bootstrap = function ($, learun) {
  12. "use strict";
  13. var page = {
  14. init: function () {
  15. $('.lr-form-wrap').lrscroll();
  16. page.hide();
  17. page.bind();
  18. page.initData();
  19. },
  20. hide: function () {
  21. if (Step == "2") {//第二步:二级学院审核,时附件显示且必填;
  22. $('#FilesDiv').show();
  23. $('#Url').attr('isvalid', 'yes');
  24. $('#Url').attr('checkexpession', 'NotNull');
  25. $('#Url').prev().html('附件<font face="宋体">*</font>');
  26. } else {
  27. $('#Url').removeAttr('isvalid');
  28. $('#Url').removeAttr('checkexpession');
  29. $('#Url').prev().html('附件');
  30. $('#FilesDiv').hide();
  31. }
  32. },
  33. bind: function () {
  34. $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
  35. $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
  36. $('#IdCardType').lrDataItemSelect({ code: 'IdCardType' });
  37. $('#IdCardType').lrselectSet("01");
  38. $('#DepositBank').lrDataItemSelect({ code: 'DepositBank' });
  39. $('#FundingLevel').lrDataItemSelect({
  40. code: 'SchoolFundingLevel',
  41. select: function (item) {
  42. if (!!item) {
  43. $('#FundingCriteria').val(item.id);
  44. $('#ShoudAmount').val(item.id);
  45. $('#ActualAmount').val(item.id);
  46. }
  47. }
  48. });
  49. $('#Url').lrUploader({ isUpload: false });
  50. },
  51. initData: function () {
  52. if (!!keyValue) {
  53. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetFormData?keyValue=' + keyValue, function (data) {
  54. for (var id in data) {
  55. if (!!data[id].length && data[id].length > 0) {
  56. $('#' + id).jfGridSet('refreshdata', data[id]);
  57. }
  58. else {
  59. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  60. }
  61. }
  62. });
  63. }
  64. }
  65. };
  66. // 保存数据
  67. acceptClick = function (callBack) {
  68. if (!$('body').lrValidform()) {
  69. return false;
  70. }
  71. var postData = {
  72. strEntity: JSON.stringify($('body').lrGetFormData())
  73. };
  74. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/SaveForm?keyValue=' + keyValue, postData, function (res) {
  75. // 保存成功后才回调
  76. if (!!callBack) {
  77. callBack();
  78. }
  79. });
  80. };
  81. bindData = function (data) {
  82. if (!!data) {
  83. $('#StuName').val(data.StuName);
  84. $('#StuNo').val(data.StuNo);
  85. $('#DeptNo').lrselectSet(data.DeptNo);
  86. $('#ClassNo').lrselectSet(data.ClassNo);
  87. $('#IdCard').val(data.IdCard);
  88. $('#AcademicYearNo').val(data.AcademicYearNo);
  89. $('#Semester').val(data.Semester);
  90. $('#CalssNum').val(data.StuNum);
  91. $('#ClassRank').val(data.Num);
  92. $('#DepositBank').lrselectSet(data.DepositBank);
  93. $('#BankCard').val(data.BankCard);
  94. }
  95. };
  96. page.init();
  97. }