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.
 
 
 
 
 
 

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