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.
 
 
 
 
 
 

174 lines
8.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: "2" }, { 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. //生成毕业证【按专业进行排序】
  51. //$('#lr_create').on('click', function () {
  52. // learun.layerForm({
  53. // id: 'form',
  54. // title: '生成毕业证',
  55. // url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/CreateGraduateNoForm',
  56. // width: 800,
  57. // height: 600,
  58. // callBack: function (id) {
  59. // return top[id].acceptClick(refreshGirdData);
  60. // }
  61. // });
  62. //})
  63. //生成毕业证【按学号排序】
  64. $('#lr_create').on('click', function () {
  65. learun.layerConfirm('1.毕业证号的生成规则:年份两位(22)+学校编码十位(3642000004)+顺序号四位(0001)组成; <br> 2.此次操作仅对毕业状态为“准许毕业”和“已毕业”的学生进行操作; <br> 3.生成毕业证号后不可撤消,请谨慎操作!<br>', function (res) {
  66. if (res) {
  67. learun.httpAsync('post', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/DoCreateGraduateNo', {}, function () {
  68. refreshGirdData();
  69. });
  70. }
  71. });
  72. })
  73. },
  74. // 初始化列表
  75. initGird: function () {
  76. $('#gridtable').jfGrid({
  77. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  78. headData: [
  79. { label: "学号", name: "StuNo", width: 150, align: "left" },
  80. { label: "姓名", name: "StuName", width: 100, align: "left" },
  81. { label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" },
  82. {
  83. label: "性别", name: "GenderNo", width: 80, align: "left",
  84. formatter: function (cellvalue) {
  85. return cellvalue == true ? "男" : "女";
  86. }
  87. },
  88. {
  89. label: "系所", name: "DeptNo", width: 100, align: "left",
  90. formatterAsync: function (callback, value, row, op, $cell) {
  91. learun.clientdata.getAsync('custmerData', {
  92. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  93. key: value,
  94. keyId: 'deptno',
  95. callback: function (_data) {
  96. callback(_data['deptname']);
  97. }
  98. });
  99. }
  100. },
  101. {
  102. label: "专业", name: "MajorNo", width: 100, align: "left",
  103. formatterAsync: function (callback, value, row, op, $cell) {
  104. learun.clientdata.getAsync('custmerData', {
  105. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  106. key: value,
  107. keyId: 'majorno',
  108. callback: function (_data) {
  109. callback(_data['majorname']);
  110. }
  111. });
  112. }
  113. },
  114. {
  115. label: "班级", name: "ClassNo", width: 100, align: "left",
  116. formatterAsync: function (callback, value, row, op, $cell) {
  117. learun.clientdata.getAsync('custmerData', {
  118. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  119. key: value,
  120. keyId: 'classno',
  121. callback: function (_data) {
  122. callback(_data['classname']);
  123. }
  124. });
  125. }
  126. },
  127. { label: "年级", name: "Grade", width: 100, align: "left" },
  128. {
  129. label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  130. learun.clientdata.getAsync('dataItem', {
  131. key: value,
  132. code: 'EduSystem',
  133. callback: function (_data) {
  134. callback(_data.text);
  135. }
  136. });
  137. }
  138. },
  139. {
  140. label: '毕业状态', name: 'FinishSchoolMark', width: 100, align: "left", formatter: function (val) {
  141. if (val == '0') {
  142. return '待准许';
  143. } else if (val == "1") {
  144. return '准许毕业';
  145. } else if (val == '2') {
  146. return '已毕业';
  147. } else {
  148. return '待准许';
  149. }
  150. }
  151. },
  152. { label: "毕业时间", name: "FinishSchoolDate", width: 100, align: "left" },
  153. { label: "毕业证号", name: "DiplomaNo", width: 100, align: "left" },
  154. ],
  155. mainId: 'StuId',
  156. isPage: true,
  157. isMultiselect: false,
  158. });
  159. page.search();
  160. },
  161. search: function (param) {
  162. param = param || {};
  163. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  164. }
  165. };
  166. refreshGirdData = function () {
  167. page.search();
  168. };
  169. page.init();
  170. }