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.
 
 
 
 
 
 

498 lines
26 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. //console.log('NowGrade:', NowGrade);
  17. page.initGird();
  18. page.bind();
  19. },
  20. bind: function () {
  21. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  22. page.search(queryJson);
  23. }, 400, 440, true,
  24. function () {
  25. var cardobj = idcardreader.readcard("lr_btn_readcard");
  26. if (cardobj.resultFlag == 0) {
  27. learun.alert.success("身份证信息读取成功");
  28. $("#StuName").val(cardobj.resultContent.partyName);
  29. $("#IDCard").val(cardobj.resultContent.certNumber);
  30. } else {
  31. learun.alert.error('读取错误!未检测到身份证或设备连接错误,请调整身份证位置并重新读取,多次未读取到身份证信息则可能是身份证芯片已损坏!');
  32. }
  33. });
  34. $('#DeptNo').lrselect({
  35. allowSearch: true,
  36. value: "deptno",
  37. text: "deptname",
  38. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  39. select: function (item) {
  40. if (item) {
  41. $('#MajorNo').lrselectRefresh({
  42. allowSearch: true,
  43. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  44. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  45. });
  46. } else {
  47. $('#MajorNo').lrselectRefresh({
  48. allowSearch: true,
  49. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  50. param: { strWhere: "1=1 AND CheckMark=1" }
  51. });
  52. }
  53. }
  54. });
  55. $('#MajorNo').lrselect({
  56. allowSearch: true,
  57. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  58. value: "majorno",
  59. text: "majorname",
  60. param: { strWhere: "1=1 AND CheckMark=1" },
  61. select: function (item) {
  62. if (item) {
  63. $('#ClassNo').lrselectRefresh({
  64. allowSearch: true,
  65. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  66. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
  67. });
  68. } else {
  69. $('#ClassNo').lrselectRefresh({
  70. allowSearch: true,
  71. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  72. param: { strWhere: "1=1 AND CheckMark=1" }
  73. });
  74. }
  75. }
  76. });
  77. $('#Grade').lrselect({
  78. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
  79. value: "year",
  80. text: "year",
  81. });
  82. $('#Grade').lrselectSet(NowGrade);
  83. $('#ClassNo').lrselect({
  84. allowSearch: true,
  85. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  86. param: { strWhere: "1=1 AND CheckMark=1" },
  87. value: "classno",
  88. text: "classname"
  89. });
  90. $('#Admissions').lrDataItemSelect({ code: 'enrollType' });
  91. //刷新
  92. $('#lr_refresh').on('click', function () {
  93. location.reload();
  94. });
  95. // 修改招生类别
  96. $('#lr_enrollplan').on('click', function () {
  97. var data = $('#gridtable').jfGridGet('rowdata');
  98. if (data.length > 0) {
  99. var str = '';
  100. $.each(data, function (i, item) {
  101. str += item.StuId + ',';
  102. });
  103. learun.layerForm({
  104. id: 'form',
  105. title: '修改招生类别',
  106. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollTypeForm?str=' + str,
  107. width: 260,
  108. height: 260,
  109. callBack: function (id) {
  110. return top[id].acceptClick(refreshGirdData);
  111. }
  112. });
  113. }
  114. });
  115. // 新增
  116. $('#lr_add').on('click', function () {
  117. learun.layerForm({
  118. id: 'form',
  119. title: '新增',
  120. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/Form',
  121. width: 800,
  122. height: 600,
  123. callBack: function (id) {
  124. return top[id].acceptClick(refreshGirdData);
  125. }
  126. });
  127. });
  128. // 编辑
  129. $('#lr_edit').on('click', function () {
  130. var keyValue = $('#gridtable').jfGridValue('StuId');
  131. if (learun.checkrow(keyValue)) {
  132. learun.layerForm({
  133. id: 'form',
  134. title: '编辑',
  135. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/Form?keyValue=' + keyValue,
  136. width: 800,
  137. height: 600,
  138. callBack: function (id) {
  139. return top[id].acceptClick(refreshGirdData);
  140. }
  141. });
  142. }
  143. });
  144. $('#lr_view').on('click', function () {
  145. var keyValue = $('#gridtable').jfGridValue('StuId');
  146. if (learun.checkrow(keyValue)) {
  147. learun.layerForm({
  148. id: 'form',
  149. title: '查看',
  150. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  151. width: 800,
  152. height: 600,
  153. btn: null
  154. });
  155. }
  156. });
  157. // 删除
  158. $('#lr_delete').on('click', function () {
  159. var keyValue = $('#gridtable').jfGridValue('StuId');
  160. if (learun.checkrow(keyValue)) {
  161. learun.layerConfirm('是否确认删除该项!', function (res) {
  162. if (res) {
  163. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/DeleteForm', { keyValue: keyValue }, function () {
  164. refreshGirdData();
  165. });
  166. }
  167. });
  168. }
  169. });
  170. // 同步系部
  171. $('#lr_syn').on('click', function () {
  172. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SyncDept', function () {
  173. refreshGirdData();
  174. });
  175. });
  176. // 同步专业
  177. $('#lr_synmajor').on('click', function () {
  178. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SyncMajor', function () {
  179. refreshGirdData();
  180. });
  181. });
  182. // 打印
  183. $('#lr_print').on('click', function () {
  184. $('#gridtable').jqprintTable();
  185. });
  186. //  分配班级
  187. $('#lr_allocationClass').on('click', function () {
  188. learun.layerForm({
  189. id: 'form',
  190. title: "分配班级",
  191. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllocationClass',
  192. width: 1300,
  193. height: 600,
  194. btn: null
  195. });
  196. });
  197. //  分配宿舍
  198. $('#lr_allocationDormitory').on('click', function () {
  199. learun.layerFormForPercent({
  200. id: 'form',
  201. title: "分配宿舍",
  202. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllocationDormitory',
  203. width: '90%',
  204. height: '90%',
  205. btn: null
  206. });
  207. });
  208. //  分配宿舍
  209. $('#lr_newallocationDormitory').on('click', function () {
  210. learun.layerFormForPercent({
  211. id: 'form',
  212. title: "分配宿舍",
  213. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/NewAllocationDormitory',
  214. width: '90%',
  215. height: '90%',
  216. btn: null
  217. });
  218. });
  219. //  分配宿舍
  220. $('#lr_newallocationBed').on('click', function () {
  221. learun.layerFormForPercent({
  222. id: 'form',
  223. title: "分配床位",
  224. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/NewAllocationBed',
  225. width: '90%',
  226. height: '90%',
  227. btn: null
  228. });
  229. });
  230. //确认分配宿舍
  231. $('#lr_confirmDormitory').on('click', function () {
  232. learun.layerConfirm('是否确认已经分配的宿舍!', function (res) {
  233. if (res) {
  234. learun.loading(true, '分配中');
  235. learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/ConfirmDormitoryTwo', {}, function (val) {
  236. learun.alert.success('操作成功');
  237. learun.loading(false);
  238. });
  239. }
  240. });
  241. })
  242. },
  243. // 初始化列表
  244. initGird: function () {
  245. $('#gridtable').lrAuthorizeJfGrid({
  246. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  247. headData: [
  248. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  249. {
  250. label: "进度", name: "Status", width: 100, align: "left", formatter: function (value, row) {
  251. switch (value) {
  252. case "":
  253. return '<span class=\"label label-success\">待受理</span>'
  254. break;
  255. case 1:
  256. return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n" class=\"label label-success\">已受理报到</span>'
  257. break;
  258. case 2:
  259. return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '" class=\"label label-success\">已受理住宿</span>'
  260. break;
  261. case 3:
  262. return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '" class=\"label label-success\">已受理资助</span>'
  263. break;
  264. case 4:
  265. return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '" class=\"label label-success\">已受理军训</span>'
  266. break;
  267. case 5:
  268. return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '\n' + (row.IsPay ? "缴费" : "未缴费") + '" class=\"label label-success\">已受理缴费</span>'
  269. break;
  270. case 6:
  271. return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '\n' + (row.IsPay ? "缴费" : "未缴费") + '\n' + (row.IsMug ? "拍照" : "未拍照") + '" class=\"label label-success\">已受理拍照</span>'
  272. break;
  273. case 7:
  274. return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '\n' + (row.IsPay ? "缴费" : "未缴费") + '\n' + (row.IsMug ? "拍照" : "未拍照") + '\n' + (row.IsTakeCloths ? "已领军训服" : "未领军训服") + '" class=\"label label-success\">已受理军训服</span>'
  275. break;
  276. case 8:
  277. return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '\n' + (row.IsPay ? "缴费" : "未缴费") + '\n' + (row.IsMug ? "拍照" : "未拍照") + '\n' + (row.IsTakeCloths ? "已领军训服" : "未领军训服") + '\n' + (row.IsQuantity ? "已量校服尺寸" : "未量校服尺寸") + '" class=\"label label-success\">已受理量尺寸</span>'
  278. break;
  279. case 9:
  280. return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '\n' + (row.IsPay ? "缴费" : "未缴费") + '\n' + (row.IsMug ? "拍照" : "未拍照") + '\n' + (row.IsTakeCloths ? "已领军训服" : "未领军训服") + '\n' + (row.IsQuantity ? "已量校服尺寸" : "未量校服尺寸") + '\n' + (row.IsGetBeddingArticle ? "已领床上用品" : "未领床上用品") + '" class=\"label label-success\">已受理领取用品</span>'
  281. break;
  282. default:
  283. }
  284. }
  285. },
  286. { label: "姓名", name: "StuName", width: 100, align: "left" },
  287. {
  288. label: "系部", name: "DeptNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  289. learun.clientdata.getAsync('custmerData', {
  290. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  291. key: value,
  292. keyId: 'deptno',
  293. callback: function (_data) {
  294. callback(_data['deptname']);
  295. }
  296. });
  297. }
  298. },
  299. {
  300. label: "专业", name: "MajorNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  301. learun.clientdata.getAsync('custmerData', {
  302. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  303. key: value,
  304. keyId: 'majorno',
  305. callback: function (_data) {
  306. callback(_data['majorname']);
  307. }
  308. });
  309. }
  310. },
  311. {
  312. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  313. learun.clientdata.getAsync('custmerData', {
  314. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  315. key: value,
  316. keyId: 'classno',
  317. callback: function (_data) {
  318. callback(_data['classname']);
  319. }
  320. });
  321. }
  322. },
  323. {
  324. label: "招生类别", name: "EnrollType", width: 100, align: "left",
  325. formatterAsync: function (callback, value, row, op, $cell) {
  326. learun.clientdata.getAsync('dataItem', {
  327. key: value,
  328. code: 'EnrollStudentType',
  329. callback: function (_data) {
  330. callback(_data.text);
  331. }
  332. });
  333. }
  334. },
  335. {
  336. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  337. return value == "1" ? "男" : "女";
  338. }
  339. },
  340. { label: "年级", name: "Grade", width: 100, align: "left" },
  341. {
  342. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  343. learun.clientdata.getAsync('dataItem', {
  344. key: value,
  345. code: 'National',
  346. callback: function (_data) {
  347. callback(_data.text);
  348. }
  349. });
  350. }
  351. },
  352. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val, 'yyyy-MM-dd') } },
  353. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  354. {
  355. label: "政治面貌", name: "Political", width: 100, align: "left",
  356. formatterAsync: function (callback, value, row, op, $cell) {
  357. learun.clientdata.getAsync('dataItem', {
  358. key: value,
  359. code: 'PolityStatus',
  360. callback: function (_data) {
  361. callback(_data.text);
  362. }
  363. });
  364. }
  365. },
  366. {
  367. label: "届别", name: "FreshType", width: 100, align: "left",
  368. formatterAsync: function (callback, value, row, op, $cell) {
  369. learun.clientdata.getAsync('dataItem', {
  370. key: value,
  371. code: 'timeType',
  372. callback: function (_data) {
  373. callback(_data.text);
  374. }
  375. });
  376. }
  377. },
  378. {
  379. label: "学制", name: "EductionalSystme", width: 100, align: "left",
  380. formatterAsync: function (callback, value, row, op, $cell) {
  381. learun.clientdata.getAsync('dataItem', {
  382. key: value,
  383. code: 'EductionalSystme',
  384. callback: function (_data) {
  385. callback(_data.text);
  386. }
  387. });
  388. }
  389. },
  390. {
  391. label: "户别", name: "ResidenceType", width: 100, align: "left",
  392. formatterAsync: function (callback, value, row, op, $cell) {
  393. learun.clientdata.getAsync('dataItem', {
  394. key: value,
  395. code: 'HouseholdCategory',
  396. callback: function (_data) {
  397. callback(_data.text);
  398. }
  399. });
  400. }
  401. },
  402. {
  403. label: "考生类别", name: "StuType", width: 100, align: "left",
  404. formatterAsync: function (callback, value, row, op, $cell) {
  405. learun.clientdata.getAsync('dataItem', {
  406. key: value,
  407. code: 'stuType',
  408. callback: function (_data) {
  409. callback(_data.text);
  410. }
  411. });
  412. }
  413. },
  414. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  415. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  416. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  417. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  418. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  419. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  420. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  421. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  422. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  423. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  424. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  425. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  426. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  427. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  428. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  429. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  430. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  431. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  432. {
  433. label: "录取方式", name: "Admissions", width: 100, align: "left",
  434. formatterAsync: function (callback, value, row, op, $cell) {
  435. learun.clientdata.getAsync('dataItem', {
  436. key: value,
  437. code: 'enrollType',
  438. callback: function (_data) {
  439. callback(_data.text);
  440. }
  441. });
  442. }
  443. },
  444. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  445. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  446. { label: "综评成绩", name: "SynthesizeGrade", width: 100, align: "left" },
  447. { label: "校额到校录取成绩", name: "EnrollGrade", width: 100, align: "left" },
  448. { label: "添加时间", name: "AddTime", width: 100, align: "left" }
  449. ],
  450. mainId: 'StuId',
  451. isMultiselect: true,
  452. isPage: true
  453. });
  454. page.search();
  455. },
  456. search: function (param) {
  457. param = param || {};
  458. if (!param.Grade && param.Grade == undefined) {
  459. param.Grade = NowGrade;
  460. }
  461. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  462. }
  463. };
  464. refreshGirdData = function () {
  465. page.search();
  466. };
  467. //refreshGirdDatas = function () {
  468. // alert(2222);
  469. //};
  470. page.init();
  471. }