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.
 
 
 
 
 
 

413 lines
20 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. },
  19. bind: function () {
  20. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  21. page.search(queryJson);
  22. }, 400, 400);
  23. $("#IsReport").lrDataItemSelect({ code: "jyYewOrNot" });
  24. $('#Grade').lrselect({
  25. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
  26. value: "year",
  27. text: "year",
  28. });
  29. $('#Grade').lrselectSet(NowGrade);
  30. $('#Admissions').lrDataItemSelect({ code: 'enrollType' });
  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_add').on('click', function () {
  87. learun.layerForm({
  88. id: 'form',
  89. title: '新增',
  90. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/Form',
  91. width: 800,
  92. height: 600,
  93. callBack: function (id) {
  94. return top[id].acceptClick(refreshGirdData);
  95. }
  96. });
  97. });
  98. // 打印
  99. $('#lr_print').on('click', function () {
  100. $('#gridtable').jqprintTable();
  101. });
  102. $('#lr_view').on('click', function () {
  103. var keyValue = $('#gridtable').jfGridValue('StuId');
  104. if (learun.checkrow(keyValue)) {
  105. learun.layerForm({
  106. id: 'form',
  107. title: '查看',
  108. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  109. width: 800,
  110. height: 600,
  111. btn: null
  112. });
  113. }
  114. });
  115. //确认报到
  116. $("#lr_allreport").on('click',
  117. function () {
  118. learun.layerConfirm('是否全部报到!',
  119. function (res) {
  120. if (res) {
  121. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllReport',
  122. {},
  123. function (res) {
  124. refreshGirdData();
  125. });
  126. }
  127. });
  128. });
  129. //签订
  130. $("#lr_sign").on('click',
  131. function () {
  132. var data = $('#gridtable').jfGridGet('rowdata');
  133. if (data.length > 0) {
  134. learun.layerConfirm('是否确认签订!',
  135. function (res) {
  136. if (res) {
  137. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Sign',
  138. { stuId: JSON.stringify(data), status: true },
  139. function (res) {
  140. refreshGirdData();
  141. });
  142. }
  143. });
  144. }
  145. });
  146. //确认报到
  147. $("#lr_nosign").on('click',
  148. function () {
  149. var data = $('#gridtable').jfGridGet('rowdata');
  150. if (data.length > 0) {
  151. learun.layerConfirm('是否确认未签订!',
  152. function (res) {
  153. if (res) {
  154. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Sign',
  155. { stuId: JSON.stringify(data), status: false },
  156. function (res) {
  157. refreshGirdData();
  158. });
  159. }
  160. });
  161. }
  162. });
  163. //确认报到
  164. $("#lr_report").on('click',
  165. function () {
  166. var data = $('#gridtable').jfGridGet('rowdata');
  167. if (data.length > 0) {
  168. learun.layerConfirm('是否确认报到!',
  169. function (res) {
  170. if (res) {
  171. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Report',
  172. { stuId: JSON.stringify(data), status: true },
  173. function (res) {
  174. refreshGirdData();
  175. });
  176. }
  177. });
  178. }
  179. });
  180. //确认报到
  181. $("#lr_noreport").on('click',
  182. function () {
  183. var data = $('#gridtable').jfGridGet('rowdata');
  184. if (data.length > 0) {
  185. learun.layerConfirm('是否确认未报到!',
  186. function (res) {
  187. if (res) {
  188. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Report',
  189. { stuId: JSON.stringify(data), status: false },
  190. function (res) {
  191. refreshGirdData();
  192. });
  193. }
  194. });
  195. }
  196. });
  197. //生成帐号
  198. $('#lr_generate').on('click', function () {
  199. learun.layerConfirm('是否确认生成帐号?', function (res) {
  200. if (res) {
  201. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Generate', {}, function () {
  202. refreshGirdData();
  203. });
  204. }
  205. });
  206. });
  207. },
  208. // 初始化列表
  209. initGird: function () {
  210. $('#gridtable').lrAuthorizeJfGrid({
  211. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetReportPageList',
  212. headData: [
  213. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  214. { label: "姓名", name: "StuName", width: 100, align: "left" },
  215. {
  216. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  217. learun.clientdata.getAsync('custmerData', {
  218. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  219. key: value,
  220. keyId: 'classno',
  221. callback: function (_data) {
  222. callback(_data['classname']);
  223. }
  224. });
  225. }
  226. },
  227. {
  228. label: "安全协议", name: "SecurityAgreement", width: 100, align: "left",
  229. formatter: function (value, row, drop) {
  230. if (row.SecurityAgreement) {
  231. return '<span class=\"label label-success\">已签</span>';
  232. } else if (row.SecurityAgreement == false) {
  233. return '<span class=\"label label-warning\">未签</span>';
  234. }
  235. else {
  236. return "未签";
  237. }
  238. }
  239. },
  240. {
  241. label: "是否报到", name: "IsReport", width: 100, align: "left",
  242. formatter: function (value, row, drop) {
  243. if (row.IsReport) {
  244. return '<span class=\"label label-success\">报到</span>';
  245. } else if (row.IsReport == false) {
  246. return '<span class=\"label label-warning\">未报到</span>';
  247. }
  248. else {
  249. return "未处理";
  250. }
  251. }
  252. },
  253. {
  254. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  255. return value == "1" ? "男" : "女";
  256. }
  257. },
  258. {
  259. label: "宿舍", name: "DormitoryName", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  260. learun.clientdata.getAsync('custmerData', {
  261. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DormitoryInfo',
  262. key: value,
  263. keyId: 'planclassno',
  264. callback: function (_data) {
  265. callback(_data['name']);
  266. }
  267. });
  268. }
  269. },
  270. //{
  271. // label: "床位", name: "StuId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  272. // learun.clientdata.getAsync('custmerData', {
  273. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PlanBedInfo',
  274. // key: value,
  275. // keyId: 'planstudentid',
  276. // callback: function (_data) {
  277. // callback(_data['name']);
  278. // }
  279. // });
  280. // }
  281. //},
  282. {
  283. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  284. learun.clientdata.getAsync('dataItem', {
  285. key: value,
  286. code: 'National',
  287. callback: function (_data) {
  288. callback(_data.text);
  289. }
  290. });
  291. }
  292. },
  293. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val,'yyyy-MM-dd') } },
  294. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  295. {
  296. label: "政治面貌", name: "Political", width: 100, align: "left",
  297. formatterAsync: function (callback, value, row, op, $cell) {
  298. learun.clientdata.getAsync('dataItem', {
  299. key: value,
  300. code: 'PolityStatus',
  301. callback: function (_data) {
  302. callback(_data.text);
  303. }
  304. });
  305. }
  306. },
  307. {
  308. label: "届别", name: "FreshType", width: 100, align: "left",
  309. formatterAsync: function (callback, value, row, op, $cell) {
  310. learun.clientdata.getAsync('dataItem', {
  311. key: value,
  312. code: 'timeType',
  313. callback: function (_data) {
  314. callback(_data.text);
  315. }
  316. });
  317. }
  318. },
  319. {
  320. label: "户别", name: "ResidenceType", width: 100, align: "left",
  321. formatterAsync: function (callback, value, row, op, $cell) {
  322. learun.clientdata.getAsync('dataItem', {
  323. key: value,
  324. code: 'HouseholdCategory',
  325. callback: function (_data) {
  326. callback(_data.text);
  327. }
  328. });
  329. }
  330. },
  331. {
  332. label: "考生类别", name: "StuType", width: 100, align: "left",
  333. formatterAsync: function (callback, value, row, op, $cell) {
  334. learun.clientdata.getAsync('dataItem', {
  335. key: value,
  336. code: 'stuType',
  337. callback: function (_data) {
  338. callback(_data.text);
  339. }
  340. });
  341. }
  342. },
  343. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  344. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  345. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  346. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  347. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  348. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  349. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  350. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  351. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  352. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  353. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  354. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  355. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  356. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  357. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  358. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  359. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  360. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  361. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  362. {
  363. label: "录取方式", name: "Admissions", width: 100, align: "left",
  364. formatterAsync: function (callback, value, row, op, $cell) {
  365. learun.clientdata.getAsync('dataItem', {
  366. key: value,
  367. code: 'enrollType',
  368. callback: function (_data) {
  369. callback(_data.text);
  370. }
  371. });
  372. }
  373. },
  374. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  375. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  376. ],
  377. isMultiselect: true,
  378. mainId: 'StuId',
  379. isPage: true
  380. });
  381. page.search();
  382. },
  383. search: function (param) {
  384. param = param || {};
  385. if (!param.Grade && param.Grade == undefined) {
  386. param.Grade = NowGrade;
  387. }
  388. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  389. }
  390. };
  391. refreshGirdData = function () {
  392. page.search();
  393. };
  394. page.init();
  395. }