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.
 
 
 
 
 
 

120 lines
4.9 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2023-03-13 10:37
  5. * 描 述:定制功能助学金
  6. */
  7. var acceptClick;
  8. var keyValue = request('keyValue');
  9. var Step = request('Step');//第几步
  10. var Types = request('Types');//助学金类型:1国家助学金,2校级助学金
  11. if (Types != null && Types != undefined && Types != "") {
  12. $('#Types').val(Types);
  13. }
  14. var strWhere = "";//点击学号弹出框条件
  15. if (classs != "" && classs != undefined && classs != null) {
  16. strWhere = " and classno in ('" + classs.replaceAll(",", "','") + "') ";
  17. }
  18. var bootstrap = function ($, learun) {
  19. "use strict";
  20. var page = {
  21. init: function () {
  22. $('.lr-form-wrap').lrscroll();
  23. page.hide();
  24. page.bind();
  25. page.initData();
  26. },
  27. hide: function () {
  28. if (Step == "2") {//第二步:二级学院审核,时附件显示且必填;
  29. $('#FilesDiv').show();
  30. $('#Files').attr('isvalid', 'yes');
  31. $('#Files').attr('checkexpession', 'NotNull');
  32. $('#Files').prev().html('附件<font face="宋体">*</font>');
  33. } else {
  34. $('#Files').removeAttr('isvalid');
  35. $('#Files').removeAttr('checkexpession');
  36. $('#Files').prev().html('附件');
  37. $('#FilesDiv').hide();
  38. }
  39. },
  40. bind: function () {
  41. $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
  42. $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
  43. $('#IdCardType').lrDataItemSelect({ code: 'IdCardType' });
  44. $('#IdCardType').lrselectSet("01");
  45. $('#OpenBank').lrDataItemSelect({ code: 'DepositBank' });
  46. //判断登录用户所带班级:学生弹框显示所带班级学生
  47. $('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuno' });
  48. //判断助学金类型:1国家助学金,2校级助学金
  49. if (Types == "1") {
  50. $('#SubsidizeType').lrDataItemSelect({
  51. code: 'StateStipend',
  52. select: function (item) {
  53. //系统自动带出标准、应发金额和实发金额
  54. if (item != null && item != undefined) {
  55. $("#FunderNationStandard").val(item.id);
  56. $("#FinalPayingAmount").val(item.id);
  57. $("#AmountPayable").val(item.id);
  58. }
  59. }
  60. });
  61. } else if (Types == "2") {
  62. $('#SubsidizeType').lrDataItemSelect({
  63. code: 'SchoolStipend',
  64. select: function (item) {
  65. //系统自动带出标准、应发金额和实发金额
  66. if (item != null && item != undefined) {
  67. $("#FunderNationStandard").val(item.id);
  68. $("#FinalPayingAmount").val(item.id);
  69. $("#AmountPayable").val(item.id);
  70. }
  71. }
  72. });
  73. }
  74. $('#Files').lrUploader({ isUpload: false });
  75. },
  76. initData: function () {
  77. if (!!keyValue) {
  78. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/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. if (data[id].IdCardType == null || data[id].IdCardType == "" || data[id].IdCardType == undefined) {
  88. $('#IdCardType').lrselectSet("01");
  89. }
  90. }
  91. });
  92. }
  93. }
  94. };
  95. // 保存数据
  96. acceptClick = function (callBack) {
  97. if (!$('#form').lrValidform()) {
  98. return false;
  99. }
  100. var postData = $('#form').lrGetFormData();
  101. var postDatas = {
  102. strEntity: JSON.stringify(postData)
  103. };
  104. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/SaveForm?keyValue=' + keyValue, postDatas, function (res) {
  105. // 保存成功后才回调
  106. if (!!callBack) {
  107. callBack();
  108. }
  109. });
  110. };
  111. page.init();
  112. }