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.
 
 
 
 
 
 

116 lines
4.6 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. $('#ApplyDate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
  50. $('#Url').lrUploader();
  51. //根据登录用户自动带出内容:姓名 院系 班级 身份证件号 开户银行 开户卡账号
  52. var timer = setTimeout(function () {
  53. $("#StuNo").val(StuNo);
  54. $("#StuName").val(StuName);
  55. $("#DeptNo").lrselectSet(DeptNo);
  56. $("#ClassNo").lrselectSet(ClassNo);
  57. $("#IdCard").val(IdentityCardNo);
  58. $("#DepositBank").lrselectSet(OpenBank);
  59. $("#BankCard").val(OpenAccount);
  60. clearTimeout(timer);
  61. }, 10);
  62. //选择成绩
  63. $("#lr_select").on('click', function () {
  64. learun.layerForm({
  65. id: 'StuDentSelect',
  66. title: '选择学生成绩',
  67. url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/IndexInStuScoreOfStudent',
  68. width: 1200,
  69. height: 800,
  70. callBack: function (id) {
  71. return top[id].acceptClick(bindData);
  72. }
  73. });
  74. });
  75. },
  76. initData: function () {
  77. if (!!keyValue) {
  78. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetFormData?keyValue=' + keyValue, function (data) {
  79. for (var id in data) {
  80. if (!!data[id].length && data[id].length > 0) {
  81. $('#' + id).jfGridSet('refreshdata', data[id]);
  82. }
  83. else {
  84. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  85. }
  86. }
  87. });
  88. }
  89. }
  90. };
  91. // 保存数据
  92. acceptClick = function (callBack) {
  93. if (!$('body').lrValidform()) {
  94. return false;
  95. }
  96. var postData = {
  97. strEntity: JSON.stringify($('body').lrGetFormData())
  98. };
  99. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/SaveForm?keyValue=' + keyValue, postData, function (res) {
  100. // 保存成功后才回调
  101. if (!!callBack) {
  102. callBack();
  103. }
  104. });
  105. };
  106. bindData = function (data) {
  107. if (!!data) {
  108. $('#AcademicYearNo').val(data.AcademicYearNo);
  109. $('#Semester').val(data.Semester);
  110. $('#CalssNum').val(data.TotalNum);
  111. $('#ClassRank').val(data.Rank);
  112. }
  113. };
  114. page.init();
  115. }