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.
 
 
 
 
 
 

121 lines
5.6 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.bind();
  16. },
  17. bind: function () {
  18. $('.datetime').each(function () {
  19. $(this).lrdate({
  20. dfdata: [
  21. { name: '清空', begin: function () { return '' }, end: function () { return '' } },
  22. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  23. { 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') } },
  24. { 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') } },
  25. { 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') } },
  26. ],
  27. // 月
  28. mShow: false,
  29. premShow: false,
  30. // 季度
  31. jShow: false,
  32. prejShow: false,
  33. // 年
  34. ysShow: false,
  35. yxShow: false,
  36. preyShow: false,
  37. yShow: false,
  38. // 默认
  39. dfvalue: '0',
  40. selectfn: function (begin, end) {
  41. datebegin = begin;
  42. dateend = end;
  43. }
  44. });
  45. });
  46. // 查询
  47. $('#btn_Search').on('click', function () {
  48. page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet()});
  49. });
  50. // 刷新
  51. $('#lr_refresh').on('click', function () {
  52. location.reload();
  53. });
  54. $('#AcademicYearNo').lrselect({
  55. placeholder: "学年",
  56. allowSearch: false,
  57. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  58. value: 'value',
  59. text: 'text'
  60. });
  61. //学期
  62. $('#Semester').lrselect({
  63. placeholder: "学期",
  64. allowSearch: false,
  65. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
  66. value: 'value',
  67. text: 'text'
  68. });
  69. $.get('/Home/GetYearAndSemesteResult', function (ref) {
  70. if (ref.code == "200") {
  71. $('#AcademicYearNo').lrselectSet(ref.data.Item1);
  72. $('#Semester').lrselectSet(ref.data.Item3);
  73. page.initGird();
  74. }
  75. }.bind(this), "json");
  76. //课程
  77. $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' });
  78. },
  79. initGird: function () {
  80. $('#gridtable').lrAuthorizeJfGrid({
  81. url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetPageList',
  82. headData: [
  83. { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" },
  84. { label: '学期', name: 'Semester', width: 60, align: "left" },
  85. {
  86. label: '考试日期', name: 'ExamDate', width: 200, align: "left", formatter: function (v) {
  87. return learun.formatDate(v, "yyyy-MM-dd");
  88. }
  89. },
  90. { label: '考试时间', name: 'ExamTime', width: 200, align: "left" },
  91. { label: '课程编号', name: 'LessonNo', width: 200, align: "left" },
  92. { label: '课程名称', name: 'LessonName', width: 200, align: "left" },
  93. { label: '教师编号', name: 'EmpNo', width: 200, align: "left" },
  94. { label: '教师姓名', name: 'EmpName', width: 200, align: "left" },
  95. { label: '教室编号', name: 'ClassroomNo', width: 200, align: "left" },
  96. { label: '教室名称', name: 'ClassroomName', width: 200, align: "left" }
  97. ],
  98. mainId: 'EPIId',
  99. sidx: 'ExamDate desc,ExamTime asc,LessonNo asc,ClassroomNo asc',
  100. isPage: true
  101. });
  102. page.search();
  103. },
  104. search: function (param) {
  105. param = param || {};
  106. param.AcademicYearNo = $('#AcademicYearNo').lrselectGet();
  107. param.Semester = $('#Semester').lrselectGet();
  108. param.StartTime = datebegin;
  109. param.EndTime = dateend;
  110. var loginInfo = learun.clientdata.get(['userinfo']);
  111. param.EmpNo = loginInfo.account;
  112. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  113. }
  114. };
  115. refreshGirdData = function () {
  116. $('#gridtable').jfGridSet('reload');
  117. };
  118. page.init();
  119. }