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.
 
 
 
 
 
 

128 lines
4.9 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-04-26 15:02
  5. * 描 述:学生宿舍管理
  6. */
  7. var acceptClick;
  8. var lessonNo = request('lessonNo');
  9. var lessonTime = request('lessonTime');
  10. var lessonDate = request('lessonDate');
  11. //var lessonName = request('lessonName');
  12. var empNo = request('empNo');
  13. var academicyear = request('academicyear');
  14. var semester = request('semester');
  15. var lessonSortNo = request('lessonSortNo');
  16. var classRoomNo = request('classRoomNo');
  17. var teachClassNo = request('teachClassNo');
  18. var bootstrap = function ($, learun) {
  19. "use strict";
  20. var page = {
  21. init: function () {
  22. $('.lr-form-wrap').lrscroll();
  23. page.bind();
  24. page.initData();
  25. },
  26. initData: function () {
  27. if (!!lessonNo) {
  28. $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TimeTable/GetFormData', function (data) {
  29. for (var id in data) {
  30. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  31. }
  32. console.log(lessonNo);
  33. $("#AcademicYearNo").val(academicyear);
  34. $("#EmpNo").val(empNo);
  35. $("#LessonNo").val(lessonNo);
  36. //$("#LessonName").val(lessonName);
  37. $("#LessonTime").val(lessonTime);
  38. $("#LessonDate").val(lessonDate);
  39. $("#Semester").val(semester);
  40. $("#LessonSortNo").val(lessonSortNo);
  41. $("#ClassRoomNo").val(classRoomNo);
  42. $("#TeachClassNo").val(teachClassNo);
  43. learun.clientdata.getAsync('custmerData', {
  44. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  45. key: $("#DeptNo").val(),
  46. keyId: 'deptno',
  47. callback: function (_data) {
  48. $("#DeptName").val(_data.deptname);
  49. }
  50. });
  51. learun.clientdata.getAsync('custmerData', {
  52. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  53. key: $("#MajorNo").val(),
  54. keyId: 'majorno',
  55. callback: function (_data) {
  56. $("#MajorName").val(_data.majorname);
  57. }
  58. });
  59. learun.clientdata.getAsync('custmerData', {
  60. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
  61. key:lessonNo,
  62. keyId: 'lessonno',
  63. callback: function (_data) {
  64. $("#LessonName").val(_data.lessonname);
  65. }
  66. });
  67. learun.clientdata.getAsync('custmerData', {
  68. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  69. key: $("#ClassNo").val(),
  70. keyId: 'classno',
  71. callback: function (_data) {
  72. $("#ClassName").val(_data.classname);
  73. }
  74. });
  75. learun.clientdata.getAsync('custmerData', {
  76. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonSort',
  77. key: $("#LessonSortNo").val(),
  78. keyId: 'lessonsortno',
  79. callback: function (_data) {
  80. $("#LessonSortName").val(_data.lessonsortname);
  81. }
  82. });
  83. learun.clientdata.getAsync('custmerData', {
  84. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo',
  85. key: $("#ClassRoomNo").val(),
  86. keyId: 'classroomno',
  87. callback: function (_data) {
  88. $("#ClassRoomName").val(_data.classroomname);
  89. }
  90. });
  91. });
  92. }
  93. },
  94. bind: function () {
  95. $('#LeaveType').lrRadioCheckbox({
  96. type: 'radio',
  97. code: 'LeaveType',
  98. });
  99. },
  100. };
  101. // 保存数据
  102. acceptClick = function (callBack) {
  103. if (!$('body').lrValidform()) {
  104. return false;
  105. }
  106. var postData = {
  107. strEntity: JSON.stringify($('body').lrGetFormData())
  108. };
  109. $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/TimeTable/SaveForm?keyValue=', postData, function (res) {
  110. // 保存成功后才回调
  111. if (!!callBack) {
  112. callBack();
  113. }
  114. });
  115. };
  116. page.init();
  117. }