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.

Report.js 19 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  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. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return val.substring(0, 10); } },
  279. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  280. {
  281. label: "政治面貌", name: "Political", width: 100, align: "left",
  282. formatterAsync: function (callback, value, row, op, $cell) {
  283. learun.clientdata.getAsync('dataItem', {
  284. key: value,
  285. code: 'BCdPartyFace',
  286. callback: function (_data) {
  287. callback(_data.text);
  288. }
  289. });
  290. }
  291. },
  292. {
  293. label: "届别", name: "FreshType", width: 100, align: "left",
  294. formatterAsync: function (callback, value, row, op, $cell) {
  295. learun.clientdata.getAsync('dataItem', {
  296. key: value,
  297. code: 'timeType',
  298. callback: function (_data) {
  299. callback(_data.text);
  300. }
  301. });
  302. }
  303. },
  304. {
  305. label: "户别", name: "ResidenceType", width: 100, align: "left",
  306. formatterAsync: function (callback, value, row, op, $cell) {
  307. learun.clientdata.getAsync('dataItem', {
  308. key: value,
  309. code: 'HouseholdCategory',
  310. callback: function (_data) {
  311. callback(_data.text);
  312. }
  313. });
  314. }
  315. },
  316. {
  317. label: "考生类别", name: "StuType", width: 100, align: "left",
  318. formatterAsync: function (callback, value, row, op, $cell) {
  319. learun.clientdata.getAsync('dataItem', {
  320. key: value,
  321. code: 'stuType',
  322. callback: function (_data) {
  323. callback(_data.text);
  324. }
  325. });
  326. }
  327. },
  328. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  329. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  330. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  331. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  332. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  333. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  334. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  335. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  336. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  337. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  338. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  339. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  340. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  341. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  342. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  343. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  344. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  345. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  346. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  347. {
  348. label: "录取方式", name: "Admissions", width: 100, align: "left",
  349. formatterAsync: function (callback, value, row, op, $cell) {
  350. learun.clientdata.getAsync('dataItem', {
  351. key: value,
  352. code: 'enrollType',
  353. callback: function (_data) {
  354. callback(_data.text);
  355. }
  356. });
  357. }
  358. },
  359. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  360. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  361. ],
  362. isMultiselect: true,
  363. mainId: 'StuId',
  364. isPage: true
  365. });
  366. page.search();
  367. },
  368. search: function (param) {
  369. param = param || {};
  370. param.Grade = "20";
  371. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  372. }
  373. };
  374. refreshGirdData = function () {
  375. page.search();
  376. };
  377. page.init();
  378. }