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.
 
 
 
 
 
 

67 lines
2.4 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-10-26 11:05
  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. $('#AcademicYearNo').lrselect({
  19. placeholder: "学年",
  20. allowSearch: false,
  21. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  22. value: 'value',
  23. text: 'text'
  24. });
  25. //学期
  26. $('#Semester').lrselect({
  27. placeholder: "学期",
  28. allowSearch: false,
  29. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
  30. value: 'value',
  31. text: 'text'
  32. });
  33. $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' });
  34. },
  35. initData: function () {
  36. if (!!keyValue) {
  37. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OLPElectiveStuSelectCount/GetFormData?keyValue=' + keyValue, function (data) {
  38. for (var id in data) {
  39. if (!!data[id].length && data[id].length > 0) {
  40. $('#' + id ).jfGridSet('refreshdata', data[id]);
  41. }
  42. else {
  43. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  44. }
  45. }
  46. });
  47. }
  48. }
  49. };
  50. // 保存数据
  51. acceptClick = function (callBack) {
  52. if (!$('body').lrValidform()) {
  53. return false;
  54. }
  55. var postData = {
  56. strEntity: JSON.stringify($('body').lrGetFormData())
  57. };
  58. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OLPElectiveStuSelectCount/SaveForm?keyValue=' + keyValue, postData, function (res) {
  59. // 保存成功后才回调
  60. if (!!callBack) {
  61. callBack();
  62. }
  63. });
  64. };
  65. page.init();
  66. }