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.

CheckIndex.js 8.8 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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. if (value) {
  145. var result = "";
  146. $.each(value.split(","), function (index, item) {
  147. learun.clientdata.getAsync('custmerData', {
  148. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
  149. key: item,
  150. keyId: 'empno',
  151. callback: function (_data) {
  152. result += _data['empname'];
  153. }
  154. });
  155. if (index < value.split(",").length - 1) {
  156. result += ",";
  157. }
  158. });
  159. callback(result);
  160. }
  161. }
  162. },
  163. ],
  164. mainId:'Id',
  165. isPage: true,
  166. sord: 'CreateTime desc'
  167. });
  168. page.search();
  169. },
  170. search: function (param) {
  171. param = param || {};
  172. param.ClassManagerNo = learun.clientdata.get(['userinfo']).account;
  173. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  174. }
  175. };
  176. refreshGirdData = function () {
  177. $('#gridtable').jfGridSet('reload');
  178. };
  179. page.init();
  180. }