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.
 
 
 
 
 
 

357 lines
16 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.refreshMoney();
  19. page.search(queryJson);
  20. }, 380, 400);
  21. $("#IsMilitary").lrDataItemSelect({ code: "jyYewOrNot" });
  22. $('#Year').lrselect({
  23. url:top.$.rootUrl+'/EducationalAdministration/StuEnroll/GetYearListByClass',
  24. value:"year",
  25. text:"year",
  26. })
  27. $('#DeptNo').lrselect({
  28. allowSearch: true,
  29. value: "deptno",
  30. text: "deptname",
  31. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  32. select: function (item) {
  33. if (item) {
  34. $('#MajorNo').lrselectRefresh({
  35. allowSearch: true,
  36. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  37. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  38. });
  39. } else {
  40. $('#MajorNo').lrselectRefresh({
  41. allowSearch: true,
  42. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  43. param: { strWhere: "1=1 AND CheckMark=1" }
  44. });
  45. }
  46. }
  47. });
  48. $('#MajorNo').lrselect({
  49. allowSearch: true,
  50. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  51. value: "majorno",
  52. text: "majorname",
  53. param: { strWhere: "1=1 AND CheckMark=1" },
  54. select: function (item) {
  55. if (item) {
  56. $('#ClassNo').lrselectRefresh({
  57. allowSearch: true,
  58. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  59. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
  60. });
  61. } else {
  62. $('#ClassNo').lrselectRefresh({
  63. allowSearch: true,
  64. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  65. param: { strWhere: "1=1 AND CheckMark=1" }
  66. });
  67. }
  68. }
  69. });
  70. $('#ClassNo').lrselect({
  71. allowSearch: true,
  72. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  73. param: { strWhere: "1=1 AND CheckMark=1" },
  74. value: "classno",
  75. text: "classname"
  76. });
  77. // 刷新
  78. $('#lr_refresh').on('click', function () {
  79. location.reload();
  80. });
  81. // 打印
  82. $('#lr_print').on('click', function () {
  83. $('#gridtable').jqprintTable();
  84. });
  85. $('#lr_view').on('click', function () {
  86. var keyValue = $('#gridtable').jfGridValue('StuId');
  87. if (learun.checkrow(keyValue)) {
  88. learun.layerForm({
  89. id: 'form',
  90. title: '查看',
  91. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  92. width: 800,
  93. height: 600,
  94. btn: null
  95. });
  96. }
  97. });
  98. //上传资料
  99. $('#lr_uploadFile').on('click', function () {
  100. var keyValue = $('#gridtable').jfGridValue('StuId');
  101. if (learun.checkrow(keyValue)) {
  102. learun.layerForm({
  103. id: 'form',
  104. title: '编辑',
  105. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/MilitaryUrl?keyValue=' + keyValue,
  106. width: 600,
  107. height: 200,
  108. callBack: function (id) {
  109. return top[id].acceptClick(refreshGirdData);
  110. }
  111. });
  112. }
  113. });
  114. //确认军训
  115. $("#lr_allmilitary").on('click', function () {
  116. learun.layerConfirm('是否确认全部军训!',
  117. function (res) {
  118. if (res) {
  119. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllMilitary',
  120. {},
  121. function (res) {
  122. refreshGirdData();
  123. });
  124. }
  125. });
  126. });
  127. //确认军训
  128. $("#lr_military").on('click', function () {
  129. var data = $('#gridtable').jfGridGet('rowdata');
  130. if (data.length > 0) {
  131. learun.layerConfirm('是否确认军训!',
  132. function (res) {
  133. if (res) {
  134. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Military',
  135. { stuId: JSON.stringify(data), status: true },
  136. function (res) {
  137. refreshGirdData();
  138. });
  139. }
  140. });
  141. }
  142. });
  143. //确认军训
  144. $("#lr_nomilitary").on('click', function () {
  145. var data = $('#gridtable').jfGridGet('rowdata');
  146. if (data.length > 0) {
  147. learun.layerConfirm('是否确认不军训!',
  148. function (res) {
  149. if (res) {
  150. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Military',
  151. { stuId: JSON.stringify(data), status: false },
  152. function (res) {
  153. refreshGirdData();
  154. });
  155. }
  156. });
  157. }
  158. });
  159. },
  160. // 初始化列表
  161. initGird: function () {
  162. $('#gridtable').lrAuthorizeJfGrid({
  163. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  164. headData: [
  165. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  166. { label: "姓名", name: "StuName", width: 100, align: "left" },
  167. {
  168. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  169. learun.clientdata.getAsync('custmerData', {
  170. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  171. key: value,
  172. keyId: 'classno',
  173. callback: function (_data) {
  174. callback(_data['classname']);
  175. }
  176. });
  177. }
  178. },
  179. {
  180. label: "是否军训", name: "IsMilitary", width: 100, align: "left",
  181. formatter: function (value, row) {
  182. if (row.IsMilitary) {
  183. return '<span class=\"label label-success\">军训</span>';
  184. } else if (row.IsMilitary==false) {
  185. return '<span class=\"label label-warning\">不军训</span>';
  186. } else {
  187. return "未处理";
  188. }
  189. }
  190. },
  191. {
  192. label: "是否上传资料", name: "MilitaryUrl", width: 100, align: "left",
  193. formatter: function (value) {
  194. if (value) {
  195. return '<span class=\"label label-success\">已上传</span>';
  196. } else {
  197. return '<span class=\"label label-warning\">未上传</span>';
  198. }
  199. }
  200. },
  201. {
  202. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  203. return value == "1" ? "男" : "女";
  204. }
  205. },
  206. {
  207. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  208. learun.clientdata.getAsync('custmerData', {
  209. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdNationality',
  210. key: value,
  211. keyId: 'nationalityno',
  212. callback: function (_data) {
  213. callback(_data['nationality']);
  214. }
  215. });
  216. }
  217. },
  218. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return val.substring(0, 10); } },
  219. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  220. {
  221. label: "政治面貌", name: "Political", width: 100, align: "left",
  222. formatterAsync: function (callback, value, row, op, $cell) {
  223. learun.clientdata.getAsync('custmerData', {
  224. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdPartyFace',
  225. key: value,
  226. keyId: 'partyfaceno',
  227. callback: function (_data) {
  228. callback(_data['partyface']);
  229. }
  230. });
  231. }
  232. },
  233. {
  234. label: "届别", name: "FreshType", width: 100, align: "left",
  235. formatterAsync: function (callback, value, row, op, $cell) {
  236. learun.clientdata.getAsync('dataItem', {
  237. key: value,
  238. code: 'timeType',
  239. callback: function (_data) {
  240. callback(_data.text);
  241. }
  242. });
  243. }
  244. },
  245. {
  246. label: "户别", name: "ResidenceType", width: 100, align: "left",
  247. formatterAsync: function (callback, value, row, op, $cell) {
  248. learun.clientdata.getAsync('dataItem', {
  249. key: value,
  250. code: 'HouseholdCategory',
  251. callback: function (_data) {
  252. callback(_data.text);
  253. }
  254. });
  255. }
  256. },
  257. {
  258. label: "考生类别", name: "StuType", width: 100, align: "left",
  259. formatterAsync: function (callback, value, row, op, $cell) {
  260. learun.clientdata.getAsync('dataItem', {
  261. key: value,
  262. code: 'stuType',
  263. callback: function (_data) {
  264. callback(_data.text);
  265. }
  266. });
  267. }
  268. },
  269. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  270. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  271. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  272. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  273. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  274. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  275. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  276. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  277. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  278. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  279. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  280. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  281. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  282. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  283. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  284. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  285. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  286. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  287. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  288. {
  289. label: "录取方式", name: "Admissions", width: 100, align: "left",
  290. formatterAsync: function (callback, value, row, op, $cell) {
  291. learun.clientdata.getAsync('dataItem', {
  292. key: value,
  293. code: 'enrollType',
  294. callback: function (_data) {
  295. callback(_data.text);
  296. }
  297. });
  298. }
  299. },
  300. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  301. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  302. ],
  303. mainId: 'StuId',
  304. isMultiselect: true,
  305. isPage: true
  306. });
  307. page.search();
  308. },
  309. refreshMoney: function () {
  310. var deptNo = $("#DeptNo").lrselectGet();
  311. var majorNo = $("#MajorNo").lrselectGet();
  312. var classNo = $("#ClassNo").lrselectGet();
  313. $.post(
  314. top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetMilitaryStatistics',
  315. {
  316. DeptNo: deptNo,
  317. MajorNo: majorNo,
  318. ClassNo: classNo
  319. },
  320. function (res) {
  321. $("#allAmount").html(res.data.aa);
  322. $("#isAmount").html(res.data.bb);
  323. }, "json");
  324. },
  325. search: function (param) {
  326. param = param || {};
  327. param.SqlParameter = ' AND IsReport=1';
  328. param.Grade = "20";
  329. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  330. }
  331. };
  332. refreshGirdData = function () {
  333. page.search();
  334. };
  335. page.init();
  336. }