選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

PayAfter.js 19 KiB

4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  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. $("#IsMilitary").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_stay").on('click', function () {
  105. var data = $('#gridtable').jfGridGet('rowdata');
  106. if (data.length > 0) {
  107. learun.layerConfirm('是否确认此学生住宿!',
  108. function (res) {
  109. if (res) {
  110. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Stay',
  111. { stuId: JSON.stringify(data), status: true, payAfter: true },
  112. function (res) {
  113. refreshGirdData();
  114. });
  115. }
  116. });
  117. }
  118. });
  119. $("#lr_nostay").on("click", function () {
  120. var data = $('#gridtable').jfGridGet('rowdata');
  121. if (data.length > 0) {
  122. learun.layerConfirm('是否确认此学生走读',
  123. function (res) {
  124. if (res) {
  125. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Stay',
  126. { stuId: JSON.stringify(data), status: false, payAfter: true },
  127. function (res) {
  128. refreshGirdData();
  129. });
  130. }
  131. });
  132. }
  133. });
  134. //确认资助
  135. $("#lr_help").on('click', function () {
  136. var data = $('#gridtable').jfGridGet('rowdata');
  137. if (data.length > 0) {
  138. learun.layerConfirm('是否确认资助!',
  139. function (res) {
  140. if (res) {
  141. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Help',
  142. { stuId: JSON.stringify(data), status: true, payAfter: true },
  143. function (res) {
  144. refreshGirdData();
  145. });
  146. }
  147. });
  148. }
  149. });
  150. //确认资助
  151. $("#lr_nohelp").on('click', function () {
  152. var data = $('#gridtable').jfGridGet('rowdata');
  153. if (data.length > 0) {
  154. learun.layerConfirm('是否确认不资助!',
  155. function (res) {
  156. if (res) {
  157. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Help',
  158. { stuId: JSON.stringify(data), status: false, payAfter: true },
  159. function (res) {
  160. refreshGirdData();
  161. });
  162. }
  163. });
  164. }
  165. });
  166. //确认军训
  167. $("#lr_military").on('click', function () {
  168. var data = $('#gridtable').jfGridGet('rowdata');
  169. if (data.length > 0) {
  170. learun.layerConfirm('是否确认军训!',
  171. function (res) {
  172. if (res) {
  173. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Military',
  174. { stuId: JSON.stringify(data), status: true, payAfter: true },
  175. function (res) {
  176. refreshGirdData();
  177. });
  178. }
  179. });
  180. }
  181. });
  182. //确认军训
  183. $("#lr_nomilitary").on('click', function () {
  184. var data = $('#gridtable').jfGridGet('rowdata');
  185. if (data.length > 0) {
  186. learun.layerConfirm('是否确认不军训!',
  187. function (res) {
  188. if (res) {
  189. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Military',
  190. { stuId: JSON.stringify(data), status: false, payAfter: true },
  191. function (res) {
  192. refreshGirdData();
  193. });
  194. }
  195. });
  196. }
  197. });
  198. //学生同步
  199. $("#lr_synchronization").on('click', function () {
  200. learun.layerConfirm('是否同步学生数据!',
  201. function (res) {
  202. if (res) {
  203. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Synchronization',
  204. { },
  205. function (res) {
  206. refreshGirdData();
  207. });
  208. }
  209. });
  210. });
  211. },
  212. // 初始化列表
  213. initGird: function () {
  214. $('#gridtable').lrAuthorizeJfGrid({
  215. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  216. headData: [
  217. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  218. { label: "姓名", name: "StuName", width: 100, align: "left" },
  219. {
  220. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  221. learun.clientdata.getAsync('custmerData', {
  222. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  223. key: value,
  224. keyId: 'classno',
  225. callback: function (_data) {
  226. callback(_data['classname']);
  227. }
  228. });
  229. }
  230. },
  231. {
  232. label: "是否住宿", name: "IsCheckIn2", width: 100, align: "left",
  233. formatter: function (value, row) {
  234. if (row.IsCheckIn2) {
  235. return '<span class=\"label label-success\">住宿</span>';
  236. } else if (row.IsCheckIn2 == false) {
  237. return '<span class=\"label label-warning\">走读</span>';
  238. } else {
  239. return "未处理";
  240. }
  241. }
  242. },
  243. {
  244. label: "是否资助", name: "IsSubsidize12", width: 100, align: "left", formatter: function (value, row) {
  245. if (row.IsSubsidize12) {
  246. return '<span class=\"label label-success\">资助</span>';
  247. } else if (row.IsSubsidize12 == false) {
  248. return '<span class=\"label label-warning\">不资助</span>';
  249. } else {
  250. return "未处理";
  251. }
  252. }
  253. },
  254. {
  255. label: "是否军训", name: "IsMilitary2", width: 100, align: "left",
  256. formatter: function (value, row) {
  257. if (row.IsMilitary2) {
  258. return '<span class=\"label label-success\">军训</span>';
  259. } else if (row.IsMilitary2 == false) {
  260. return '<span class=\"label label-warning\">不军训</span>';
  261. } else {
  262. return "未处理";
  263. }
  264. }
  265. },
  266. {
  267. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  268. return value == "1" ? "男" : "女";
  269. }
  270. },
  271. {
  272. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  273. learun.clientdata.getAsync('dataItem', {
  274. key: value,
  275. code: 'National',
  276. callback: function (_data) {
  277. callback(_data.text);
  278. }
  279. });
  280. }
  281. },
  282. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val, 'yyyy-MM-dd') } },
  283. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  284. {
  285. label: "政治面貌", name: "Political", width: 100, align: "left",
  286. formatterAsync: function (callback, value, row, op, $cell) {
  287. learun.clientdata.getAsync('dataItem', {
  288. key: value,
  289. code: 'PolityStatus',
  290. callback: function (_data) {
  291. callback(_data.text);
  292. }
  293. });
  294. }
  295. },
  296. {
  297. label: "届别", name: "FreshType", width: 100, align: "left",
  298. formatterAsync: function (callback, value, row, op, $cell) {
  299. learun.clientdata.getAsync('dataItem', {
  300. key: value,
  301. code: 'timeType',
  302. callback: function (_data) {
  303. callback(_data.text);
  304. }
  305. });
  306. }
  307. },
  308. {
  309. label: "户别", name: "ResidenceType", width: 100, align: "left",
  310. formatterAsync: function (callback, value, row, op, $cell) {
  311. learun.clientdata.getAsync('dataItem', {
  312. key: value,
  313. code: 'HouseholdCategory',
  314. callback: function (_data) {
  315. callback(_data.text);
  316. }
  317. });
  318. }
  319. },
  320. {
  321. label: "考生类别", name: "StuType", width: 100, align: "left",
  322. formatterAsync: function (callback, value, row, op, $cell) {
  323. learun.clientdata.getAsync('dataItem', {
  324. key: value,
  325. code: 'stuType',
  326. callback: function (_data) {
  327. callback(_data.text);
  328. }
  329. });
  330. }
  331. },
  332. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  333. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  334. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  335. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  336. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  337. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  338. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  339. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  340. {
  341. label: "录取方式", name: "Admissions", width: 100, align: "left",
  342. formatterAsync: function (callback, value, row, op, $cell) {
  343. learun.clientdata.getAsync('dataItem', {
  344. key: value,
  345. code: 'enrollType',
  346. callback: function (_data) {
  347. callback(_data.text);
  348. }
  349. });
  350. }
  351. },
  352. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  353. ],
  354. mainId: 'StuId',
  355. isMultiselect: true,
  356. isPage: true
  357. });
  358. page.search();
  359. },
  360. refreshMoney: function () {
  361. var deptNo = $("#DeptNo").lrselectGet();
  362. var majorNo = $("#MajorNo").lrselectGet();
  363. var classNo = $("#ClassNo").lrselectGet();
  364. $.post(
  365. top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetMilitaryStatistics',
  366. {
  367. DeptNo: deptNo,
  368. MajorNo: majorNo,
  369. ClassNo: classNo
  370. },
  371. function (res) {
  372. $("#allAmount").html(res.data.aa);
  373. $("#isAmount").html(res.data.bb);
  374. }, "json");
  375. },
  376. search: function (param) {
  377. param = param || {};
  378. param.SqlParameter = ' AND IsReport=1';
  379. if (!param.Grade && param.Grade == undefined) {
  380. param.Grade = NowGrade;
  381. }
  382. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  383. }
  384. };
  385. refreshGirdData = function () {
  386. page.search();
  387. };
  388. page.init();
  389. }