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.
 
 
 
 
 
 

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