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.
 
 
 
 
 
 

81 lines
3.2 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-05-14 10:02
  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. },
  19. initData: function () {
  20. if (!!keyValue) {
  21. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetFormData?keyValue=' + keyValue, function (data) {
  22. for (var id in data) {
  23. if (!!data[id].length && data[id].length > 0) {
  24. $('#' + id ).jfGridSet('refreshdata', data[id]);
  25. }
  26. else {
  27. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  28. }
  29. //课程名称
  30. learun.clientdata.getAsync('custmerData', {
  31. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
  32. key: $('#LessonNo').val(),
  33. keyId: 'lessonno',
  34. callback: function (_data) {
  35. $('#LessonName').val(_data['lessonname']);
  36. }
  37. });
  38. //教师姓名
  39. learun.clientdata.getAsync('custmerData', {
  40. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
  41. key: $('#EmpNo').val(),
  42. keyId: 'empno',
  43. callback: function (_data) {
  44. $('#EmpName').val(_data['empname']);
  45. }
  46. });
  47. //教室名称
  48. learun.clientdata.getAsync('custmerData', {
  49. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo',
  50. key: $('#ClassRoomNo').val(),
  51. keyId: 'classroomno',
  52. callback: function (_data) {
  53. $('#ClassRoomName').val(_data['classroomname']);
  54. }
  55. });
  56. }
  57. });
  58. }
  59. }
  60. };
  61. // 保存数据
  62. acceptClick = function (callBack) {
  63. if (!$('body').lrValidform()) {
  64. return false;
  65. }
  66. var postData = {
  67. strEntity: JSON.stringify($('body').lrGetFormData())
  68. };
  69. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/SaveForm?keyValue=' + keyValue, postData, function (res) {
  70. // 保存成功后才回调
  71. if (!!callBack) {
  72. callBack();
  73. }
  74. });
  75. };
  76. page.init();
  77. }