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.
 
 
 
 
 
 

118 lines
5.9 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-08-28 11:54
  5. * 描 述:合班历史记录
  6. */
  7. var selectedRow;
  8. var refreshGirdData;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. page.initGird();
  14. page.bind();
  15. },
  16. bind: function () {
  17. // 查询
  18. $('#btn_Search').on('click', function () {
  19. var keyword = $('#txt_Keyword').val();
  20. page.search({ keyword: keyword });
  21. });
  22. // 刷新
  23. $('#lr_refresh').on('click', function () {
  24. location.reload();
  25. });
  26. // 新增
  27. $('#lr_add').on('click', function () {
  28. selectedRow = null;
  29. learun.layerForm({
  30. id: 'form',
  31. title: '新增',
  32. url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElectiveDel/Form',
  33. width: 700,
  34. height: 400,
  35. callBack: function (id) {
  36. return top[id].acceptClick(refreshGirdData);
  37. }
  38. });
  39. });
  40. // 编辑
  41. $('#lr_edit').on('click', function () {
  42. var keyValue = $('#gridtable').jfGridValue('Id');
  43. selectedRow = $('#gridtable').jfGridGet('rowdata');
  44. if (learun.checkrow(keyValue)) {
  45. learun.layerForm({
  46. id: 'form',
  47. title: '编辑',
  48. url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElectiveDel/Form?keyValue=' + keyValue,
  49. width: 700,
  50. height: 400,
  51. callBack: function (id) {
  52. return top[id].acceptClick(refreshGirdData);
  53. }
  54. });
  55. }
  56. });
  57. // 删除
  58. $('#lr_delete').on('click', function () {
  59. var keyValue = $('#gridtable').jfGridValue('Id');
  60. if (learun.checkrow(keyValue)) {
  61. learun.layerConfirm('是否确认删除该项!', function (res) {
  62. if (res) {
  63. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElectiveDel/DeleteForm', { keyValue: keyValue}, function () {
  64. });
  65. }
  66. });
  67. }
  68. });
  69. },
  70. initGird: function () {
  71. $('#gridtable').lrAuthorizeJfGrid({
  72. url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElectiveDel/GetPageList',
  73. headData: [
  74. { label: 'Id', name: 'Id', width: 200, align: "left" },
  75. { label: 'MakeDate', name: 'MakeDate', width: 200, align: "left" },
  76. { label: 'AcademicYearNo', name: 'AcademicYearNo', width: 200, align: "left" },
  77. { label: 'Semester', name: 'Semester', width: 200, align: "left" },
  78. { label: 'LessonNo', name: 'LessonNo', width: 200, align: "left" },
  79. { label: 'PartCode', name: 'PartCode', width: 200, align: "left" },
  80. { label: 'LessonName', name: 'LessonName', width: 200, align: "left" },
  81. { label: 'LessonSortNo', name: 'LessonSortNo', width: 200, align: "left" },
  82. { label: 'LessonSortDetailNo', name: 'LessonSortDetailNo', width: 200, align: "left" },
  83. { label: 'LessonSection', name: 'LessonSection', width: 200, align: "left" },
  84. { label: 'LessonTime', name: 'LessonTime', width: 200, align: "left" },
  85. { label: 'StudyScore', name: 'StudyScore', width: 200, align: "left" },
  86. { label: 'StartWeek', name: 'StartWeek', width: 200, align: "left" },
  87. { label: 'EndWeek', name: 'EndWeek', width: 200, align: "left" },
  88. { label: 'StartDate', name: 'StartDate', width: 200, align: "left" },
  89. { label: 'EndDate', name: 'EndDate', width: 200, align: "left" },
  90. { label: 'CheckStyleNo', name: 'CheckStyleNo', width: 200, align: "left" },
  91. { label: 'ScoreRecordStyleNo', name: 'ScoreRecordStyleNo', width: 200, align: "left" },
  92. { label: 'EmpNo', name: 'EmpNo', width: 200, align: "left" },
  93. { label: 'EmpName', name: 'EmpName', width: 200, align: "left" },
  94. { label: 'ClassRoomNo', name: 'ClassRoomNo', width: 200, align: "left" },
  95. { label: 'ClassRoomName', name: 'ClassRoomName', width: 200, align: "left" },
  96. { label: 'CheckMark', name: 'CheckMark', width: 200, align: "left" },
  97. { label: 'StuNumMax', name: 'StuNumMax', width: 200, align: "left" },
  98. { label: 'StuNum', name: 'StuNum', width: 200, align: "left" },
  99. { label: 'ModifyTime', name: 'ModifyTime', width: 200, align: "left" },
  100. { label: 'ModifyUserId', name: 'ModifyUserId', width: 200, align: "left" },
  101. { label: 'ModifyUserName', name: 'ModifyUserName', width: 200, align: "left" },
  102. ],
  103. mainId:'Id',
  104. isPage: true
  105. });
  106. page.search();
  107. },
  108. search: function (param) {
  109. param = param || {};
  110. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  111. }
  112. };
  113. refreshGirdData = function () {
  114. page.search();
  115. };
  116. page.init();
  117. }