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.
 
 
 
 
 
 

301 lines
14 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 StuId;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. page.initGird();
  14. page.bind();
  15. },
  16. bind: function () {
  17. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  18. page.search(queryJson);
  19. }, 380, 400);
  20. $("#IsMug").lrDataItemSelect({ code: "jyYewOrNot" });
  21. $('#Year').lrselect({
  22. url:top.$.rootUrl+'/EducationalAdministration/StuEnroll/GetYearListByClass',
  23. value:"year",
  24. text:"year",
  25. })
  26. $('#DeptNo').lrselect({
  27. allowSearch: true,
  28. value: "deptno",
  29. text: "deptname",
  30. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  31. select: function (item) {
  32. if (item) {
  33. $('#MajorNo').lrselectRefresh({
  34. allowSearch: true,
  35. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  36. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  37. });
  38. } else {
  39. $('#MajorNo').lrselectRefresh({
  40. allowSearch: true,
  41. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  42. param: { strWhere: "1=1 AND CheckMark=1" }
  43. });
  44. }
  45. }
  46. });
  47. $('#MajorNo').lrselect({
  48. allowSearch: true,
  49. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  50. value: "majorno",
  51. text: "majorname",
  52. param: { strWhere: "1=1 AND CheckMark=1" },
  53. select: function (item) {
  54. if (item) {
  55. $('#ClassNo').lrselectRefresh({
  56. allowSearch: true,
  57. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  58. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
  59. });
  60. } else {
  61. $('#ClassNo').lrselectRefresh({
  62. allowSearch: true,
  63. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  64. param: { strWhere: "1=1 AND CheckMark=1" }
  65. });
  66. }
  67. }
  68. });
  69. $('#ClassNo').lrselect({
  70. allowSearch: true,
  71. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  72. param: { strWhere: "1=1 AND CheckMark=1" },
  73. value: "classno",
  74. text: "classname"
  75. });
  76. // 刷新
  77. $('#lr_refresh').on('click', function () {
  78. location.reload();
  79. });
  80. // 打印
  81. $('#lr_print').on('click', function () {
  82. $('#gridtable').jqprintTable();
  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. $("#lr_photo").on('click', function () {
  98. StuId = $("#gridtable").jfGridValue('StuId');
  99. if (learun.checkrow(StuId)) {
  100. takeImg();
  101. }
  102. });
  103. //关联照片
  104. $("#lr_realationPhoto").on('click', function() {
  105. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/RealationPhoto', {}, function () {
  106. refreshGirdData();
  107. });
  108. })
  109. //确认报到
  110. $("#lr_allphoto").on('click',
  111. function () {
  112. learun.layerConfirm('是否全部拍照!',
  113. function (res) {
  114. if (res) {
  115. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllPhoto',
  116. {},
  117. function (res) {
  118. refreshGirdData();
  119. });
  120. }
  121. });
  122. });
  123. $("#lr_cardprint").on('click', function () {
  124. var keyValue = $("#gridtable").jfGridValue('StuId');
  125. var IsPay = $("#gridtable").jfGridValue('IsPay');
  126. if (learun.checkrow(keyValue)) {
  127. if (IsPay == true || IsPay == "true") {
  128. learun.layerForm({
  129. id: 'formcardprint',
  130. title: '打印一卡通',
  131. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/CardPrint?keyValue=' + keyValue,
  132. width: 700,
  133. height: 300,
  134. btn: null,
  135. //end: function () { refreshGirdData(); }
  136. });
  137. } else {
  138. learun.alert.warning("尚未缴费,请先完成缴费再打印");
  139. }
  140. }
  141. });
  142. },
  143. // 初始化列表
  144. initGird: function () {
  145. $('#gridtable').lrAuthorizeJfGrid({
  146. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  147. headData: [
  148. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  149. { label: "姓名", name: "StuName", width: 100, align: "left" },
  150. {
  151. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  152. learun.clientdata.getAsync('custmerData', {
  153. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  154. key: value,
  155. keyId: 'classno',
  156. callback: function (_data) {
  157. callback(_data['classname']);
  158. }
  159. });
  160. }
  161. },
  162. {
  163. label: "是否拍照", name: "IsMug", width: 100, align: "left",
  164. formatter: function (value, row) {
  165. if (row.IsMug) {
  166. return '<span class=\"label label-success\">已拍照</span>';
  167. } else if (row.IsMug == 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 val.substring(0, 10); } },
  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: 'BCdPartyFace',
  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. isPage: true
  276. });
  277. page.search();
  278. },
  279. search: function (param) {
  280. param = param || {};
  281. //param.SqlParameter = " AND IsPay ='true'";
  282. param.SqlParameter = ' AND IsReport=1';
  283. //param.Grade = "20";
  284. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  285. }
  286. };
  287. refreshGirdData = function () {
  288. page.search();
  289. };
  290. page.init();
  291. }