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.
 
 
 
 
 
 

162 lines
7.1 KiB

  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_create').on('click', function () {
  51. learun.layerForm({
  52. id: 'form',
  53. title: '生成毕业证',
  54. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/CreateGraduateNoForm',
  55. width: 800,
  56. height: 600,
  57. callBack: function (id) {
  58. return top[id].acceptClick(refreshGirdData);
  59. }
  60. });
  61. })
  62. },
  63. // 初始化列表
  64. initGird: function () {
  65. $('#gridtable').jfGrid({
  66. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  67. headData: [
  68. { label: "学号", name: "StuNo", width: 100, align: "left" },
  69. { label: "姓名", name: "StuName", width: 100, align: "left" },
  70. {
  71. label: "性别", name: "GenderNo", width: 80, align: "left",
  72. formatter: function (cellvalue) {
  73. return cellvalue == true ? "男" : "女";
  74. }
  75. },
  76. {
  77. label: "系所", name: "DeptNo", width: 100, align: "left",
  78. formatterAsync: function (callback, value, row, op, $cell) {
  79. learun.clientdata.getAsync('custmerData', {
  80. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  81. key: value,
  82. keyId: 'deptno',
  83. callback: function (_data) {
  84. callback(_data['deptname']);
  85. }
  86. });
  87. }
  88. },
  89. {
  90. label: "专业", name: "MajorNo", width: 100, align: "left",
  91. formatterAsync: function (callback, value, row, op, $cell) {
  92. learun.clientdata.getAsync('custmerData', {
  93. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  94. key: value,
  95. keyId: 'majorno',
  96. callback: function (_data) {
  97. callback(_data['majorname']);
  98. }
  99. });
  100. }
  101. },
  102. {
  103. label: "班级", name: "ClassNo", width: 100, align: "left",
  104. formatterAsync: function (callback, value, row, op, $cell) {
  105. learun.clientdata.getAsync('custmerData', {
  106. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  107. key: value,
  108. keyId: 'classno',
  109. callback: function (_data) {
  110. callback(_data['classname']);
  111. }
  112. });
  113. }
  114. },
  115. { label: "年级", name: "Grade", width: 100, align: "left" },
  116. {
  117. label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  118. learun.clientdata.getAsync('dataItem', {
  119. key: value,
  120. code: 'EduSystem',
  121. callback: function (_data) {
  122. callback(_data.text);
  123. }
  124. });
  125. }
  126. },
  127. {
  128. label: '毕业状态', name: 'FinishSchoolMark', width: 100, align: "left", formatter: function (val) {
  129. if (val == '0') {
  130. return '待准许';
  131. } else if (val == "1") {
  132. return '准许毕业';
  133. } else if (val == '2') {
  134. return '已毕业';
  135. } else {
  136. return '待准许';
  137. }
  138. }
  139. },
  140. { label: "毕业证", name: "DiplomaNo", width: 100, align: "left" },
  141. { label: "毕业时间", name: "FinishSchoolDate", width: 100, align: "left" },
  142. ],
  143. mainId: 'StuId',
  144. isPage: true,
  145. isMultiselect: true,
  146. });
  147. page.search();
  148. },
  149. search: function (param) {
  150. param = param || {};
  151. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  152. }
  153. };
  154. refreshGirdData = function () {
  155. page.search();
  156. };
  157. page.init();
  158. }