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.
 
 
 
 
 
 

441 lines
20 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.search(queryJson);
  23. //page.refreshMoney();
  24. }, 380, 400);
  25. $("#IsSubsidize1").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/SubsidizeUrl?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_help").on('click', function () {
  121. var data = $('#gridtable').jfGridGet('rowdata');
  122. if (data.length > 0) {
  123. var IsManualSubsidize = $('#gridtable').jfGridValue('IsManualSubsidize');
  124. if (IsManualSubsidize.indexOf('true') != -1) {
  125. learun.alert.warning('选中项目包含多次操作免学费的数据!');
  126. return;
  127. }
  128. learun.layerConfirm('是否确认免学费!',
  129. function (res) {
  130. if (res) {
  131. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Help',
  132. { stuId: JSON.stringify(data), status: true },
  133. function (res) {
  134. refreshGirdData();
  135. });
  136. }
  137. });
  138. }
  139. });
  140. //全部免学费
  141. $("#lr_allhelp").on('click', function () {
  142. learun.layerConfirm('是否全部免学费!',
  143. function (res) {
  144. if (res) {
  145. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllHelp',
  146. {},
  147. function (res) {
  148. refreshGirdData();
  149. });
  150. }
  151. });
  152. });
  153. //确认不免学费
  154. $("#lr_nohelp").on('click', function () {
  155. var data = $('#gridtable').jfGridGet('rowdata');
  156. if (data.length > 0) {
  157. learun.layerConfirm('是否确认不免学费!',
  158. function (res) {
  159. if (res) {
  160. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Help',
  161. { stuId: JSON.stringify(data), status: false },
  162. function (res) {
  163. refreshGirdData();
  164. });
  165. }
  166. });
  167. }
  168. });
  169. //确认资助
  170. $('#lr_support').on('click', function () {
  171. var keyValue = $('#gridtable').jfGridValue('StuId');
  172. if (learun.checkrow(keyValue)) {
  173. learun.layerConfirm('是否确认资助?', function (res) {
  174. if (res) {
  175. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Support', { keyValue: keyValue }, function () {
  176. refreshGirdData();
  177. });
  178. }
  179. });
  180. }
  181. });
  182. //学费变更
  183. $("#lr_change").on('click', function () {
  184. var keyValue = $('#gridtable').jfGridValue('StuId');
  185. if (keyValue.indexOf(',') > 0) {
  186. learun.alert.warning("只能选中一条记录变更!");
  187. return;
  188. }
  189. var isSupportChange = $('#gridtable').jfGridValue('IsSupportChange');
  190. //如果已变更,将不能重复变更
  191. if (isSupportChange) {
  192. learun.alert.warning("选中记录中已变更,不可重复变更!");
  193. return;
  194. } else {
  195. if (learun.checkrow(keyValue)) {
  196. learun.layerForm({
  197. id: 'form',
  198. title: '学费变更',
  199. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/HelpChange?keyValue=' + keyValue,
  200. width: 600,
  201. height: 400,
  202. callBack: function (id) {
  203. var res = false;
  204. // 验证数据
  205. res = top[id].validForm();
  206. // 保存数据
  207. if (res) {
  208. res = top[id].save('', function () {
  209. page.search();
  210. });
  211. }
  212. return res;
  213. }
  214. });
  215. }
  216. }
  217. });
  218. },
  219. // 初始化列表
  220. initGird: function () {
  221. $('#gridtable').jfGrid({
  222. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  223. headData: [
  224. { label: "姓名", name: "StuName", width: 100, align: "left" },
  225. {
  226. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  227. learun.clientdata.getAsync('custmerData', {
  228. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  229. key: value,
  230. keyId: 'classno',
  231. callback: function (_data) {
  232. callback(_data['classname']);
  233. }
  234. });
  235. }
  236. },
  237. {
  238. label: "录取方式", name: "Admissions", width: 100, align: "left",
  239. formatterAsync: function (callback, value, row, op, $cell) {
  240. learun.clientdata.getAsync('dataItem', {
  241. key: value,
  242. code: 'enrollType',
  243. callback: function (_data) {
  244. callback(_data.text);
  245. }
  246. });
  247. }
  248. },
  249. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  250. {
  251. label: "招生类别", name: "EnrollType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  252. learun.clientdata.getAsync('dataItem', {
  253. key: value,
  254. code: 'EnrollStudentType',
  255. callback: function (_data) {
  256. if (_data.text == "计划外") {
  257. callback('<span class=\"label label-success\" style=\"background:#DC143C\">计划外</span>')
  258. } else {
  259. callback(_data.text);
  260. }
  261. }
  262. });
  263. }
  264. },
  265. {
  266. label: "免学费", name: "IsSubsidize1", width: 100, align: "left", formatter: function (value, row) {
  267. if (row.IsSubsidize1) {
  268. return '<span class=\"label label-success\">是</span>';
  269. } else if (row.IsSubsidize1 == false) {
  270. return '<span class=\"label label-warning\">否</span>';
  271. } else {
  272. return "未处理";
  273. }
  274. }
  275. },
  276. {
  277. label: "是否上传资料", name: "SubsidizeUrl", width: 100, align: "left", formatter: function (value) {
  278. if (value) {
  279. return '<span class=\"label label-success\">已上传</span>';
  280. } else {
  281. return '<span class=\"label label-warning\">未上传</span>';
  282. }
  283. }
  284. },
  285. {
  286. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  287. return value == "1" ? "男" : "女";
  288. }
  289. },
  290. {
  291. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  292. learun.clientdata.getAsync('dataItem', {
  293. key: value,
  294. code: 'National',
  295. callback: function (_data) {
  296. callback(_data.text);
  297. }
  298. });
  299. }
  300. },
  301. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val, 'yyyy-MM-dd') } },
  302. { label: "身份证", name: "IDCard", width: 150, align: "left" },
  303. {
  304. label: "政治面貌", name: "Political", width: 100, align: "left",
  305. formatterAsync: function (callback, value, row, op, $cell) {
  306. learun.clientdata.getAsync('dataItem', {
  307. key: value,
  308. code: 'BCdPartyFace',
  309. callback: function (_data) {
  310. callback(_data.text);
  311. }
  312. });
  313. }
  314. },
  315. {
  316. label: "届别", name: "FreshType", width: 100, align: "left",
  317. formatterAsync: function (callback, value, row, op, $cell) {
  318. learun.clientdata.getAsync('dataItem', {
  319. key: value,
  320. code: 'timeType',
  321. callback: function (_data) {
  322. callback(_data.text);
  323. }
  324. });
  325. }
  326. },
  327. {
  328. label: "户别", name: "ResidenceType", width: 100, align: "left",
  329. formatterAsync: function (callback, value, row, op, $cell) {
  330. learun.clientdata.getAsync('dataItem', {
  331. key: value,
  332. code: 'HouseholdCategory',
  333. callback: function (_data) {
  334. callback(_data.text);
  335. }
  336. });
  337. }
  338. },
  339. {
  340. label: "考生类别", name: "StuType", width: 100, align: "left",
  341. formatterAsync: function (callback, value, row, op, $cell) {
  342. learun.clientdata.getAsync('dataItem', {
  343. key: value,
  344. code: 'stuType',
  345. callback: function (_data) {
  346. callback(_data.text);
  347. }
  348. });
  349. }
  350. },
  351. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  352. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  353. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  354. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  355. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  356. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  357. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  358. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  359. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  360. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  361. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  362. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  363. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  364. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  365. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  366. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  367. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  368. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  369. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  370. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  371. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  372. ],
  373. isMultiselect: true,
  374. mainId: 'StuId',
  375. isPage: true
  376. });
  377. page.search();
  378. },
  379. refreshMoney: function (queryJson) {
  380. learun.httpAsyncGetWithParam(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetMilitaryStatistics', { queryJson: queryJson,type:2 }, function (res) {
  381. //console.log(res);
  382. $("#allAmount").html(res.data.aa);
  383. $("#isAmount").html(res.data.bb);
  384. });
  385. //$.post(
  386. // top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetHelpStatistics',
  387. // {
  388. // DeptNo: deptNo,
  389. // MajorNo: majorNo,
  390. // ClassNo: classNo
  391. // },
  392. // function (res) {
  393. // $("#allAmount").html(res.data.aa);
  394. // $("#isAmount").html(res.data.bb);
  395. // }, "json");
  396. },
  397. search: function (param) {
  398. param = param || {};
  399. param.SqlParameter = ' AND IsReport=1';
  400. if (!param.Grade && param.Grade == undefined) {
  401. param.Grade = NowGrade;
  402. }
  403. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  404. page.refreshMoney(JSON.stringify(param));
  405. }
  406. };
  407. refreshGirdData = function () {
  408. page.search();
  409. };
  410. page.init();
  411. }