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.
 
 
 
 
 
 

365 lines
17 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. }, 380, 400);
  24. $("#IsPay").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_actual').on('click', function () {
  87. var keyValue = $('#gridtable').jfGridValue('StuId');
  88. var keyValue1 = $('#gridtable').jfGridValue('ActualPayAmount');
  89. if (learun.checkrow(keyValue)) {
  90. if (!keyValue1) {
  91. learun.layerForm({
  92. id: 'form',
  93. title: '实收金额',
  94. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/AmountForm?keyValue=' + keyValue,
  95. width: 400,
  96. height: 200,
  97. callBack: function (id) {
  98. return top[id].acceptClick(refreshGirdData);
  99. }
  100. });
  101. } else {
  102. learun.alert.warning('已经录入过实收金额了!');
  103. }
  104. }
  105. })
  106. //金额变动记录
  107. $('#lr_amountRecord').on('click', function () {
  108. var data = $('#gridtable').jfGridGet('rowdata');
  109. if (data.length > 1) {
  110. learun.alert.warning('只能选择一个学生查看!');
  111. return;
  112. }
  113. var keyValue = $('#gridtable').jfGridValue('StuId');
  114. if (learun.checkrow(keyValue)) {
  115. learun.layerFormForPercent({
  116. id: 'form',
  117. title: '实收金额',
  118. url: top.$.rootUrl + '/EducationalAdministration/StuEnrollAmountRecord/Index?keyValue=' + keyValue,
  119. width: "80%",
  120. height: '80%',
  121. btn: null
  122. });
  123. }
  124. })
  125. $('#lr_view').on('click', function () {
  126. var keyValue = $('#gridtable').jfGridValue('StuId');
  127. if (learun.checkrow(keyValue)) {
  128. learun.layerForm({
  129. id: 'form',
  130. title: '查看',
  131. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  132. width: 800,
  133. height: 600,
  134. btn: null
  135. });
  136. }
  137. });
  138. //新生缴费
  139. $("#lr_pay").on('click', function () {
  140. var data = $('#gridtable').jfGridGet('rowdata');
  141. if (data.length > 0) {
  142. learun.layerConfirm('是否确认缴费!',
  143. function (res) {
  144. if (res) {
  145. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/IsPay',
  146. { stuId: JSON.stringify(data), status: true },
  147. function (res) {
  148. refreshGirdData();
  149. });
  150. }
  151. });
  152. }
  153. });
  154. //取消缴费
  155. $("#lr_nopay").on('click', function () {
  156. var data = $('#gridtable').jfGridGet('rowdata');
  157. if (data.length > 0) {
  158. learun.layerConfirm('是否取消缴费!',
  159. function (res) {
  160. if (res) {
  161. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/IsPay',
  162. { stuId: JSON.stringify(data), status: false },
  163. function (res) {
  164. refreshGirdData();
  165. });
  166. }
  167. });
  168. }
  169. });
  170. //生成应缴金额
  171. $("#lr_getmoney").on('click', function () {
  172. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetMoney',
  173. {},
  174. function (res) {
  175. refreshGirdData();
  176. });
  177. });
  178. },
  179. // 初始化列表
  180. initGird: function () {
  181. $('#gridtable').lrAuthorizeJfGrid({
  182. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  183. headData: [
  184. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  185. {
  186. label: "缴费状态", name: "IsPay", width: 60, align: "left", formatter: function (val, row) {
  187. if (row.IsPay) {
  188. return '<span class=\"label label-success\">缴费</span>';
  189. } else if (row.IsPay == false) {
  190. return '<span class=\"label label-warning\">未缴费</span>';
  191. }
  192. else {
  193. return "未处理";
  194. }
  195. }
  196. },
  197. { label: "姓名", name: "StuName", width: 100, align: "left" },
  198. {
  199. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  200. learun.clientdata.getAsync('custmerData', {
  201. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  202. key: value,
  203. keyId: 'classno',
  204. callback: function (_data) {
  205. callback(_data['classname']);
  206. }
  207. });
  208. }
  209. },
  210. { label: "应缴金额", name: "PayAmount", width: 100, align: "left" },
  211. { label: "实收金额", name: "ActualPayAmount", width: 100, align: "left" },
  212. {
  213. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  214. return value == "1" ? "男" : "女";
  215. }
  216. },
  217. {
  218. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  219. learun.clientdata.getAsync('dataItem', {
  220. key: value,
  221. code: 'National',
  222. callback: function (_data) {
  223. callback(_data.text);
  224. }
  225. });
  226. }
  227. },
  228. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val, 'yyyy-MM-dd') } },
  229. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  230. {
  231. label: "政治面貌", name: "Political", width: 100, align: "left",
  232. formatterAsync: function (callback, value, row, op, $cell) {
  233. learun.clientdata.getAsync('dataItem', {
  234. key: value,
  235. code: 'PolityStatus',
  236. callback: function (_data) {
  237. callback(_data.text);
  238. }
  239. });
  240. }
  241. },
  242. {
  243. label: "届别", name: "FreshType", width: 100, align: "left",
  244. formatterAsync: function (callback, value, row, op, $cell) {
  245. learun.clientdata.getAsync('dataItem', {
  246. key: value,
  247. code: 'timeType',
  248. callback: function (_data) {
  249. callback(_data.text);
  250. }
  251. });
  252. }
  253. },
  254. {
  255. label: "户别", name: "ResidenceType", width: 100, align: "left",
  256. formatterAsync: function (callback, value, row, op, $cell) {
  257. learun.clientdata.getAsync('dataItem', {
  258. key: value,
  259. code: 'HouseholdCategory',
  260. callback: function (_data) {
  261. callback(_data.text);
  262. }
  263. });
  264. }
  265. },
  266. {
  267. label: "考生类别", name: "StuType", width: 100, align: "left",
  268. formatterAsync: function (callback, value, row, op, $cell) {
  269. learun.clientdata.getAsync('dataItem', {
  270. key: value,
  271. code: 'stuType',
  272. callback: function (_data) {
  273. callback(_data.text);
  274. }
  275. });
  276. }
  277. },
  278. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  279. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  280. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  281. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  282. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  283. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  284. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  285. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  286. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  287. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  288. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  289. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  290. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  291. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  292. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  293. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  294. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  295. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  296. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  297. {
  298. label: "录取方式", name: "Admissions", width: 100, align: "left",
  299. formatterAsync: function (callback, value, row, op, $cell) {
  300. learun.clientdata.getAsync('dataItem', {
  301. key: value,
  302. code: 'enrollType',
  303. callback: function (_data) {
  304. callback(_data.text);
  305. }
  306. });
  307. }
  308. },
  309. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  310. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  311. ],
  312. mainId: 'StuId',
  313. isMultiselect: true,
  314. isPage: true
  315. });
  316. page.search();
  317. },
  318. refreshMoney: function () {
  319. //learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPaymentInfo',
  320. // {},
  321. // function (res) {
  322. // });
  323. $.post(
  324. top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPaymentInfo',
  325. function (res) {
  326. $("#allAmount").html(res.data.a);
  327. $("#isAmount").html(res.data.b);
  328. }, "json");
  329. },
  330. search: function (param) {
  331. param = param || {};
  332. //param.SqlParameter = ' AND IsCheckIn IS NOT NULL AND IsSubsidize1 IS NOT NULL';
  333. param.SqlParameter = ' AND IsReport=1';
  334. if (!param.Grade && param.Grade == undefined) {
  335. param.Grade = NowGrade;
  336. }
  337. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  338. }
  339. };
  340. refreshGirdData = function () {
  341. page.search();
  342. };
  343. page.init();
  344. }