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.
 
 
 
 
 
 

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