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. $("#IsGetBeddingArticle").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. $('#lr_view').on('click', function () {
  85. var keyValue = $('#gridtable').jfGridValue('StuId');
  86. if (learun.checkrow(keyValue)) {
  87. learun.layerForm({
  88. id: 'form',
  89. title: '查看',
  90. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  91. width: 800,
  92. height: 600,
  93. btn: null
  94. });
  95. }
  96. });
  97. //确认领取床上用品
  98. $("#lr_getArticles").on('click', function () {
  99. var data = $('#gridtable').jfGridGet('rowdata');
  100. if (data.length > 0) {
  101. learun.layerConfirm('是否领取床上用品!',
  102. function (res) {
  103. if (res) {
  104. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetArticles',
  105. { stuId: JSON.stringify(data), status: true },
  106. function (res) {
  107. refreshGirdData();
  108. });
  109. }
  110. });
  111. }
  112. });
  113. //确认领取床上用品
  114. $("#lr_nogetArticles").on('click', function () {
  115. var data = $('#gridtable').jfGridGet('rowdata');
  116. if (data.length > 0) {
  117. learun.layerConfirm('是否设置未领取!',
  118. function (res) {
  119. if (res) {
  120. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetArticles',
  121. { stuId: JSON.stringify(data), status: false },
  122. function (res) {
  123. refreshGirdData();
  124. });
  125. }
  126. });
  127. }
  128. });
  129. //确认报到
  130. $("#lr_allgetArticles").on('click',
  131. function () {
  132. learun.layerConfirm('是否全部领取!',
  133. function (res) {
  134. if (res) {
  135. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllGetArticle',
  136. {},
  137. function (res) {
  138. refreshGirdData();
  139. });
  140. }
  141. });
  142. });
  143. },
  144. // 初始化列表
  145. initGird: function () {
  146. $('#gridtable').lrAuthorizeJfGrid({
  147. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  148. headData: [
  149. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  150. { label: "姓名", name: "StuName", width: 100, align: "left" },
  151. {
  152. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  153. learun.clientdata.getAsync('custmerData', {
  154. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  155. key: value,
  156. keyId: 'classno',
  157. callback: function (_data) {
  158. callback(_data['classname']);
  159. }
  160. });
  161. }
  162. },
  163. {
  164. label: "是否领取", name: "IsGetBeddingArticle", width: 100, align: "left", formatter: function (value, row) {
  165. if (row.IsGetBeddingArticle) {
  166. return '<span class=\"label label-success\">已领取</span>';
  167. } else if (row.IsGetBeddingArticle == false) {
  168. return '<span class=\"label label-warning\">未领取</span>';
  169. } else {
  170. return '未处理';
  171. }
  172. }
  173. },
  174. {
  175. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  176. return value == "1" ? "男" : "女";
  177. }
  178. },
  179. {
  180. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  181. learun.clientdata.getAsync('dataItem', {
  182. key: value,
  183. code: 'National',
  184. callback: function (_data) {
  185. callback(_data.text);
  186. }
  187. });
  188. }
  189. },
  190. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val, 'yyyy-MM-dd') } },
  191. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  192. {
  193. label: "政治面貌", name: "Political", width: 100, align: "left",
  194. formatterAsync: function (callback, value, row, op, $cell) {
  195. learun.clientdata.getAsync('dataItem', {
  196. key: value,
  197. code: 'PolityStatus',
  198. callback: function (_data) {
  199. callback(_data.text);
  200. }
  201. });
  202. }
  203. },
  204. {
  205. label: "届别", name: "FreshType", width: 100, align: "left",
  206. formatterAsync: function (callback, value, row, op, $cell) {
  207. learun.clientdata.getAsync('dataItem', {
  208. key: value,
  209. code: 'timeType',
  210. callback: function (_data) {
  211. callback(_data.text);
  212. }
  213. });
  214. }
  215. },
  216. {
  217. label: "户别", name: "ResidenceType", width: 100, align: "left",
  218. formatterAsync: function (callback, value, row, op, $cell) {
  219. learun.clientdata.getAsync('dataItem', {
  220. key: value,
  221. code: 'HouseholdCategory',
  222. callback: function (_data) {
  223. callback(_data.text);
  224. }
  225. });
  226. }
  227. },
  228. {
  229. label: "考生类别", name: "StuType", width: 100, align: "left",
  230. formatterAsync: function (callback, value, row, op, $cell) {
  231. learun.clientdata.getAsync('dataItem', {
  232. key: value,
  233. code: 'stuType',
  234. callback: function (_data) {
  235. callback(_data.text);
  236. }
  237. });
  238. }
  239. },
  240. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  241. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  242. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  243. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  244. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  245. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  246. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  247. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  248. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  249. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  250. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  251. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  252. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  253. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  254. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  255. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  256. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  257. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  258. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  259. {
  260. label: "录取方式", name: "Admissions", width: 100, align: "left",
  261. formatterAsync: function (callback, value, row, op, $cell) {
  262. learun.clientdata.getAsync('dataItem', {
  263. key: value,
  264. code: 'enrollType',
  265. callback: function (_data) {
  266. callback(_data.text);
  267. }
  268. });
  269. }
  270. },
  271. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  272. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  273. ],
  274. mainId: 'StuId',
  275. isMultiselect: true,
  276. isPage: true
  277. });
  278. page.search();
  279. },
  280. search: function (param) {
  281. param = param || {};
  282. //param.SqlParameter = " AND IsPay ='true'";
  283. param.SqlParameter = ' AND IsReport=1';
  284. if (!param.Grade && param.Grade == undefined) {
  285. param.Grade = NowGrade;
  286. }
  287. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  288. }
  289. };
  290. refreshGirdData = function () {
  291. page.search();
  292. };
  293. page.init();
  294. }