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.
 
 
 
 
 
 

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