25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

89 lines
3.6 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-11-29 11:43
  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. $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
  19. $('#AcademicYearNo').lrselect({
  20. placeholder: "请选择学年",
  21. allowSearch: true,
  22. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  23. value: 'value',
  24. text: 'text'
  25. });
  26. $('#LessonSortDetailNo').lrDataSourceSelect({ code: 'CdLessonSortDetail', value: 'lessonsortdetailno', text: 'lessonsortdetailname' });
  27. //年级
  28. $('#Grade').lrselect({
  29. placeholder: "请选择年级",
  30. allowSearch: true,
  31. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData',
  32. value: 'value',
  33. text: 'text'
  34. });
  35. //学期
  36. $('#Semester').lrselect({
  37. placeholder: "请选择学期",
  38. allowSearch: true,
  39. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
  40. value: 'value',
  41. text: 'text'
  42. });
  43. $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
  44. $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
  45. $('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
  46. },
  47. initData: function () {
  48. if (!!keyValue) {
  49. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/GetFormData?keyValue=' + keyValue, function (data) {
  50. for (var id in data) {
  51. if (!!data[id].length && data[id].length > 0) {
  52. $('#' + id).jfGridSet('refreshdata', data[id]);
  53. }
  54. else {
  55. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  56. }
  57. }
  58. });
  59. }
  60. $('#StuSortNo').val('02');
  61. $('#LessonSortNo').val('2');
  62. $('#CheckStyleNo').val('1');
  63. $('#ScoreRecordStyleNo').val('1');
  64. $('#CheckMark').val('1');
  65. $('#ClassroomType').val('1');
  66. $('#ClassroomPracticeType').val('99');
  67. }
  68. };
  69. // 保存数据
  70. acceptClick = function (callBack) {
  71. if (!$('body').lrValidform()) {
  72. return false;
  73. }
  74. var nName = $("#LessonNo").find(".lr-select-placeholder").text();
  75. var Narray= nName.split("(");
  76. $("#LessonName").val(Narray[0]);
  77. var postData = {
  78. strEntity: JSON.stringify($('body').lrGetFormData())
  79. };
  80. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/SaveForm?keyValue=' + keyValue, postData, function (res) {
  81. // 保存成功后才回调
  82. if (!!callBack) {
  83. callBack();
  84. }
  85. });
  86. };
  87. page.init();
  88. }