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.
 
 
 
 
 
 

126 lines
5.8 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-12-08 12:19
  5. * 描 述:排考2021新
  6. */
  7. var selectedRow;
  8. var refreshGirdData;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var datebegin = '';
  12. var dateend = '';
  13. var page = {
  14. init: function () {
  15. page.initGird();
  16. page.bind();
  17. },
  18. bind: function () {
  19. $('.datetime').each(function () {
  20. $(this).lrdate({
  21. dfdata: [
  22. { name: '清空', begin: function () { return '' }, end: function () { return '' } },
  23. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  24. { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  25. { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  26. { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  27. ],
  28. // 月
  29. mShow: false,
  30. premShow: false,
  31. // 季度
  32. jShow: false,
  33. prejShow: false,
  34. // 年
  35. ysShow: false,
  36. yxShow: false,
  37. preyShow: false,
  38. yShow: false,
  39. // 默认
  40. dfvalue: '0',
  41. selectfn: function (begin, end) {
  42. datebegin = begin;
  43. dateend = end;
  44. }
  45. });
  46. });
  47. // 查询
  48. $('#btn_Search').on('click', function () {
  49. page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet()});
  50. });
  51. // 刷新
  52. $('#lr_refresh').on('click', function () {
  53. location.reload();
  54. });
  55. //排考数据同步
  56. $('#lr_arrange').on('click', function () {
  57. learun.layerForm({
  58. id: 'SyncByConditionForm',
  59. title: '按条件同步排考数据',
  60. url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/SyncByConditionForm',
  61. width: 600,
  62. height: 400,
  63. callBack: function (id) {
  64. return top[id].acceptClick(refreshGirdData);
  65. }
  66. });
  67. });
  68. $('#AcademicYearNo').lrselect({
  69. placeholder: "学年",
  70. allowSearch: false,
  71. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  72. value: 'value',
  73. text: 'text'
  74. });
  75. //学期
  76. $('#Semester').lrselect({
  77. placeholder: "学期",
  78. allowSearch: false,
  79. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
  80. value: 'value',
  81. text: 'text'
  82. });
  83. //课程
  84. $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' });
  85. },
  86. initGird: function () {
  87. $('#gridtable').lrAuthorizeJfGrid({
  88. url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetPageList',
  89. headData: [
  90. { label: '学年', name: 'AcademicYearNo', width: 80, align: "left" },
  91. { label: '学期', name: 'Semester', width: 80, align: "left" },
  92. {
  93. label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) {
  94. return learun.formatDate(v, "yyyy-MM-dd");
  95. }
  96. },
  97. { label: '考试时间', name: 'ExamTime', width: 100, align: "left" },
  98. //{ label: '班级编号', name: 'ClassNo', width: 200, align: "left" },
  99. //{ label: '班级名称', name: 'ClassName', width: 200, align: "left" },
  100. { label: '课程编号', name: 'LessonNo', width: 100, align: "left" },
  101. { label: '课程名称', name: 'LessonName', width: 200, align: "left" },
  102. { label: '教师编号', name: 'EmpNo', width: 100, align: "left" },
  103. { label: '教师姓名', name: 'EmpName', width: 100, align: "left" },
  104. { label: '教室编号', name: 'ClassRoomNo', width: 100, align: "left" },
  105. { label: '教室名称', name: 'ClassRoomName', width: 100, align: "left" }
  106. ],
  107. mainId: 'AETId',
  108. sidx: 'ExamTime asc, LessonNo asc,ClassRoomNo asc',
  109. isPage: true
  110. });
  111. page.search();
  112. },
  113. search: function (param) {
  114. param = param || {};
  115. param.StartTime = datebegin;
  116. param.EndTime = dateend;
  117. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  118. }
  119. };
  120. refreshGirdData = function () {
  121. $('#gridtable').jfGridSet('reload');
  122. };
  123. page.init();
  124. }