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.
 
 
 
 
 
 

64 lines
2.2 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-12-16 10:14
  5. * 描 述:长阳迎新
  6. */
  7. var acceptClick;
  8. var keyValue = request('keyValue');
  9. var MajorNo = request('MajorNo');
  10. var bootstrap = function ($, learun) {
  11. "use strict";
  12. var page = {
  13. init: function () {
  14. $('.lr-form-wrap').lrscroll();
  15. page.bind();
  16. page.initData();
  17. },
  18. bind: function () {
  19. if (MajorNo != null && MajorNo != "" && MajorNo != undefined) {
  20. $('#ClassNo').lrselect({
  21. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  22. param: { strWhere: " 1=1 and MajorNo = '" + MajorNo + "'" },
  23. value: "classno",
  24. text: "classname",
  25. maxHeight: 200,
  26. allowSearch: true,
  27. });
  28. }
  29. $("#ClassNo").lrselect();
  30. },
  31. initData: function () {
  32. if (!!keyValue) {
  33. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetFormData?keyValue=' + keyValue, function (data) {
  34. for (var id in data) {
  35. if (!!data[id].length && data[id].length > 0) {
  36. $('#' + id).jfGridSet('refreshdata', data[id]);
  37. }
  38. else {
  39. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  40. }
  41. }
  42. });
  43. }
  44. }
  45. };
  46. // 保存数据
  47. acceptClick = function (callBack) {
  48. if (!$('body').lrValidform()) {
  49. return false;
  50. }
  51. var data = $('body').lrGetFormData();
  52. var postData = {
  53. ClassNo: data.ClassNo
  54. };
  55. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/SaveClassForm?keyValue=' + keyValue, postData, function (res) {
  56. // 保存成功后才回调
  57. if (!!callBack) {
  58. callBack();
  59. }
  60. });
  61. };
  62. page.init();
  63. }