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.
 
 
 
 
 
 

150 lines
6.6 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. }, 360, 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/OpenLessonPlan/Form',
  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/OpenLessonPlan/Form?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/OpenLessonPlan/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. //年级
  89. $('#Grade').lrselect({
  90. placeholder: "请选择年级",
  91. allowSearch: true,
  92. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData',
  93. value: 'value',
  94. text: 'text'
  95. });
  96. $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
  97. $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
  98. $('#LessonNo').lrselect({
  99. placeholder: "请选择课程",
  100. allowSearch: true,
  101. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo',
  102. value: 'value',
  103. text: 'text'
  104. });
  105. },
  106. // 初始化列表
  107. initGird: function () {
  108. $('#gridtable').lrAuthorizeJfGrid({
  109. url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetPageList',
  110. headData: [
  111. { label: "校区", name: "F_School", width: 150, align: "left" },
  112. { label: "学年", name: "AcademicYearNo", width: 80, align: "left" },
  113. { label: "学期", name: "Semester", width: 80, align: "left" },
  114. { label: "年级", name: "Grade", width: 80, align: "left" },
  115. { label: "系编号", name: "DeptNo", width: 100, align: "left" },
  116. { label: "系名称", name: "DeptName", width: 150, align: "left" },
  117. { label: "专业编号", name: "MajorNo", width: 100, align: "left" },
  118. { label: "专业名称", name: "MajorName", width: 150, align: "left" },
  119. { label: "课程编号", name: "LessonNo", width: 100, align: "left" },
  120. { label: "课程名称", name: "LessonName", width: 150, align: "left" },
  121. { label: "平时成绩占比", name: "OrdinaryScoreScale", width: 100, align: "left" },
  122. { label: "期中成绩占比", name: "TermInScoreScale", width: 100, align: "left" },
  123. { label: "期末成绩占比", name: "TermEndScoreScale", width: 100, align: "left" },
  124. { label: "其他成绩占比", name: "OtherScoreScale", width: 100, align: "left" },
  125. {
  126. label: "是否允许编辑", name: "IsAllowEdit", width: 100, align: "left", formatter: function (cellvalue) {
  127. return (cellvalue === true || cellvalue === "true") ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
  128. }
  129. },
  130. ],
  131. mainId: 'ID',
  132. isPage: true,
  133. isMultiselect: true,
  134. sidx: 'AcademicYearNo,Semester',
  135. sord: 'desc'
  136. });
  137. page.search();
  138. },
  139. search: function (param) {
  140. param = param || {};
  141. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  142. }
  143. };
  144. refreshGirdData = function () {
  145. page.search();
  146. };
  147. page.init();
  148. }