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.
 
 
 
 
 
 

128 lines
6.4 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 ClassNo = '';
  14. var page = {
  15. init: function () {
  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({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() });
  50. });
  51. // 刷新
  52. $('#lr_refresh').on('click', function () {
  53. location.reload();
  54. });
  55. $('#AcademicYearNo').lrselect({
  56. placeholder: "学年",
  57. allowSearch: false,
  58. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  59. value: 'value',
  60. text: 'text'
  61. });
  62. //学期
  63. $('#Semester').lrselect({
  64. placeholder: "学期",
  65. allowSearch: false,
  66. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
  67. value: 'value',
  68. text: 'text'
  69. });
  70. $.get('/Home/GetYearAndSemesteResult', function (ref) {
  71. if (ref.code == "200") {
  72. $('#AcademicYearNo').lrselectSet(ref.data.Item1);
  73. $('#Semester').lrselectSet(ref.data.Item3);
  74. page.initGird();
  75. }
  76. }.bind(this), "json");
  77. $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' });
  78. $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' });
  79. $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' });
  80. },
  81. initGird: function () {
  82. $('#gridtable').lrAuthorizeJfGrid({
  83. url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetItemPageList',
  84. headData: [
  85. { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" },
  86. { label: '学期', name: 'Semester', width: 60, align: "left" },
  87. {
  88. label: '考试日期', name: 'ExamDate', width: 120, align: "left"
  89. , formatter: function (v) {
  90. return learun.formatDate(v, "yyyy-MM-dd");
  91. }
  92. },
  93. { label: '考试时间', name: 'ExamTime', width: 120, align: "left" },
  94. { label: '课程编号', name: 'LessonNo', width: 100, align: "left" },
  95. { label: '课程名称', name: 'LessonName', width: 200, align: "left" },
  96. { label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" },
  97. { label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" },
  98. { label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" },
  99. { label: '教室名称', name: 'ClassroomName', width: 100, align: "left" },
  100. { label: '班级名称', name: 'ClassName', width: 100, align: "left" },
  101. { label: '学生编号', name: 'StuNo', width: 100, align: "left" },
  102. { label: '学生姓名', name: 'StuName', width: 200, align: "left" },
  103. { label: '座位编号', name: 'SitNumber', width: 100, aligndd: "left" }
  104. ],
  105. mainId: 'AETId',
  106. sidx: 'ExamDate desc, LessonNo asc,ClassRoomNo asc,ClassNo asc,SitNumber asc',
  107. isPage: true
  108. });
  109. page.search();
  110. },
  111. search: function (param) {
  112. param = param || {};
  113. param.AcademicYearNo = $('#AcademicYearNo').lrselectGet();
  114. param.Semester = $('#Semester').lrselectGet();
  115. param.StartTime = datebegin;
  116. param.EndTime = dateend;
  117. var loginInfo = learun.clientdata.get(['userinfo']);
  118. param.StuNo = loginInfo.account;
  119. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  120. }
  121. };
  122. refreshGirdData = function () {
  123. $('#gridtable').jfGridSet('reload');
  124. };
  125. page.init();
  126. }