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.
 
 
 
 
 
 

137 lines
6.0 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-08-29 16:50
  5. * 描 述:选课专业
  6. */
  7. var refreshGirdData;
  8. var OLPOEId = request("OLPOEId");
  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. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  18. page.search(queryJson);
  19. }, 220, 400);
  20. $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
  21. $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
  22. $('#Grade').lrselect({
  23. url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
  24. value: 'value',
  25. text: 'text',
  26. });
  27. // 刷新
  28. $('#lr_refresh').on('click', function () {
  29. location.reload();
  30. });
  31. // 添加专业
  32. $('#lr_add').on('click', function () {
  33. learun.layerForm({
  34. id: 'formadd',
  35. title: '添加专业',
  36. url: top.$.rootUrl + '/EducationalAdministration/CdMajor/IndexOfElective?OLPOEId=' + OLPOEId,
  37. width: 1000,
  38. height: 700,
  39. callBack: function (id) {
  40. return top[id].acceptClick(refreshGirdData);
  41. }
  42. });
  43. });
  44. // 删除
  45. $('#lr_delete').on('click', function () {
  46. var keyValue = $('#gridtablemanagemajor').jfGridValue('ElectiveMajorId');
  47. if (learun.checkrow(keyValue)) {
  48. learun.layerConfirm('是否确认删除该项!', function (res) {
  49. if (res) {
  50. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ElectiveMajor/DeleteForm', { keyValue: keyValue }, function () {
  51. refreshGirdData();
  52. });
  53. }
  54. });
  55. }
  56. });
  57. },
  58. // 初始化列表
  59. initGird: function () {
  60. $('#gridtablemanagemajor').lrAuthorizeJfGridLei({
  61. url: top.$.rootUrl + '/EducationalAdministration/ElectiveMajor/GetPageList',
  62. headData: [
  63. { label: "专业名称", name: "MajorName", width: 150, align: "left" },
  64. { label: "专业编号", name: "MajorNo", width: 80, align: "left" },
  65. { label: "年级", name: "Grade", width: 80, align: "left" },
  66. { label: "学制", name: "LengthOfSchooling", width: 60, align: "left" },
  67. {
  68. label: "学科门类", name: "SubjectSpeciesNo", width: 100, align: "left",
  69. formatterAsync: function (callback, value, row, op, $cell) {
  70. learun.clientdata.getAsync('dataItem', {
  71. key: value,
  72. code: 'SubjectSpecies',
  73. callback: function (_data) {
  74. callback(_data.text);
  75. }
  76. });
  77. }
  78. },
  79. {
  80. label: "校区", name: "F_SchoolId", width: 200, align: "left",
  81. formatterAsync: function (callback, value, row, op, $cell) {
  82. learun.clientdata.getAsync('custmerData', {
  83. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
  84. key: value,
  85. keyId: 'f_companyid',
  86. callback: function (_data) {
  87. callback(_data['f_fullname']);
  88. }
  89. });
  90. }
  91. },
  92. {
  93. label: "系别", name: "DeptNo", width: 100, align: "left",
  94. formatterAsync: function (callback, value, row, op, $cell) {
  95. learun.clientdata.getAsync('custmerData', {
  96. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  97. key: value,
  98. keyId: 'deptno',
  99. callback: function (_data) {
  100. callback(_data['deptname']);
  101. }
  102. });
  103. }
  104. },
  105. {
  106. label: "本专科", name: "GraduateNo", width: 100, align: "left",
  107. formatterAsync: function (callback, value, row, op, $cell) {
  108. learun.clientdata.getAsync('dataItem', {
  109. key: value,
  110. code: 'CollegeType',
  111. callback: function (_data) {
  112. callback(_data.text);
  113. }
  114. });
  115. }
  116. }
  117. ],
  118. mainId: 'ElectiveMajorId',
  119. isMultiselect: true,
  120. isPage: true,
  121. sidx: 'MajorNo',
  122. sord: 'ASC'
  123. });
  124. page.search();
  125. },
  126. search: function (param) {
  127. param = param || {};
  128. param.OLPOEId = OLPOEId;
  129. $('#gridtablemanagemajor').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  130. }
  131. };
  132. refreshGirdData = function () {
  133. page.search();
  134. };
  135. page.init();
  136. }