25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

159 satır
7.2 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 processId = '';
  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. $('#DeptNo').lrselect({
  21. allowSearch: true,
  22. value: "deptno",
  23. text: "deptname",
  24. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  25. select: function (item) {
  26. if (item) {
  27. $('#MajorNo').lrselectRefresh({
  28. allowSearch: true,
  29. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  30. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  31. });
  32. } else {
  33. $('#MajorNo').lrselectRefresh({
  34. allowSearch: true,
  35. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  36. param: { strWhere: "1=1 AND CheckMark=1" }
  37. });
  38. }
  39. }
  40. });
  41. $('#MajorNo').lrselect({
  42. allowSearch: true,
  43. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  44. value: "majorno",
  45. text: "majorname",
  46. param: { strWhere: "1=1 AND CheckMark=1" },
  47. select: function (item) {
  48. if (item) {
  49. $('#ClassNo').lrselectRefresh({
  50. allowSearch: true,
  51. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  52. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 order by classno desc" }
  53. });
  54. } else {
  55. $('#ClassNo').lrselectRefresh({
  56. allowSearch: true,
  57. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  58. param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
  59. });
  60. }
  61. }
  62. });
  63. $('#ClassNo').lrselect({
  64. allowSearch: true,
  65. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  66. param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" },
  67. value: "classno",
  68. text: "classname"
  69. });
  70. $('#LeaveType').lrDataItemSelect({ code: 'LeaveType' });
  71. // 刷新
  72. $('#lr_refresh').on('click', function () {
  73. location.reload();
  74. });
  75. },
  76. // 初始化列表
  77. initGird: function () {
  78. $('#gridtable').jfGrid({
  79. url: top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/GetList',
  80. headData: [
  81. {
  82. label: "校内/外出假", name: "IsCampus", width: 100, align: "left",
  83. formatter: function (cellvalue) {
  84. return cellvalue == 1 ? "外出假" : "校内假";
  85. }
  86. },
  87. {
  88. label: "过夜", name: "IsStay", width: 100, align: "left",
  89. formatter: function (cellvalue) {
  90. return cellvalue == 1 ? "是" : "否";
  91. }
  92. },
  93. { label: "请假天数", name: "LeaveDay", width: 100, align: "left" },
  94. {
  95. label: "系所", name: "DeptNo", width: 200, align: "left",
  96. formatterAsync: function (callback, value, row, op, $cell) {
  97. learun.clientdata.getAsync('custmerData', {
  98. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  99. key: value,
  100. keyId: 'deptno',
  101. callback: function (_data) {
  102. callback(_data['deptname']);
  103. }
  104. });
  105. }
  106. },
  107. {
  108. label: "专业", name: "MajorNo", width: 200, align: "left",
  109. formatterAsync: function (callback, value, row, op, $cell) {
  110. learun.clientdata.getAsync('custmerData', {
  111. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  112. key: value,
  113. keyId: 'majorno',
  114. callback: function (_data) {
  115. callback(_data['majorname']);
  116. }
  117. });
  118. }
  119. },
  120. {
  121. label: "班级", name: "ClassNo", width: 200, align: "left",
  122. formatterAsync: function (callback, value, row, op, $cell) {
  123. learun.clientdata.getAsync('custmerData', {
  124. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  125. key: value,
  126. keyId: 'classno',
  127. callback: function (_data) {
  128. callback(_data['classname']);
  129. }
  130. });
  131. }
  132. },
  133. {
  134. label: "请假类型", name: "LeaveType", width: 100, align: "left",
  135. formatterAsync: function (callback, value, row, op, $cell) {
  136. learun.clientdata.getAsync('dataItem', {
  137. key: value,
  138. code: 'LeaveType',
  139. callback: function (_data) {
  140. callback(_data.text);
  141. }
  142. });
  143. }
  144. },
  145. { label: "人数", name: "Sum", width: 100, align: "left" },
  146. ],
  147. isPage: false,
  148. });
  149. page.search();
  150. },
  151. search: function (param) {
  152. param = param || {};
  153. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  154. }
  155. };
  156. page.init();
  157. }