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.
 
 
 
 
 
 

371 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.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_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/MilitaryUrl?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_allmilitary").on('click', function () {
  121. learun.layerConfirm('是否确认全部军训!',
  122. function (res) {
  123. if (res) {
  124. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllMilitary',
  125. {},
  126. function (res) {
  127. refreshGirdData();
  128. });
  129. }
  130. });
  131. });
  132. //确认军训
  133. $("#lr_military").on('click', function () {
  134. var data = $('#gridtable').jfGridGet('rowdata');
  135. if (data.length > 0) {
  136. learun.layerConfirm('是否确认军训!',
  137. function (res) {
  138. if (res) {
  139. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Military',
  140. { stuId: JSON.stringify(data), status: true },
  141. function (res) {
  142. refreshGirdData();
  143. });
  144. }
  145. });
  146. }
  147. });
  148. //确认军训
  149. $("#lr_nomilitary").on('click', function () {
  150. var data = $('#gridtable').jfGridGet('rowdata');
  151. if (data.length > 0) {
  152. learun.layerConfirm('是否确认不军训!',
  153. function (res) {
  154. if (res) {
  155. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Military',
  156. { stuId: JSON.stringify(data), status: false },
  157. function (res) {
  158. refreshGirdData();
  159. });
  160. }
  161. });
  162. }
  163. });
  164. },
  165. // 初始化列表
  166. initGird: function () {
  167. $('#gridtable').lrAuthorizeJfGrid({
  168. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  169. headData: [
  170. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  171. { label: "姓名", name: "StuName", width: 100, align: "left" },
  172. {
  173. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  174. learun.clientdata.getAsync('custmerData', {
  175. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  176. key: value,
  177. keyId: 'classno',
  178. callback: function (_data) {
  179. callback(_data['classname']);
  180. }
  181. });
  182. }
  183. },
  184. {
  185. label: "是否军训", name: "IsMilitary", width: 100, align: "left",
  186. formatter: function (value, row) {
  187. if (row.IsMilitary) {
  188. return '<span class=\"label label-success\">军训</span>';
  189. } else if (row.IsMilitary == false) {
  190. return '<span class=\"label label-warning\">不军训</span>';
  191. } else {
  192. return "未处理";
  193. }
  194. }
  195. },
  196. {
  197. label: "是否上传资料", name: "MilitaryUrl", width: 100, align: "left",
  198. formatter: function (value) {
  199. if (value) {
  200. return '<span class=\"label label-success\">已上传</span>';
  201. } else {
  202. return '<span class=\"label label-warning\">未上传</span>';
  203. }
  204. }
  205. },
  206. {
  207. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  208. return value == "1" ? "男" : "女";
  209. }
  210. },
  211. {
  212. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  213. learun.clientdata.getAsync('dataItem', {
  214. key: value,
  215. code: 'National',
  216. callback: function (_data) {
  217. callback(_data.text);
  218. }
  219. });
  220. }
  221. },
  222. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val, 'yyyy-MM-dd') } },
  223. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  224. {
  225. label: "政治面貌", name: "Political", width: 100, align: "left",
  226. formatterAsync: function (callback, value, row, op, $cell) {
  227. learun.clientdata.getAsync('dataItem', {
  228. key: value,
  229. code: 'PolityStatus',
  230. callback: function (_data) {
  231. callback(_data.text);
  232. }
  233. });
  234. }
  235. },
  236. {
  237. label: "届别", name: "FreshType", width: 100, align: "left",
  238. formatterAsync: function (callback, value, row, op, $cell) {
  239. learun.clientdata.getAsync('dataItem', {
  240. key: value,
  241. code: 'timeType',
  242. callback: function (_data) {
  243. callback(_data.text);
  244. }
  245. });
  246. }
  247. },
  248. {
  249. label: "户别", name: "ResidenceType", width: 100, align: "left",
  250. formatterAsync: function (callback, value, row, op, $cell) {
  251. learun.clientdata.getAsync('dataItem', {
  252. key: value,
  253. code: 'HouseholdCategory',
  254. callback: function (_data) {
  255. callback(_data.text);
  256. }
  257. });
  258. }
  259. },
  260. {
  261. label: "考生类别", name: "StuType", width: 100, align: "left",
  262. formatterAsync: function (callback, value, row, op, $cell) {
  263. learun.clientdata.getAsync('dataItem', {
  264. key: value,
  265. code: 'stuType',
  266. callback: function (_data) {
  267. callback(_data.text);
  268. }
  269. });
  270. }
  271. },
  272. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  273. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  274. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  275. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  276. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  277. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  278. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  279. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  280. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  281. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  282. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  283. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  284. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  285. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  286. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  287. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  288. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  289. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  290. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  291. {
  292. label: "录取方式", name: "Admissions", width: 100, align: "left",
  293. formatterAsync: function (callback, value, row, op, $cell) {
  294. learun.clientdata.getAsync('dataItem', {
  295. key: value,
  296. code: 'enrollType',
  297. callback: function (_data) {
  298. callback(_data.text);
  299. }
  300. });
  301. }
  302. },
  303. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  304. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  305. ],
  306. mainId: 'StuId',
  307. isMultiselect: true,
  308. isPage: true
  309. });
  310. page.search();
  311. },
  312. refreshMoney: function (queryJson) {
  313. learun.httpAsyncGetWithParam(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetMilitaryStatistics', { queryJson: queryJson, type: 1 }, function (res) {
  314. $("#allAmount").html(res.data.aa);
  315. $("#isAmount").html(res.data.bb);
  316. });
  317. //var deptNo = $("#DeptNo").lrselectGet();
  318. //var majorNo = $("#MajorNo").lrselectGet();
  319. //var classNo = $("#ClassNo").lrselectGet();
  320. //$.post(
  321. // top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetMilitaryStatistics',
  322. // {
  323. // DeptNo: deptNo,
  324. // MajorNo: majorNo,
  325. // ClassNo: classNo
  326. // },
  327. // function (res) {
  328. // $("#allAmount").html(res.data.aa);
  329. // $("#isAmount").html(res.data.bb);
  330. // }, "json");
  331. },
  332. search: function (param) {
  333. param = param || {};
  334. param.SqlParameter = ' AND IsReport=1';
  335. if (!param.Grade && param.Grade == undefined) {
  336. param.Grade = NowGrade;
  337. }
  338. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  339. page.refreshMoney(JSON.stringify(param));
  340. }
  341. };
  342. refreshGirdData = function () {
  343. page.search();
  344. };
  345. page.init();
  346. }