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.
 
 
 
 
 
 

193 lines
9.4 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_store').on('click', function () {
  60. var keyValue = $('#gridtable').jfGridValue('StuId');
  61. if (learun.checkrow(keyValue)) {
  62. var CheckMark = $('#gridtable').jfGridValue('FinishSchoolMark');
  63. console.log(CheckMark, "CheckMark")
  64. if (CheckMark.indexOf(' ') != -1) {
  65. learun.alert.warning("选中记录中包含待准许毕业项目,待准许毕业项目不能归档!");
  66. return;
  67. }
  68. learun.layerConfirm('1.毕业生归档必须在6-8月份进行; <br> 2.归档后的学生信息如:操行、奖惩、成绩、毕业证书等只有通过毕业生信息管理才能查询或打印;<br> 3.毕业学生的账户将自动取消;<br> 4.学生所占的床位也将自动退掉;<br> 5.学生所在的班级置为已毕业班级;<br> 6.归档操作后不可撤消,请谨慎操作!', function (res) {
  69. if (res) {
  70. learun.layerForm({
  71. id: 'FinishSchoolDateForm',
  72. title: '设置毕业时间',
  73. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/FinishSchoolDateForm',
  74. width: 400,
  75. height: 400,
  76. callBack: function (id) {
  77. return top[id].acceptClick(function () {
  78. learun.loading(true, "归档中...");
  79. //归档操作
  80. learun.httpAsync('post', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/StuStore', { keyValue: keyValue }, function () {
  81. learun.loading(false);
  82. refreshGirdData();
  83. });
  84. });
  85. }
  86. });
  87. }
  88. });
  89. }
  90. })
  91. },
  92. // 初始化列表
  93. initGird: function () {
  94. $('#gridtable').jfGrid({
  95. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  96. headData: [
  97. { label: "学号", name: "StuNo", width: 130, align: "left" },
  98. { label: "姓名", name: "StuName", width: 100, align: "left" },
  99. {
  100. label: "性别", name: "GenderNo", width: 50, align: "left",
  101. formatter: function (cellvalue) {
  102. return cellvalue == true ? "男" : "女";
  103. }
  104. },
  105. {
  106. label: "系所", name: "DeptNo", width: 100, align: "left",
  107. formatterAsync: function (callback, value, row, op, $cell) {
  108. learun.clientdata.getAsync('custmerData', {
  109. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  110. key: value,
  111. keyId: 'deptno',
  112. callback: function (_data) {
  113. callback(_data['deptname']);
  114. }
  115. });
  116. }
  117. },
  118. {
  119. label: "专业", name: "MajorNo", width: 100, align: "left",
  120. formatterAsync: function (callback, value, row, op, $cell) {
  121. learun.clientdata.getAsync('custmerData', {
  122. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  123. key: value,
  124. keyId: 'majorno',
  125. callback: function (_data) {
  126. callback(_data['majorname']);
  127. }
  128. });
  129. }
  130. },
  131. {
  132. label: "班级", name: "ClassNo", width: 100, align: "left",
  133. formatterAsync: function (callback, value, row, op, $cell) {
  134. learun.clientdata.getAsync('custmerData', {
  135. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'allbjqj',
  136. key: value,
  137. keyId: 'classno',
  138. callback: function (_data) {
  139. callback(_data['classname']);
  140. }
  141. });
  142. }
  143. },
  144. { label: "年级", name: "Grade", width: 50, align: "left" },
  145. {
  146. label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  147. learun.clientdata.getAsync('dataItem', {
  148. key: value,
  149. code: 'EduSystem',
  150. callback: function (_data) {
  151. callback(_data.text);
  152. }
  153. });
  154. }
  155. },
  156. { label: "毕业证书号", name: "DiplomaNo", width: 100, align: "left" },
  157. {
  158. label: '毕业状态', name: 'FinishSchoolMark', width: 100, align: "left", formatter: function (val) {
  159. if (val == '0') {
  160. return '待准许';
  161. } else if (val == "1") {
  162. return '准许毕业';
  163. } else if (val == '2') {
  164. return '已毕业';
  165. } else {
  166. return '待准许';
  167. }
  168. }
  169. },
  170. { label: "毕业时间", name: "FinishSchoolDate", width: 130, align: "left" },
  171. ],
  172. mainId: 'StuId',
  173. isPage: true,
  174. isMultiselect: true,
  175. rows: 100,
  176. sidx: "Grade desc,DeptNo desc,MajorNo desc,ClassNo desc",
  177. sord: 'desc'
  178. });
  179. page.search();
  180. },
  181. search: function (param) {
  182. param = param || {};
  183. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  184. }
  185. };
  186. refreshGirdData = function () {
  187. page.search();
  188. };
  189. page.init();
  190. }