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.
 
 
 
 
 
 

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