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.
 
 
 
 
 
 

138 lines
6.3 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 weekChina = ["一", "二", "三", "四", "五", "六", "日"];
  8. var refreshGirdData;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. page.initGird();
  14. page.bind();
  15. },
  16. bind: function () {
  17. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  18. page.search(queryJson);
  19. }, 220, 400);
  20. // 刷新
  21. $('#lr_refresh').on('click', function () {
  22. location.reload();
  23. });
  24. $('#AcademicYearNo').lrselect({
  25. placeholder: "学年",
  26. allowSearch: false,
  27. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  28. value: 'value',
  29. text: 'text'
  30. });
  31. //学期
  32. $('#Semester').lrselect({
  33. placeholder: "学期",
  34. allowSearch: false,
  35. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
  36. value: 'value',
  37. text: 'text'
  38. });
  39. $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
  40. $('#lr_edit').on('click', function () {
  41. var keyValue = $('#gridtable').jfGridValue('Id');
  42. var AcademicYearNo = $('#gridtable').jfGridValue('AcademicYearNo');
  43. var Semester = $('#gridtable').jfGridValue('Semester');
  44. var LessonNo = $('#gridtable').jfGridValue('LessonNo');
  45. var EmpNo = $('#gridtable').jfGridValue('EmpNo');
  46. var F_SchoolId = $('#gridtable').jfGridValue('F_SchoolId');
  47. if (learun.checkrow(keyValue)) {
  48. if (keyValue.indexOf(',') == -1) {
  49. learun.alert.warning("必须选择多条记录进行合班操作!");
  50. return;
  51. }
  52. learun.layerConfirm('是否确认合班!', function (res) {
  53. if (res) {
  54. learun.postForm(top.$.rootUrl + '/EducationalAdministration/ElectiveMerge/Merge',
  55. { keyValue: keyValue, Semester: Semester, AcademicYearNo: AcademicYearNo, LessonNo: LessonNo, EmpNo: EmpNo, F_SchoolId: F_SchoolId }, function () {
  56. refreshGirdData();
  57. });
  58. }
  59. });
  60. }
  61. });
  62. //查看学生
  63. $('#lr_view').on('click', function () {
  64. var keyValue = $('#gridtable').jfGridValue('Id');
  65. if (learun.checkrow(keyValue)) {
  66. learun.layerForm({
  67. id: 'form',
  68. title: '查看学生',
  69. url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/FinishIndex?OLPEId=' + keyValue,
  70. width: 1000,
  71. height: 700,
  72. btn: null,
  73. end: function () {
  74. refreshGirdData();
  75. }
  76. });
  77. }
  78. });
  79. //审核学生
  80. $('#lr_audit').on('click', function () {
  81. var keyValue = $('#gridtable').jfGridValue('Id');
  82. if (learun.checkrow(keyValue)) {
  83. learun.layerForm({
  84. id: 'form',
  85. title: '审核学生',
  86. url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/AuditIndex?OLPEId=' + keyValue,
  87. width: 1000,
  88. height: 700,
  89. btn: null,
  90. end: function () {
  91. refreshGirdData();
  92. }
  93. });
  94. }
  95. });
  96. },
  97. // 初始化列表
  98. initGird: function () {
  99. $('#gridtable').lrAuthorizeJfGrid({
  100. url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetPageList',
  101. headData: [
  102. { label: "学年", name: "AcademicYearNo", width: 60, align: "left" },
  103. { label: "学期", name: "Semester", width: 40, align: "left" },
  104. { label: "课程号", name: "LessonNo", width: 100, align: "left" },
  105. { label: "课程名称", name: "LessonName", width: 130, align: "left" },
  106. //{ label: "上课节次(如 11 代表星期一第一节课)", name: "LessonSection", width: 220, align: "left" },
  107. {
  108. label: "上课节次", name: "LessonSection", width: 100, align: "left",
  109. formatter: function (cellvalue, row) {
  110. return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节";
  111. }
  112. },
  113. { label: "上课时间", name: "LessonTime", width: 100, align: "left" },
  114. { label: "学分", name: "StudyScore", width: 100, align: "left" },
  115. { label: "教师号", name: "EmpNo", width: 100, align: "left" },
  116. { label: "教师姓名", name: "EmpName", width: 100, align: "left" },
  117. { label: "教室", name: "ClassRoomName", width: 100, align: "left" }
  118. ],
  119. mainId: 'Id',
  120. isPage: true,
  121. sidx: 'AcademicYearNo desc,Semester desc,LessonName asc,EmpName asc,LessonSection asc',
  122. //sord: 'desc',
  123. isMultiselect: true
  124. });
  125. page.search();
  126. },
  127. search: function (param) {
  128. param = param || {};
  129. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  130. }
  131. };
  132. refreshGirdData = function () {
  133. page.search();
  134. };
  135. page.init();
  136. }