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.
 
 
 
 
 
 

136 lines
5.8 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. $('#MajorNo').lrDataSourceSelect({
  14. code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select:
  15. function (val) {
  16. var majorNo = '';
  17. if (val) {
  18. majorNo = val.majorno;
  19. }
  20. $('#ClassNo').lrselectRefresh({
  21. url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GetClassByMajorNo?majorNo=' + majorNo,
  22. text: "ClassName",
  23. value: "ClassNo"
  24. })
  25. }
  26. });
  27. $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
  28. $('#FinishSchoolMark').lrselect({
  29. data: [{ text: "准许毕业", value: "1" }, { text: "待准许", value: "0" }],
  30. text: "text",
  31. value: "value"
  32. })
  33. // 刷新
  34. $('#lr_refresh').on('click', function () {
  35. location.reload();
  36. });
  37. $('#lr_create').on('click', function () {
  38. learun.layerForm({
  39. id: 'form',
  40. title: '生成毕业证',
  41. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/CreateGraduateNoForm',
  42. width: 800,
  43. height: 600,
  44. callBack: function (id) {
  45. return top[id].acceptClick(refreshGirdData);
  46. }
  47. });
  48. })
  49. },
  50. // 初始化列表
  51. initGird: function () {
  52. $('#gridtable').jfGrid({
  53. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  54. headData: [
  55. { label: "学号", name: "StuNo", width: 100, align: "left" },
  56. { label: "姓名", name: "StuName", width: 100, align: "left" },
  57. {
  58. label: "性别", name: "GenderNo", width: 80, align: "left",
  59. formatter: function (cellvalue) {
  60. return cellvalue == true ? "男" : "女";
  61. }
  62. },
  63. {
  64. label: "专业", name: "MajorNo", width: 100, align: "left",
  65. formatterAsync: function (callback, value, row, op, $cell) {
  66. learun.clientdata.getAsync('custmerData', {
  67. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  68. key: value,
  69. keyId: 'majorno',
  70. callback: function (_data) {
  71. callback(_data['majorname']);
  72. }
  73. });
  74. }
  75. },
  76. {
  77. label: "班级", name: "ClassNo", width: 100, align: "left",
  78. formatterAsync: function (callback, value, row, op, $cell) {
  79. learun.clientdata.getAsync('custmerData', {
  80. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  81. key: value,
  82. keyId: 'classno',
  83. callback: function (_data) {
  84. callback(_data['classname']);
  85. }
  86. });
  87. }
  88. },
  89. { label: "年级", name: "Grade", width: 100, align: "left" },
  90. {
  91. label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  92. learun.clientdata.getAsync('dataItem', {
  93. key: value,
  94. code: 'EduSystem',
  95. callback: function (_data) {
  96. callback(_data.text);
  97. }
  98. });
  99. }
  100. },
  101. {
  102. label: '毕业状态', name: 'FinishSchoolMark', width: 100, align: "left", formatter: function (val) {
  103. if (val == '0') {
  104. return '待准许';
  105. } else if (val == "1") {
  106. return '准许毕业';
  107. } else if (val == '2') {
  108. return '已毕业';
  109. } else {
  110. return '待准许';
  111. }
  112. }
  113. },
  114. { label: "毕业证", name: "DiplomaNo", width: 100, align: "left" },
  115. { label: "毕业时间", name: "FinishSchoolDate", width: 100, align: "left" },
  116. ],
  117. mainId: 'StuId',
  118. isPage: true,
  119. isMultiselect: true,
  120. });
  121. page.search();
  122. },
  123. search: function (param) {
  124. param = param || {};
  125. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  126. }
  127. };
  128. refreshGirdData = function () {
  129. page.search();
  130. };
  131. page.init();
  132. }