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.
 
 
 
 
 
 

172 lines
8.3 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-03-26 11:35
  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. }, 220, 400);
  19. $('#CancelLeaveType').lrDataItemSelect({ code: 'LeaveType' });
  20. $('#CheckStatus').lrDataItemSelect({ code: 'LeaveCheck' });
  21. // 刷新
  22. $('#lr_refresh').on('click', function () {
  23. location.reload();
  24. });
  25. // 审核
  26. $('#lr_check').on('click', function () {
  27. var keyValue = $('#gridtable').jfGridValue('Id');
  28. if (learun.checkrow(keyValue)) {
  29. learun.layerForm({
  30. id: 'checkform',
  31. title: '审核',
  32. url: top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/CheckForm?keyValue=' + keyValue,
  33. width: 800,
  34. height: 600,
  35. callBack: function (id) {
  36. return top[id].acceptClick(refreshGirdData);
  37. }
  38. });
  39. }
  40. });
  41. },
  42. // 初始化列表
  43. initGird: function () {
  44. $('#gridtable').lrAuthorizeJfGrid({
  45. url: top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/GetPageList',
  46. headData: [
  47. {
  48. label: "审核状态", name: "CheckStatus", width: 100, align: "left",
  49. formatterAsync: function (callback, value, row, op, $cell) {
  50. learun.clientdata.getAsync('dataItem', {
  51. key: value,
  52. code: 'LeaveCheck',
  53. callback: function (_data) {
  54. callback(_data.text ? _data.text : "申请中");
  55. }
  56. });
  57. }
  58. },
  59. { label: "审核备注", name: "CheckRemark", width: 100, align: "left" },
  60. { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
  61. {
  62. label: "审核人", name: "CheckUserNo", width: 100, align: "left",
  63. formatterAsync: function (callback, value, row, op, $cell) {
  64. learun.clientdata.getAsync('custmerData', {
  65. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
  66. key: value,
  67. keyId: 'empno',
  68. callback: function (_data) {
  69. callback(_data['empname']);
  70. }
  71. });
  72. }
  73. },
  74. { label: "销假类型", name: "CancelLeaveType", width: 100, align: "left",
  75. formatterAsync: function (callback, value, row, op,$cell) {
  76. learun.clientdata.getAsync('dataItem', {
  77. key: value,
  78. code: 'LeaveType',
  79. callback: function (_data) {
  80. callback(_data.text);
  81. }
  82. });
  83. }},
  84. { label: "到校时间", name: "WorkTime", width: 120, align: "left"},
  85. { label: "销假事由", name: "CancelLeaveReason", width: 100, align: "left" },
  86. { label: "学号", name: "CreateUserNo", width: 100, align: "left" },
  87. { label: "姓名", name: "CreateUserName", width: 100, align: "left" },
  88. { label: "申请时间", name: "CreateTime", width: 130, align: "left" },
  89. {
  90. label: "班级", name: "ClassNo", width: 100, align: "left",
  91. formatterAsync: function (callback, value, row, op, $cell) {
  92. learun.clientdata.getAsync('custmerData', {
  93. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  94. key: value,
  95. keyId: 'classno',
  96. callback: function (_data) {
  97. callback(_data['classname']);
  98. }
  99. });
  100. }
  101. },
  102. {
  103. label: "系部", name: "DeptNo", width: 100, align: "left",
  104. formatterAsync: function (callback, value, row, op, $cell) {
  105. learun.clientdata.getAsync('custmerData', {
  106. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  107. key: value,
  108. keyId: 'deptno',
  109. callback: function (_data) {
  110. callback(_data['deptname']);
  111. }
  112. });
  113. }
  114. },
  115. {
  116. label: "专业", name: "MajorNo", width: 100, align: "left",
  117. formatterAsync: function (callback, value, row, op, $cell) {
  118. learun.clientdata.getAsync('custmerData', {
  119. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  120. key: value,
  121. keyId: 'majorno',
  122. callback: function (_data) {
  123. callback(_data['majorname']);
  124. }
  125. });
  126. }
  127. },
  128. {
  129. label: "班主任", name: "ClassDiredctorNo", width: 100, align: "left",
  130. formatterAsync: function (callback, value, row, op, $cell) {
  131. learun.clientdata.getAsync('custmerData', {
  132. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
  133. key: value,
  134. keyId: 'empno',
  135. callback: function (_data) {
  136. callback(_data['empname']);
  137. }
  138. });
  139. }
  140. },
  141. {
  142. label: "辅导员", name: "ClassTutorNo", width: 100, align: "left",
  143. formatterAsync: function (callback, value, row, op, $cell) {
  144. learun.clientdata.getAsync('custmerData', {
  145. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
  146. key: value,
  147. keyId: 'empno',
  148. callback: function (_data) {
  149. callback(_data['empname']);
  150. }
  151. });
  152. }
  153. },
  154. ],
  155. mainId:'Id',
  156. isPage: true,
  157. sord: 'CreateTime desc'
  158. });
  159. page.search();
  160. },
  161. search: function (param) {
  162. param = param || {};
  163. param.ClassManagerNo = learun.clientdata.get(['userinfo']).account;
  164. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  165. }
  166. };
  167. refreshGirdData = function () {
  168. $('#gridtable').jfGridSet('reload');
  169. };
  170. page.init();
  171. }