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.

IndexSchool.js 6.1 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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 refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var cddeptname = '';
  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. }, 250, 400);
  20. //$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
  21. $('#AcademicYearNo').lrselect({
  22. placeholder: "请选择学年",
  23. allowSearch: true,
  24. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  25. value: 'value',
  26. text: 'text'
  27. });
  28. //年级
  29. $('#Grade').lrselect({
  30. placeholder: "请选择年级",
  31. allowSearch: true,
  32. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData',
  33. value: 'value',
  34. text: 'text'
  35. });
  36. $('#Semester').lrDataItemSelect({ code: 'Semester' });
  37. $("#MajorNo").lrselect();
  38. $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
  39. // 刷新
  40. $('#lr_refresh').on('click', function () {
  41. location.reload();
  42. });
  43. },
  44. // 初始化列表
  45. initGird: function () {
  46. $('#gridtable').jfGrid({
  47. url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/GetPageListForSchool',
  48. headData: [
  49. { label: "学年", name: "AcademicYearNo", width: 80, align: "left" },
  50. {
  51. label: "学期", name: "Semester", width: 50, align: "left",
  52. formatterAsync: function (callback, value, row, op, $cell) {
  53. learun.clientdata.getAsync('dataItem', {
  54. key: value,
  55. code: 'Semester',
  56. callback: function (_data) {
  57. callback(_data.text);
  58. }
  59. });
  60. }
  61. },
  62. { label: "年级", name: "Grade", width: 50, align: "left" },
  63. { label: "课程编码", name: "LessonNo", width: 200, align: "left" },
  64. { label: "课程名称", name: "LessonName", width: 200, align: "left" },
  65. {
  66. label: "课程类型", name: "LessonTypeId", width: 200, align: "left",
  67. formatterAsync: function (callback, value, row, op, $cell) {
  68. learun.clientdata.getAsync('custmerData', {
  69. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType',
  70. key: value,
  71. keyId: 'ltid',
  72. callback: function (_data) {
  73. callback(_data['lessontypename']);
  74. }
  75. });
  76. }
  77. },
  78. {
  79. label: "状态", name: "State", width: 100, align: "left",
  80. formatter: function (cellvalue, row) {
  81. if (cellvalue == 0) {
  82. return '<span class=\"label label-warning\">未排课</span>';
  83. } if (cellvalue == 1) {
  84. return '<span class=\"label label-success\">已排课</span>';
  85. }
  86. }
  87. },
  88. { label: "拟开教学班数", name: "TeachClassNum", width: 100, align: "left" },
  89. //{ label: "人数", name: "StuNum", width: 80, align: "left" },
  90. { label: "周课时", name: "WeekLessonHour", width: 80, align: "left" },
  91. { label: "理论课时", name: "WeekHourClassroom", width: 80, align: "left" },
  92. { label: "实践课时", name: "PracticeHour", width: 80, align: "left" },
  93. { label: "起始周次", name: "StartWeek", width: 80, align: "left" },
  94. //{ label: "结束周次", name: "EndWeek", width: 80, align: "left" },
  95. //{
  96. // label: "负责开课院系", name: "TeachDeptNo", width: 100, align: "left",
  97. // formatterAsync: function (callback, value, row, op, $cell) {
  98. // learun.clientdata.getAsync('custmerData', {
  99. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  100. // key: value,
  101. // keyId: 'deptno',
  102. // callback: function (_data) {
  103. // callback(_data['deptname']);
  104. // }
  105. // });
  106. // }
  107. //},
  108. { label: "学分", name: "StudyScore", width: 80, align: "left" },
  109. { label: "备注", name: "Remark", width: 100, align: "left" },
  110. ],
  111. mainId: 'ID',
  112. sidx: 'MakeDate desc',
  113. isPage: true
  114. });
  115. page.search();
  116. },
  117. search: function (param) {
  118. param = param || {};
  119. param.DeptNo = cddeptname;
  120. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  121. }
  122. };
  123. refreshGirdData = function () {
  124. $('#gridtable').jfGridSet('reload');
  125. };
  126. page.init();
  127. }