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.
 
 
 
 
 
 

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