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.
 
 
 
 
 
 

132 lines
6.3 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-05-05 11:41
  5. * 描 述:教师成绩单提交
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. page.search(queryJson);
  18. }, 300, 400);
  19. //学年
  20. $('#AcademicYearNo').lrselect({
  21. placeholder: "请选择",
  22. allowSearch: true,
  23. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData',
  24. value: 'value',
  25. text: 'text'
  26. });
  27. //学期
  28. $('#Semester').lrselect({
  29. placeholder: "请选择",
  30. allowSearch: true,
  31. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
  32. value: 'value',
  33. text: 'text'
  34. });
  35. $('#ElectronicStatus').lrDataItemSelect({ code: 'YesOrNoInt'});
  36. $('#PaperStatus').lrDataItemSelect({ code: 'YesOrNoInt'});
  37. // 刷新
  38. $('#lr_refresh').on('click', function () {
  39. location.reload();
  40. });
  41. // 提交纸质成绩单
  42. $('#lr_submit').on('click', function () {
  43. var keyValue = $('#gridtable').jfGridValue('Id');
  44. if (learun.checkrow(keyValue)) {
  45. var paperStatus = $('#gridtable').jfGridValue('PaperStatus');
  46. if (paperStatus != 0) {
  47. learun.alert.warning("当前教师已提交纸质成绩单!");
  48. return false;
  49. }
  50. learun.layerConfirm('是否确认当前教师已经提交纸质成绩单!', function (res) {
  51. if (res) {
  52. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/EmpReportCard/SubmitForm', { keyValue: keyValue, status: 1 }, function () {
  53. refreshGirdData();
  54. });
  55. }
  56. });
  57. }
  58. });
  59. // 撤销纸质成绩单
  60. $('#lr_cancel').on('click', function () {
  61. var keyValue = $('#gridtable').jfGridValue('Id');
  62. if (learun.checkrow(keyValue)) {
  63. var paperStatus = $('#gridtable').jfGridValue('PaperStatus');
  64. if (paperStatus != 1) {
  65. learun.alert.warning("当前教师未提交纸质成绩单!");
  66. return false;
  67. }
  68. learun.layerConfirm('是否确认撤销纸质成绩单!', function (res) {
  69. if (res) {
  70. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/EmpReportCard/SubmitForm', { keyValue: keyValue, status: 0 }, function () {
  71. refreshGirdData();
  72. });
  73. }
  74. });
  75. }
  76. });
  77. },
  78. // 初始化列表
  79. initGird: function () {
  80. $('#gridtable').lrAuthorizeJfGrid({
  81. url: top.$.rootUrl + '/EducationalAdministration/EmpReportCard/GetPageList',
  82. headData: [
  83. { label: "学年", name: "AcademicYearNo", width: 80, align: "left" },
  84. { label: "学期", name: "Semester", width: 80, align: "left" },
  85. { label: "课程号", name: "LessonNo", width: 100, align: "left" },
  86. { label: "课程名称", name: "LessonName", width: 150, align: "left" },
  87. { label: "班级号", name: "ClassNo", width: 100, align: "left" },
  88. { label: "班级名称", name: "ClassName", width: 100, align: "left" },
  89. { label: "教师号", name: "EmpNo", width: 100, align: "left" },
  90. { label: "教师名称", name: "EmpName", width: 100, align: "left" },
  91. { label: "上课教室号", name: "ClassRoomNo", width: 100, align: "left" },
  92. { label: "上课教室名称", name: "ClassRoomName", width: 100, align: "left" },
  93. { label: "上课节次(如11代表星期一第一节课)", name: "LessonSection", width: 100, align: "left" },
  94. {
  95. label: "类型", name: "LessonSortNo", width: 100, align: "left",
  96. formatter: function (cellvalue, rowObject) {
  97. return cellvalue == 1 ? "<span>必修课</span>" : "<span>选修课</span>";
  98. }
  99. },
  100. {
  101. label: "电子成绩单提交", name: "ElectronicStatus", width: 100, align: "left",
  102. formatter: function (cellvalue, rowObject) {
  103. return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
  104. }
  105. },
  106. { label: "电子成绩单提交时间", name: "ElectronicTime", width: 130, align: "left" },
  107. {
  108. label: "纸质成绩单提交", name: "PaperStatus", width: 100, align: "left",
  109. formatter: function (cellvalue, rowObject) {
  110. return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
  111. }
  112. },
  113. { label: "纸质成绩单提交时间", name: "PaperTime", width: 130, align: "left" },
  114. ],
  115. mainId: 'Id',
  116. isPage: true,
  117. sidx: 'AcademicYearNo,Semester',
  118. sord: 'desc'
  119. });
  120. page.search();
  121. },
  122. search: function (param) {
  123. param = param || {};
  124. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  125. }
  126. };
  127. refreshGirdData = function () {
  128. page.search();
  129. };
  130. page.init();
  131. }