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.
 
 
 
 
 
 

310 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 StuId;
  10. var bootstrap = function ($, learun) {
  11. "use strict";
  12. var page = {
  13. init: function () {
  14. var data_grade = learun.httpGet(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByMaxClass',
  15. {});
  16. NowGrade = data_grade.info;
  17. page.initGird();
  18. page.bind();
  19. },
  20. bind: function () {
  21. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  22. page.search(queryJson);
  23. }, 380, 400);
  24. $("#IsMug").lrDataItemSelect({ code: "jyYewOrNot" });
  25. $('#Grade').lrselect({
  26. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
  27. value: "year",
  28. text: "year",
  29. });
  30. $('#Grade').lrselectSet(NowGrade);
  31. $('#DeptNo').lrselect({
  32. allowSearch: true,
  33. value: "deptno",
  34. text: "deptname",
  35. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  36. select: function (item) {
  37. if (item) {
  38. $('#MajorNo').lrselectRefresh({
  39. allowSearch: true,
  40. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  41. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  42. });
  43. } else {
  44. $('#MajorNo').lrselectRefresh({
  45. allowSearch: true,
  46. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  47. param: { strWhere: "1=1 AND CheckMark=1" }
  48. });
  49. }
  50. }
  51. });
  52. $('#MajorNo').lrselect({
  53. allowSearch: true,
  54. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  55. value: "majorno",
  56. text: "majorname",
  57. param: { strWhere: "1=1 AND CheckMark=1" },
  58. select: function (item) {
  59. if (item) {
  60. $('#ClassNo').lrselectRefresh({
  61. allowSearch: true,
  62. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  63. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
  64. });
  65. } else {
  66. $('#ClassNo').lrselectRefresh({
  67. allowSearch: true,
  68. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  69. param: { strWhere: "1=1 AND CheckMark=1" }
  70. });
  71. }
  72. }
  73. });
  74. $('#ClassNo').lrselect({
  75. allowSearch: true,
  76. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  77. param: { strWhere: "1=1 AND CheckMark=1" },
  78. value: "classno",
  79. text: "classname"
  80. });
  81. // 刷新
  82. $('#lr_refresh').on('click', function () {
  83. location.reload();
  84. });
  85. // 打印
  86. $('#lr_print').on('click', function () {
  87. $('#gridtable').jqprintTable();
  88. });
  89. $('#lr_view').on('click', function () {
  90. var keyValue = $('#gridtable').jfGridValue('StuId');
  91. if (learun.checkrow(keyValue)) {
  92. learun.layerForm({
  93. id: 'form',
  94. title: '查看',
  95. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  96. width: 800,
  97. height: 600,
  98. btn: null
  99. });
  100. }
  101. });
  102. $("#lr_photo").on('click', function () {
  103. StuId = $("#gridtable").jfGridValue('StuId');
  104. if (learun.checkrow(StuId)) {
  105. takeImg();
  106. }
  107. });
  108. //关联照片
  109. $("#lr_realationPhoto").on('click', function() {
  110. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/RealationPhoto', {}, function () {
  111. refreshGirdData();
  112. });
  113. })
  114. //确认报到
  115. $("#lr_allphoto").on('click',
  116. function () {
  117. learun.layerConfirm('是否全部拍照!',
  118. function (res) {
  119. if (res) {
  120. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllPhoto',
  121. {},
  122. function (res) {
  123. refreshGirdData();
  124. });
  125. }
  126. });
  127. });
  128. $("#lr_cardprint").on('click', function () {
  129. var keyValue = $("#gridtable").jfGridValue('StuId');
  130. var IsPay = $("#gridtable").jfGridValue('IsPay');
  131. if (learun.checkrow(keyValue)) {
  132. if (IsPay == true || IsPay == "true") {
  133. learun.layerForm({
  134. id: 'formcardprint',
  135. title: '打印一卡通',
  136. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/CardPrint?keyValue=' + keyValue,
  137. width: 700,
  138. height: 300,
  139. btn: null,
  140. //end: function () { refreshGirdData(); }
  141. });
  142. } else {
  143. learun.alert.warning("尚未缴费,请先完成缴费再打印");
  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: "IsMug", width: 100, align: "left",
  169. formatter: function (value, row) {
  170. if (row.IsMug) {
  171. return '<span class=\"label label-success\">已拍照</span>';
  172. } else if (row.IsMug == false) {
  173. return '<span class=\"label label-warning\">未拍照</span>';
  174. } else {
  175. return '未处理';
  176. }
  177. }
  178. },
  179. {
  180. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  181. return value == "1" ? "男" : "女";
  182. }
  183. },
  184. {
  185. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  186. learun.clientdata.getAsync('dataItem', {
  187. key: value,
  188. code: 'National',
  189. callback: function (_data) {
  190. callback(_data.text);
  191. }
  192. });
  193. }
  194. },
  195. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val, 'yyyy-MM-dd') } },
  196. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  197. {
  198. label: "政治面貌", name: "Political", width: 100, align: "left",
  199. formatterAsync: function (callback, value, row, op, $cell) {
  200. learun.clientdata.getAsync('dataItem', {
  201. key: value,
  202. code: 'PolityStatus',
  203. callback: function (_data) {
  204. callback(_data.text);
  205. }
  206. });
  207. }
  208. },
  209. {
  210. label: "届别", name: "FreshType", width: 100, align: "left",
  211. formatterAsync: function (callback, value, row, op, $cell) {
  212. learun.clientdata.getAsync('dataItem', {
  213. key: value,
  214. code: 'timeType',
  215. callback: function (_data) {
  216. callback(_data.text);
  217. }
  218. });
  219. }
  220. },
  221. {
  222. label: "户别", name: "ResidenceType", width: 100, align: "left",
  223. formatterAsync: function (callback, value, row, op, $cell) {
  224. learun.clientdata.getAsync('dataItem', {
  225. key: value,
  226. code: 'HouseholdCategory',
  227. callback: function (_data) {
  228. callback(_data.text);
  229. }
  230. });
  231. }
  232. },
  233. {
  234. label: "考生类别", name: "StuType", width: 100, align: "left",
  235. formatterAsync: function (callback, value, row, op, $cell) {
  236. learun.clientdata.getAsync('dataItem', {
  237. key: value,
  238. code: 'stuType',
  239. callback: function (_data) {
  240. callback(_data.text);
  241. }
  242. });
  243. }
  244. },
  245. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  246. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  247. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  248. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  249. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  250. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  251. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  252. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  253. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  254. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  255. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  256. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  257. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  258. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  259. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  260. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  261. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  262. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  263. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  264. {
  265. label: "录取方式", name: "Admissions", width: 100, align: "left",
  266. formatterAsync: function (callback, value, row, op, $cell) {
  267. learun.clientdata.getAsync('dataItem', {
  268. key: value,
  269. code: 'enrollType',
  270. callback: function (_data) {
  271. callback(_data.text);
  272. }
  273. });
  274. }
  275. },
  276. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  277. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  278. ],
  279. mainId: 'StuId',
  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. }