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.
 
 
 
 
 
 

357 lines
16 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. page.initGird();
  17. page.bind();
  18. page.refreshMoney();
  19. },
  20. bind: function () {
  21. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  22. page.refreshMoney();
  23. page.search(queryJson);
  24. }, 380, 400);
  25. $("#IsCheckIn").lrDataItemSelect({ code: "jyYewOrNot" });
  26. $('#Grade').lrselect({
  27. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
  28. value: "year",
  29. text: "year",
  30. });
  31. $('#Grade').lrselectSet(NowGrade);
  32. $('#DeptNo').lrselect({
  33. allowSearch: true,
  34. value: "deptno",
  35. text: "deptname",
  36. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  37. select: function (item) {
  38. if (item) {
  39. $('#MajorNo').lrselectRefresh({
  40. allowSearch: true,
  41. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  42. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  43. });
  44. } else {
  45. $('#MajorNo').lrselectRefresh({
  46. allowSearch: true,
  47. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  48. param: { strWhere: "1=1 AND CheckMark=1" }
  49. });
  50. }
  51. }
  52. });
  53. $('#MajorNo').lrselect({
  54. allowSearch: true,
  55. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  56. value: "majorno",
  57. text: "majorname",
  58. param: { strWhere: "1=1 AND CheckMark=1" },
  59. select: function (item) {
  60. if (item) {
  61. $('#ClassNo').lrselectRefresh({
  62. allowSearch: true,
  63. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  64. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
  65. });
  66. } else {
  67. $('#ClassNo').lrselectRefresh({
  68. allowSearch: true,
  69. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  70. param: { strWhere: "1=1 AND CheckMark=1" }
  71. });
  72. }
  73. }
  74. });
  75. $('#ClassNo').lrselect({
  76. allowSearch: true,
  77. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  78. param: { strWhere: "1=1 AND CheckMark=1" },
  79. value: "classno",
  80. text: "classname"
  81. });
  82. // 刷新
  83. $('#lr_refresh').on('click', function () {
  84. location.reload();
  85. });
  86. // 打印
  87. $('#lr_print').on('click', function () {
  88. $('#gridtable').jqprintTable();
  89. });
  90. $('#lr_view').on('click', function () {
  91. var keyValue = $('#gridtable').jfGridValue('StuId');
  92. if (learun.checkrow(keyValue)) {
  93. learun.layerForm({
  94. id: 'form',
  95. title: '查看',
  96. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  97. width: 800,
  98. height: 600,
  99. btn: null
  100. });
  101. }
  102. });
  103. //上传资料
  104. $('#lr_uploadFile').on('click', function () {
  105. var keyValue = $('#gridtable').jfGridValue('StuId');
  106. if (learun.checkrow(keyValue)) {
  107. learun.layerForm({
  108. id: 'form',
  109. title: '编辑',
  110. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/CheckInUrl?keyValue=' + keyValue,
  111. width: 600,
  112. height: 200,
  113. callBack: function (id) {
  114. return top[id].acceptClick(refreshGirdData);
  115. }
  116. });
  117. }
  118. });
  119. //确认住宿
  120. $("#lr_stay").on('click', function () {
  121. var data = $('#gridtable').jfGridGet('rowdata');
  122. if (data.length > 0) {
  123. learun.layerConfirm('是否确认此学生住宿!',
  124. function (res) {
  125. if (res) {
  126. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Stay',
  127. { stuId: JSON.stringify(data), status: true },
  128. function (res) {
  129. refreshGirdData();
  130. });
  131. }
  132. });
  133. }
  134. });
  135. //确认住宿
  136. $("#lr_allstay").on('click', function () {
  137. learun.layerConfirm('是否确认全部住宿!',
  138. function (res) {
  139. if (res) {
  140. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllStay',
  141. {},
  142. function (res) {
  143. refreshGirdData();
  144. });
  145. }
  146. });
  147. });
  148. $("#lr_nostay").on("click", function () {
  149. var data = $('#gridtable').jfGridGet('rowdata');
  150. if (data.length > 0) {
  151. learun.layerConfirm('是否确认此学生走读',
  152. function (res) {
  153. if (res) {
  154. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Stay',
  155. { stuId: JSON.stringify(data), status: false },
  156. function (res) {
  157. refreshGirdData();
  158. });
  159. }
  160. });
  161. }
  162. });
  163. },
  164. // 初始化列表
  165. initGird: function () {
  166. $('#gridtable').lrAuthorizeJfGrid({
  167. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  168. headData: [
  169. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  170. { label: "姓名", name: "StuName", width: 100, align: "left" },
  171. {
  172. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  173. learun.clientdata.getAsync('custmerData', {
  174. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  175. key: value,
  176. keyId: 'classno',
  177. callback: function (_data) {
  178. callback(_data['classname']);
  179. }
  180. });
  181. }
  182. },
  183. {
  184. label: "是否住宿", name: "IsCheckIn", width: 100, align: "left",
  185. formatter: function (value, row) {
  186. if (row.IsCheckIn) {
  187. return '<span class=\"label label-success\">住宿</span>';
  188. } else if (row.IsCheckIn == false) {
  189. return '<span class=\"label label-warning\">走读</span>';
  190. } else {
  191. return "未处理";
  192. }
  193. }
  194. },
  195. {
  196. label: "是否上传资料", name: "CheckInUrl", width: 100, align: "left", formatter: function (value) {
  197. if (value) {
  198. return '<span class=\"label label-success\">已上传</span>';
  199. } else {
  200. return '<span class=\"label label-warning\">未上传</span>';
  201. }
  202. }
  203. },
  204. {
  205. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  206. return value == "1" ? "男" : "女";
  207. }
  208. },
  209. {
  210. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  211. learun.clientdata.getAsync('dataItem', {
  212. key: value,
  213. code: 'National',
  214. callback: function (_data) {
  215. callback(_data.text);
  216. }
  217. });
  218. }
  219. },
  220. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val, 'yyyy-MM-dd') } },
  221. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  222. {
  223. label: "届别", name: "FreshType", width: 100, align: "left",
  224. formatterAsync: function (callback, value, row, op, $cell) {
  225. learun.clientdata.getAsync('dataItem', {
  226. key: value,
  227. code: 'timeType',
  228. callback: function (_data) {
  229. callback(_data.text);
  230. }
  231. });
  232. }
  233. },
  234. {
  235. label: "户别", name: "ResidenceType", width: 100, align: "left",
  236. formatterAsync: function (callback, value, row, op, $cell) {
  237. learun.clientdata.getAsync('dataItem', {
  238. key: value,
  239. code: 'HouseholdCategory',
  240. callback: function (_data) {
  241. callback(_data.text);
  242. }
  243. });
  244. }
  245. },
  246. {
  247. label: "考生类别", name: "StuType", width: 100, align: "left",
  248. formatterAsync: function (callback, value, row, op, $cell) {
  249. learun.clientdata.getAsync('dataItem', {
  250. key: value,
  251. code: 'stuType',
  252. callback: function (_data) {
  253. callback(_data.text);
  254. }
  255. });
  256. }
  257. },
  258. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  259. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  260. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  261. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  262. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  263. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  264. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  265. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  266. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  267. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  268. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  269. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  270. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  271. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  272. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  273. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  274. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  275. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  276. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  277. {
  278. label: "录取方式", name: "Admissions", width: 100, align: "left",
  279. formatterAsync: function (callback, value, row, op, $cell) {
  280. learun.clientdata.getAsync('dataItem', {
  281. key: value,
  282. code: 'enrollType',
  283. callback: function (_data) {
  284. callback(_data.text);
  285. }
  286. });
  287. }
  288. },
  289. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  290. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  291. ],
  292. mainId: 'StuId',
  293. isMultiselect: true,
  294. isPage: true
  295. });
  296. page.search();
  297. },
  298. refreshMoney: function () {
  299. var deptNo = $("#DeptNo").lrselectGet();
  300. var majorNo = $("#MajorNo").lrselectGet();
  301. var classNo = $("#ClassNo").lrselectGet();
  302. $.post(
  303. top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetCheckInStatistics',
  304. {
  305. DeptNo: deptNo,
  306. MajorNo: majorNo,
  307. ClassNo: classNo
  308. },
  309. function (res) {
  310. $("#allAmount").html(res.data.aa);
  311. $("#isAmount").html(res.data.bb);
  312. }, "json");
  313. },
  314. search: function (param) {
  315. param = param || {};
  316. param.SqlParameter = ' AND IsReport=1';
  317. if (!param.Grade && param.Grade == undefined) {
  318. param.Grade = NowGrade;
  319. }
  320. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  321. }
  322. };
  323. refreshGirdData = function () {
  324. page.search();
  325. };
  326. page.init();
  327. }