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.
 
 
 
 
 
 

261 regels
11 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-07-17 11:20
  5. * 描 述:新生录取管理
  6. */
  7. var refreshGirdData;
  8. var NowGrade;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. var data_grade = learun.httpGet(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByMaxClass',
  14. {});
  15. NowGrade = data_grade.info;
  16. page.initGird();
  17. page.bind();
  18. //page.refreshMoney();
  19. },
  20. bind: function () {
  21. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  22. page.search(queryJson);
  23. //page.refreshMoney();
  24. }, 380, 400);
  25. $("#IsSubsidize1").lrDataItemSelect({ code: "jyYewOrNot" });
  26. $('#Grade').lrselect({
  27. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
  28. value: "year",
  29. text: "year",
  30. });
  31. $('#Grade').lrselectSet(NowGrade);
  32. $('#DeptNo').lrselect({
  33. allowSearch: true,
  34. value: "deptno",
  35. text: "deptname",
  36. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  37. select: function (item) {
  38. if (item) {
  39. $('#MajorNo').lrselectRefresh({
  40. allowSearch: true,
  41. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  42. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  43. });
  44. } else {
  45. $('#MajorNo').lrselectRefresh({
  46. allowSearch: true,
  47. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  48. param: { strWhere: "1=1 AND CheckMark=1" }
  49. });
  50. }
  51. }
  52. });
  53. $('#MajorNo').lrselect({
  54. allowSearch: true,
  55. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  56. value: "majorno",
  57. text: "majorname",
  58. param: { strWhere: "1=1 AND CheckMark=1" },
  59. select: function (item) {
  60. if (item) {
  61. $('#ClassNo').lrselectRefresh({
  62. allowSearch: true,
  63. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  64. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
  65. });
  66. } else {
  67. $('#ClassNo').lrselectRefresh({
  68. allowSearch: true,
  69. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  70. param: { strWhere: "1=1 AND CheckMark=1" }
  71. });
  72. }
  73. }
  74. });
  75. $('#ClassNo').lrselect({
  76. allowSearch: true,
  77. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  78. param: { strWhere: "1=1 AND CheckMark=1" },
  79. value: "classno",
  80. text: "classname"
  81. });
  82. // 刷新
  83. $('#lr_refresh').on('click', function () {
  84. location.reload();
  85. });
  86. // 打印
  87. $('#lr_print').on('click', function () {
  88. $('#gridtable').jqprintTable();
  89. });
  90. $('#lr_view').on('click', function () {
  91. var keyValue = $('#gridtable').jfGridValue('StuId');
  92. if (learun.checkrow(keyValue)) {
  93. learun.layerForm({
  94. id: 'form',
  95. title: '查看',
  96. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  97. width: 800,
  98. height: 600,
  99. btn: null
  100. });
  101. }
  102. });
  103. //完善资助信息
  104. $("#lr_supply").on('click', function () {
  105. var keyValue = $('#gridtable').jfGridValue('StuId');
  106. if (learun.checkrow(keyValue)) {
  107. learun.layerForm({
  108. id: 'form',
  109. title: '完善信息',
  110. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/IsHelpForm?keyValue=' + keyValue,
  111. width: 600,
  112. height: 450,
  113. callBack: function (id) {
  114. return top[id].acceptClick(refreshGirdData);
  115. }
  116. });
  117. }
  118. });
  119. },
  120. // 初始化列表
  121. initGird: function () {
  122. $('#gridtable').jfGrid({
  123. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  124. headData: [
  125. { label: "姓名", name: "StuName", width: 100, align: "left" },
  126. {
  127. label: "班级", name: "ClassNo", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  128. learun.clientdata.getAsync('custmerData', {
  129. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  130. key: value,
  131. keyId: 'classno',
  132. callback: function (_data) {
  133. callback(_data['classname']);
  134. }
  135. });
  136. }
  137. },
  138. {
  139. label: "户别", name: "ResidenceType", width: 100, align: "left",
  140. formatterAsync: function (callback, value, row, op, $cell) {
  141. learun.clientdata.getAsync('dataItem', {
  142. key: value,
  143. code: 'HouseholdCategory',
  144. callback: function (_data) {
  145. callback(_data.text);
  146. }
  147. });
  148. }
  149. },
  150. {
  151. label: "享受等级", name: "SupportGrade", width: 100, align: "left",
  152. formatterAsync: function (callback, value, row, op, $cell) {
  153. learun.clientdata.getAsync('dataItem', {
  154. key: value,
  155. code: 'SupportGrade',
  156. callback: function (_data) {
  157. callback(_data.text);
  158. }
  159. });
  160. }
  161. },
  162. {
  163. label: "资助种类(一等)", name: "SupportType", width: 200, align: "left",
  164. formatterAsync: function (callback, value, row, op, $cell) {
  165. learun.clientdata.getsAsync('dataItem', {
  166. key: value,
  167. code: 'SupportType1',
  168. callback: function (text) {
  169. callback(text);
  170. }
  171. });
  172. }
  173. },
  174. {
  175. label: "资助种类(二等)", name: "SupportType1", width: 200, align: "left",
  176. formatterAsync: function (callback, value, row, op, $cell) {
  177. learun.clientdata.getsAsync('dataItem', {
  178. key: value,
  179. code: 'SupportType2',
  180. callback: function (text) {
  181. callback(text);
  182. }
  183. });
  184. }
  185. },
  186. //{
  187. // label: "资助种类", name: "SupportType", width: 100, align: "left",
  188. // formatterAsync: function (callback, value, row, op, $cell) {
  189. // learun.clientdata.getAsync('dataItem', {
  190. // key: value,
  191. // code: 'SupportType1',
  192. // callback: function (_data) {
  193. // if (_data.text) {
  194. // callback(_data.text);
  195. // } else {
  196. // learun.clientdata.getAsync('dataItem', {
  197. // key: value,
  198. // code: 'SupportType2',
  199. // callback: function (_data) {
  200. // callback(_data.text);
  201. // }
  202. // });
  203. // }
  204. // }
  205. // });
  206. // }
  207. //},
  208. { label: "符合资助条件", name: "SupportCondition", width: 200, align: "left" },
  209. { label: "创建时间", name: "SupportTime", width: 200, align: "left" },
  210. { label: "操作人", name: "SupportUserName", width: 100, align: "left" },
  211. { label: "备注信息", name: "SupportRemarks", width: 200, align: "left" }
  212. ],
  213. //isMultiselect: true,
  214. mainId: 'StuId',
  215. isPage: true,
  216. sord: 'desc',
  217. sidx: 'SupportTime'
  218. });
  219. page.search();
  220. },
  221. refreshMoney: function () {
  222. var deptNo = $("#DeptNo").lrselectGet();
  223. var majorNo = $("#MajorNo").lrselectGet();
  224. var classNo = $("#ClassNo").lrselectGet();
  225. $.post(
  226. top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetHelpStatistics',
  227. {
  228. DeptNo: deptNo,
  229. MajorNo: majorNo,
  230. ClassNo: classNo
  231. },
  232. function (res) {
  233. $("#allAmount").html(res.data.aa);
  234. $("#isAmount").html(res.data.bb);
  235. }, "json");
  236. },
  237. search: function (param) {
  238. param = param || {};
  239. param.SqlParameter = ' AND IsReport=1 AND IsSupport=1';
  240. if (!param.Grade && param.Grade == undefined) {
  241. param.Grade = NowGrade;
  242. }
  243. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  244. },
  245. };
  246. refreshGirdData = function () {
  247. page.search();
  248. };
  249. page.init();
  250. }