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.
 
 
 
 
 
 

153 lines
6.7 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-08-21 17:28
  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. page.bindSelect();
  15. },
  16. bind: function () {
  17. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  18. page.search(queryJson);
  19. }, 250, 400);
  20. // 刷新
  21. $('#lr_refresh').on('click', function () {
  22. location.reload();
  23. });
  24. // 新增
  25. $('#lr_add').on('click', function () {
  26. learun.layerForm({
  27. id: 'form',
  28. title: '新增',
  29. url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/FormOfElective',
  30. width: 600,
  31. height: 400,
  32. callBack: function (id) {
  33. return top[id].acceptClick(refreshGirdData);
  34. }
  35. });
  36. });
  37. // 编辑
  38. $('#lr_edit').on('click', function () {
  39. var keyValue = $('#gridtable').jfGridValue('Id');
  40. if (learun.checkrow(keyValue)) {
  41. learun.layerForm({
  42. id: 'form',
  43. title: '成绩比例设置',
  44. url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/FormOfElective?keyValue=' + keyValue,
  45. width: 600,
  46. height: 400,
  47. callBack: function (id) {
  48. return top[id].acceptClick(refreshGirdData);
  49. }
  50. });
  51. }
  52. });
  53. // 删除
  54. $('#lr_delete').on('click', function () {
  55. var keyValue = $('#gridtable').jfGridValue('Id');
  56. if (learun.checkrow(keyValue)) {
  57. learun.layerConfirm('是否确认删除该项!', function (res) {
  58. if (res) {
  59. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/DeleteForm', { keyValue: keyValue }, function () {
  60. refreshGirdData();
  61. });
  62. }
  63. });
  64. }
  65. });
  66. },
  67. bindSelect: function () {
  68. //校区
  69. $('#F_SchoolId').lrDataSourceSelect({
  70. code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { }
  71. });
  72. //学年
  73. $('#AcademicYearNo').lrselect({
  74. placeholder: "请选择学年",
  75. allowSearch: true,
  76. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData',
  77. value: 'value',
  78. text: 'text'
  79. });
  80. //学期
  81. $('#Semester').lrselect({
  82. placeholder: "请选择学期",
  83. allowSearch: true,
  84. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
  85. value: 'value',
  86. text: 'text'
  87. });
  88. $('#LessonNo').lrselect({
  89. placeholder: "请选择课程",
  90. allowSearch: true,
  91. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo',
  92. value: 'value',
  93. text: 'text'
  94. });
  95. $('#EmpNo').lrselect({
  96. placeholder: "请选择老师",
  97. allowSearch: true,
  98. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetEmpNoData',
  99. value: 'value',
  100. text: 'text'
  101. });
  102. $('#ClassRoomNo').lrselect({
  103. placeholder: "请选择教室",
  104. allowSearch: true,
  105. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveClassRoomNoData',
  106. value: 'value',
  107. text: 'text'
  108. });
  109. },
  110. // 初始化列表
  111. initGird: function () {
  112. $('#gridtable').jfGrid({
  113. url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetPageListElective',
  114. headData: [
  115. { label: "校区", name: "F_School", width: 150, align: "left" },
  116. { label: "学年", name: "AcademicYearNo", width: 80, align: "left" },
  117. { label: "学期", name: "Semester", width: 80, align: "left" },
  118. { label: "课程编号", name: "LessonNo", width: 100, align: "left" },
  119. { label: "课程名称", name: "LessonName", width: 150, align: "left" },
  120. { label: "节次", name: "LessonSection", width: 100, align: "left" },
  121. { label: "教室编号", name: "ClassRoomNo", width: 100, align: "left" },
  122. { label: "教室", name: "ClassRoomName", width: 100, align: "left" },
  123. { label: "教师编号", name: "EmpNo", width: 100, align: "left" },
  124. { label: "教师名称", name: "EmpName", width: 150, align: "left" },
  125. { label: "平时成绩占比", name: "OrdinaryScoreScale", width: 100, align: "left" },
  126. { label: "期中成绩占比", name: "TermInScoreScale", width: 100, align: "left" },
  127. { label: "期末成绩占比", name: "TermEndScoreScale", width: 100, align: "left" },
  128. { label: "其他成绩占比", name: "OtherScoreScale", width: 100, align: "left" },
  129. {
  130. label: "是否允许编辑", name: "IsAllowEdit", width: 100, align: "left", formatter: function (cellvalue) {
  131. return (cellvalue === true || cellvalue === "true") ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
  132. }
  133. },
  134. ],
  135. mainId: 'Id',
  136. isPage: true,
  137. isMultiselect: true,
  138. sidx: 'AcademicYearNo,Semester',
  139. sord: 'desc'
  140. });
  141. page.search();
  142. },
  143. search: function (param) {
  144. param = param || {};
  145. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  146. }
  147. };
  148. refreshGirdData = function () {
  149. page.search();
  150. };
  151. page.init();
  152. }