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.

Graduate.js 8.0 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. var refreshGirdData;
  2. var bootstrap = function ($, learun) {
  3. "use strict";
  4. var page = {
  5. init: function () {
  6. page.initGird();
  7. page.bind();
  8. },
  9. bind: function () {
  10. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  11. page.search(queryJson);
  12. }, 290, 400);
  13. $('#DeptNo').lrDataSourceSelect({
  14. code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (val) {
  15. var deptno = "";
  16. if (val) {
  17. deptno = val.deptno;
  18. }
  19. $('#MajorNo').lrselectRefresh({
  20. url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetListByDeptNo?DeptNo=' + deptno,
  21. text: "MajorName",
  22. value: "MajorNo"
  23. })
  24. }
  25. });
  26. $('#MajorNo').lrDataSourceSelect({
  27. code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select:
  28. function (val) {
  29. var majorNo = '';
  30. if (val) {
  31. majorNo = val.MajorNo;
  32. }
  33. $('#ClassNo').lrselectRefresh({
  34. url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GetClassByMajorNo?majorNo=' + majorNo,
  35. text: "ClassName",
  36. value: "ClassNo"
  37. })
  38. }
  39. });
  40. $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
  41. $('#FinishSchoolMark').lrselect({
  42. data: [{ text: "准许毕业", value: "1" }, { text: "待准许", value: "0" }],
  43. text: "text",
  44. value: "value"
  45. })
  46. // 刷新
  47. $('#lr_refresh').on('click', function () {
  48. location.reload();
  49. });
  50. $('#lr_getcard').on('click', function () {
  51. var keyValue = $('#gridtable').jfGridValue('StuId');
  52. if (learun.checkrow(keyValue)) {
  53. learun.layerConfirm('是否确认领取毕业证!', function (res) {
  54. if (res) {
  55. learun.httpAsync('post', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetCard', { keyValue: keyValue }, function () {
  56. refreshGirdData();
  57. });
  58. }
  59. });
  60. }
  61. })
  62. $('#lr_store').on('click', function () {
  63. learun.layerConfirm('1.毕业生归档必须在6-8月份进行; <br> 2.归档后的学生信息如:操行、奖惩、成绩、毕业证书等只有通过毕业生信息管理才能查询或打印;<br> 3.毕业学生的账户将自动取消;<br> 4.学生所占的床位也将自动退掉;<br> 5.学生所在的班级置为已毕业班级;<br> 6.归档操作后不可撤消,请谨慎操作!', function (res) {
  64. if (res) {
  65. learun.httpAsync('post', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/StuStore', { keyValue: keyValue }, function () {
  66. refreshGirdData();
  67. });
  68. }
  69. });
  70. })
  71. },
  72. // 初始化列表
  73. initGird: function () {
  74. $('#gridtable').jfGrid({
  75. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  76. headData: [
  77. { label: "学号", name: "StuNo", width: 100, align: "left" },
  78. { label: "姓名", name: "StuName", width: 100, align: "left" },
  79. {
  80. label: "性别", name: "GenderNo", width: 80, align: "left",
  81. formatter: function (cellvalue) {
  82. return cellvalue == true ? "男" : "女";
  83. }
  84. },
  85. {
  86. label: "系所", name: "DeptNo", width: 100, align: "left",
  87. formatterAsync: function (callback, value, row, op, $cell) {
  88. learun.clientdata.getAsync('custmerData', {
  89. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  90. key: value,
  91. keyId: 'deptno',
  92. callback: function (_data) {
  93. callback(_data['deptname']);
  94. }
  95. });
  96. }
  97. },
  98. {
  99. label: "专业", name: "MajorNo", width: 100, align: "left",
  100. formatterAsync: function (callback, value, row, op, $cell) {
  101. learun.clientdata.getAsync('custmerData', {
  102. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  103. key: value,
  104. keyId: 'majorno',
  105. callback: function (_data) {
  106. callback(_data['majorname']);
  107. }
  108. });
  109. }
  110. },
  111. {
  112. label: "班级", name: "ClassNo", width: 100, align: "left",
  113. formatterAsync: function (callback, value, row, op, $cell) {
  114. learun.clientdata.getAsync('custmerData', {
  115. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  116. key: value,
  117. keyId: 'classno',
  118. callback: function (_data) {
  119. callback(_data['classname']);
  120. }
  121. });
  122. }
  123. },
  124. { label: "年级", name: "Grade", width: 100, align: "left" },
  125. {
  126. label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  127. learun.clientdata.getAsync('dataItem', {
  128. key: value,
  129. code: 'EduSystem',
  130. callback: function (_data) {
  131. callback(_data.text);
  132. }
  133. });
  134. }
  135. },
  136. {
  137. label: '毕业状态', name: 'FinishSchoolMark', width: 100, align: "left", formatter: function (val) {
  138. if (val == '0') {
  139. return '待准许';
  140. } else if (val == "1") {
  141. return '准许毕业';
  142. } else if (val == '2') {
  143. return '已毕业';
  144. } else {
  145. return '待准许';
  146. }
  147. }
  148. },
  149. { label: "毕业证", name: "DiplomaNo", width: 100, align: "left" },
  150. { label: "毕业时间", name: "FinishSchoolDate", width: 100, align: "left" },
  151. ],
  152. mainId: 'StuId',
  153. isPage: true,
  154. isMultiselect: true,
  155. });
  156. page.search();
  157. },
  158. search: function (param) {
  159. param = param || {};
  160. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  161. }
  162. };
  163. refreshGirdData = function () {
  164. page.search();
  165. };
  166. page.init();
  167. }