25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

Index.js 24 KiB

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