Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

Report.js 18 KiB

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