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.
 
 
 
 
 
 

68 lines
2.4 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-02-07 18:32
  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. $('#ResetTable').lrDataItemSelect({ code: 'BasicTableForArrange' });
  19. //学年
  20. $('#AcademicYearNo').lrselect({
  21. placeholder: "请选择学年",
  22. allowSearch: true,
  23. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  24. value: 'value',
  25. text: 'text'
  26. });
  27. //学期
  28. $('#Semester').lrselect({
  29. placeholder: "请选择学年",
  30. allowSearch: true,
  31. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
  32. value: 'value',
  33. text: 'text'
  34. });
  35. },
  36. initData: function () {
  37. if (!!keyValue) {
  38. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonButt/GetFormData?keyValue=' + keyValue, function (data) {
  39. for (var id in data) {
  40. if (!!data[id].length && data[id].length > 0) {
  41. $('#' + id ).jfGridSet('refreshdata', data[id]);
  42. }
  43. else {
  44. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  45. }
  46. }
  47. });
  48. }
  49. }
  50. };
  51. // 保存数据
  52. acceptClick = function (callBack) {
  53. if (!$('body').lrValidform()) {
  54. return false;
  55. }
  56. var postData = {
  57. strEntity: JSON.stringify($('body').lrGetFormData())
  58. };
  59. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonButt/SaveForm?keyValue=' + keyValue, postData, function (res) {
  60. // 保存成功后才回调
  61. if (!!callBack) {
  62. callBack();
  63. }
  64. });
  65. };
  66. page.init();
  67. }