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.
 
 
 
 
 
 

319 lines
15 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. },
  19. bind: function () {
  20. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  21. page.search(queryJson);
  22. }, 380, 400);
  23. $("#IsTakeCloths").lrDataItemSelect({ code: "jyYewOrNot" });
  24. $('#Grade').lrselect({
  25. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
  26. value: "year",
  27. text: "year",
  28. });
  29. $('#Grade').lrselectSet(NowGrade);
  30. $('#DeptNo').lrselect({
  31. allowSearch: true,
  32. value: "deptno",
  33. text: "deptname",
  34. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  35. select: function (item) {
  36. if (item) {
  37. $('#MajorNo').lrselectRefresh({
  38. allowSearch: true,
  39. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  40. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  41. });
  42. } else {
  43. $('#MajorNo').lrselectRefresh({
  44. allowSearch: true,
  45. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  46. param: { strWhere: "1=1 AND CheckMark=1" }
  47. });
  48. }
  49. }
  50. });
  51. $('#MajorNo').lrselect({
  52. allowSearch: true,
  53. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  54. value: "majorno",
  55. text: "majorname",
  56. param: { strWhere: "1=1 AND CheckMark=1" },
  57. select: function (item) {
  58. if (item) {
  59. $('#ClassNo').lrselectRefresh({
  60. allowSearch: true,
  61. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  62. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
  63. });
  64. } else {
  65. $('#ClassNo').lrselectRefresh({
  66. allowSearch: true,
  67. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  68. param: { strWhere: "1=1 AND CheckMark=1" }
  69. });
  70. }
  71. }
  72. });
  73. $('#ClassNo').lrselect({
  74. allowSearch: true,
  75. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  76. param: { strWhere: "1=1 AND CheckMark=1" },
  77. value: "classno",
  78. text: "classname"
  79. });
  80. // 刷新
  81. $('#lr_refresh').on('click', function () {
  82. location.reload();
  83. });
  84. // 打印
  85. $('#lr_print').on('click', function () {
  86. $('#gridtable').jqprintTable();
  87. });
  88. $('#lr_view').on('click', function () {
  89. var keyValue = $('#gridtable').jfGridValue('StuId');
  90. if (learun.checkrow(keyValue)) {
  91. learun.layerForm({
  92. id: 'form',
  93. title: '查看',
  94. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  95. width: 800,
  96. height: 600,
  97. btn: null
  98. });
  99. }
  100. });
  101. //确认领取军训服
  102. $("#lr_getCloth").on('click', function () {
  103. var data = $('#gridtable').jfGridGet('rowdata');
  104. if (data.length > 0) {
  105. learun.layerConfirm('是否确认领取军训服!',
  106. function (res) {
  107. if (res) {
  108. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetCloth',
  109. { stuId: JSON.stringify(data), status: true },
  110. function (res) {
  111. refreshGirdData();
  112. });
  113. }
  114. });
  115. }
  116. });
  117. //确认领取军训服
  118. $("#lr_nogetCloth").on('click', function () {
  119. var data = $('#gridtable').jfGridGet('rowdata');
  120. if (data.length > 0) {
  121. learun.layerConfirm('是否设置未领取!',
  122. function (res) {
  123. if (res) {
  124. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetCloth',
  125. { stuId: JSON.stringify(data), status: false },
  126. function (res) {
  127. refreshGirdData();
  128. });
  129. }
  130. });
  131. }
  132. });
  133. //确认报到
  134. $("#lr_allgetCloth").on('click',
  135. function () {
  136. learun.layerConfirm('是否全部领取!',
  137. function (res) {
  138. if (res) {
  139. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllGetCloth',
  140. {},
  141. function (res) {
  142. refreshGirdData();
  143. });
  144. }
  145. });
  146. });
  147. },
  148. // 初始化列表
  149. initGird: function () {
  150. $('#gridtable').lrAuthorizeJfGrid({
  151. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  152. headData: [
  153. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  154. { label: "姓名", name: "StuName", width: 100, align: "left" },
  155. {
  156. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  157. learun.clientdata.getAsync('custmerData', {
  158. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  159. key: value,
  160. keyId: 'classno',
  161. callback: function (_data) {
  162. callback(_data['classname']);
  163. }
  164. });
  165. }
  166. },
  167. {
  168. label: "是否领取", name: "IsTakeCloths", width: 100, align: "left", formatter: function (value, row) {
  169. if (row.IsTakeCloths) {
  170. return '<span class=\"label label-success\">已领取</span>';
  171. } else if (row.IsTakeCloths == false) {
  172. return '<span class=\"label label-warning\">未领取</span>';
  173. } else {
  174. return '未处理';
  175. }
  176. }
  177. },
  178. {
  179. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  180. return value == "1" ? "男" : "女";
  181. }
  182. },
  183. {
  184. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  185. learun.clientdata.getAsync('dataItem', {
  186. key: value,
  187. code: 'National',
  188. callback: function (_data) {
  189. callback(_data.text);
  190. }
  191. });
  192. }
  193. },
  194. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val, 'yyyy-MM-dd') } },
  195. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  196. {
  197. label: "政治面貌", name: "Political", width: 100, align: "left",
  198. formatterAsync: function (callback, value, row, op, $cell) {
  199. learun.clientdata.getAsync('dataItem', {
  200. key: value,
  201. code: 'PolityStatus',
  202. callback: function (_data) {
  203. callback(_data.text);
  204. }
  205. });
  206. }
  207. },
  208. {
  209. label: "届别", name: "FreshType", width: 100, align: "left",
  210. formatterAsync: function (callback, value, row, op, $cell) {
  211. learun.clientdata.getAsync('dataItem', {
  212. key: value,
  213. code: 'timeType',
  214. callback: function (_data) {
  215. callback(_data.text);
  216. }
  217. });
  218. }
  219. },
  220. {
  221. label: "户别", name: "ResidenceType", width: 100, align: "left",
  222. formatterAsync: function (callback, value, row, op, $cell) {
  223. learun.clientdata.getAsync('dataItem', {
  224. key: value,
  225. code: 'HouseholdCategory',
  226. callback: function (_data) {
  227. callback(_data.text);
  228. }
  229. });
  230. }
  231. },
  232. {
  233. label: "考生类别", name: "StuType", width: 100, align: "left",
  234. formatterAsync: function (callback, value, row, op, $cell) {
  235. learun.clientdata.getAsync('dataItem', {
  236. key: value,
  237. code: 'stuType',
  238. callback: function (_data) {
  239. callback(_data.text);
  240. }
  241. });
  242. }
  243. },
  244. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  245. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  246. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  247. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  248. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  249. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  250. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  251. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  252. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  253. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  254. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  255. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  256. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  257. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  258. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  259. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  260. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  261. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  262. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  263. {
  264. label: "录取方式", name: "Admissions", width: 100, align: "left",
  265. formatterAsync: function (callback, value, row, op, $cell) {
  266. learun.clientdata.getAsync('dataItem', {
  267. key: value,
  268. code: 'enrollType',
  269. callback: function (_data) {
  270. callback(_data.text);
  271. }
  272. });
  273. }
  274. },
  275. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  276. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  277. ],
  278. mainId: 'StuId',
  279. isMultiselect: true,
  280. isPage: true
  281. });
  282. page.search();
  283. },
  284. search: function (param) {
  285. param = param || {};
  286. //param.SqlParameter = " AND IsPay ='true'";
  287. param.SqlParameter = ' AND IsReport=1';
  288. if (!param.Grade && param.Grade == undefined) {
  289. param.Grade = NowGrade;
  290. }
  291. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  292. }
  293. };
  294. refreshGirdData = function () {
  295. page.search();
  296. };
  297. page.init();
  298. }