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.
 
 
 
 
 
 

82 lines
3.3 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. $('#Semester').lrDataItemSelect({ code: 'Semester' });
  36. $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
  37. $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
  38. $('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
  39. },
  40. initData: function () {
  41. if (!!keyValue) {
  42. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/GetFormData?keyValue=' + keyValue, function (data) {
  43. for (var id in data) {
  44. if (!!data[id].length && data[id].length > 0) {
  45. $('#' + id).jfGridSet('refreshdata', data[id]);
  46. }
  47. else {
  48. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  49. }
  50. }
  51. });
  52. }
  53. $('#StuSortNo').val('02');
  54. $('#LessonSortNo').val('2');
  55. $('#CheckStyleNo').val('1');
  56. $('#ScoreRecordStyleNo').val('1');
  57. $('#CheckMark').val('1');
  58. $('#ClassroomType').val('1');
  59. $('#ClassroomPracticeType').val('99');
  60. }
  61. };
  62. // 保存数据
  63. acceptClick = function (callBack) {
  64. if (!$('body').lrValidform()) {
  65. return false;
  66. }
  67. var nName = $("#LessonNo").find(".lr-select-placeholder").text();
  68. var Narray= nName.split("(");
  69. $("#LessonName").val(Narray[0]);
  70. var postData = {
  71. strEntity: JSON.stringify($('body').lrGetFormData())
  72. };
  73. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/SaveForm?keyValue=' + keyValue, postData, function (res) {
  74. // 保存成功后才回调
  75. if (!!callBack) {
  76. callBack();
  77. }
  78. });
  79. };
  80. page.init();
  81. }