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.

IsHelp.js 17 KiB

4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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.search(queryJson);
  19. page.refreshMoney();
  20. }, 380, 400);
  21. $("#IsSubsidize1").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/SubsidizeUrl?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_help").on('click', function () {
  116. var data = $('#gridtable').jfGridGet('rowdata');
  117. if (data.length > 0) {
  118. learun.layerConfirm('是否确认资助!',
  119. function (res) {
  120. if (res) {
  121. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Help',
  122. { stuId: JSON.stringify(data), status: true },
  123. function (res) {
  124. refreshGirdData();
  125. });
  126. }
  127. });
  128. }
  129. });
  130. //全部资助
  131. $("#lr_allhelp").on('click', function () {
  132. learun.layerConfirm('是否全部资助!',
  133. function (res) {
  134. if (res) {
  135. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllHelp',
  136. {},
  137. function (res) {
  138. refreshGirdData();
  139. });
  140. }
  141. });
  142. });
  143. //确认资助
  144. $("#lr_nohelp").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/Help',
  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: "StuName", width: 100, align: "left" },
  166. {
  167. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  168. learun.clientdata.getAsync('custmerData', {
  169. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  170. key: value,
  171. keyId: 'classno',
  172. callback: function (_data) {
  173. callback(_data['classname']);
  174. }
  175. });
  176. }
  177. },
  178. {
  179. label: "录取方式", name: "Admissions", width: 100, align: "left",
  180. formatterAsync: function (callback, value, row, op, $cell) {
  181. learun.clientdata.getAsync('dataItem', {
  182. key: value,
  183. code: 'enrollType',
  184. callback: function (_data) {
  185. callback(_data.text);
  186. }
  187. });
  188. }
  189. },
  190. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  191. {
  192. label: "招生类别", name: "EnrollType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  193. learun.clientdata.getAsync('dataItem', {
  194. key: value,
  195. code: 'EnrollStudentType',
  196. callback: function (_data) {
  197. if (_data.text == "计划外") {
  198. callback('<span class=\"label label-success\" style=\"background:#DC143C\">计划外</span>')
  199. } else {
  200. callback(_data.text);
  201. }
  202. }
  203. });
  204. }
  205. },
  206. {
  207. label: "是否资助", name: "IsSubsidize1", width: 100, align: "left", formatter: function (value, row) {
  208. if (row.IsSubsidize1) {
  209. return '<span class=\"label label-success\">资助</span>';
  210. } else if (row.IsSubsidize1 == false) {
  211. return '<span class=\"label label-warning\">不资助</span>';
  212. } else {
  213. return "未处理";
  214. }
  215. }
  216. },
  217. {
  218. label: "是否上传资料", name: "SubsidizeUrl", width: 100, align: "left", formatter: function (value) {
  219. if (value) {
  220. return '<span class=\"label label-success\">已上传</span>';
  221. } else {
  222. return '<span class=\"label label-warning\">未上传</span>';
  223. }
  224. }
  225. },
  226. {
  227. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  228. return value == "1" ? "男" : "女";
  229. }
  230. },
  231. {
  232. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  233. learun.clientdata.getAsync('custmerData', {
  234. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdNationality',
  235. key: value,
  236. keyId: 'nationalityno',
  237. callback: function (_data) {
  238. callback(_data['nationality']);
  239. }
  240. });
  241. }
  242. },
  243. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return val.substring(0, 10); } },
  244. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  245. {
  246. label: "政治面貌", name: "Political", width: 100, align: "left",
  247. formatterAsync: function (callback, value, row, op, $cell) {
  248. learun.clientdata.getAsync('custmerData', {
  249. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdPartyFace',
  250. key: value,
  251. keyId: 'partyfaceno',
  252. callback: function (_data) {
  253. callback(_data['partyface']);
  254. }
  255. });
  256. }
  257. },
  258. {
  259. label: "届别", name: "FreshType", width: 100, align: "left",
  260. formatterAsync: function (callback, value, row, op, $cell) {
  261. learun.clientdata.getAsync('dataItem', {
  262. key: value,
  263. code: 'timeType',
  264. callback: function (_data) {
  265. callback(_data.text);
  266. }
  267. });
  268. }
  269. },
  270. {
  271. label: "户别", name: "ResidenceType", width: 100, align: "left",
  272. formatterAsync: function (callback, value, row, op, $cell) {
  273. learun.clientdata.getAsync('dataItem', {
  274. key: value,
  275. code: 'HouseholdCategory',
  276. callback: function (_data) {
  277. callback(_data.text);
  278. }
  279. });
  280. }
  281. },
  282. {
  283. label: "考生类别", name: "StuType", width: 100, align: "left",
  284. formatterAsync: function (callback, value, row, op, $cell) {
  285. learun.clientdata.getAsync('dataItem', {
  286. key: value,
  287. code: 'stuType',
  288. callback: function (_data) {
  289. callback(_data.text);
  290. }
  291. });
  292. }
  293. },
  294. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  295. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  296. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  297. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  298. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  299. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  300. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  301. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  302. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  303. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  304. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  305. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  306. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  307. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  308. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  309. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  310. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  311. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  312. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  313. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  314. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  315. ],
  316. isMultiselect: true,
  317. mainId: 'StuId',
  318. isPage: true
  319. });
  320. page.search();
  321. },
  322. refreshMoney: function () {
  323. var deptNo = $("#DeptNo").lrselectGet();
  324. var majorNo = $("#MajorNo").lrselectGet();
  325. var classNo = $("#ClassNo").lrselectGet();
  326. $.post(
  327. top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetHelpStatistics',
  328. {
  329. DeptNo: deptNo,
  330. MajorNo: majorNo,
  331. ClassNo: classNo
  332. },
  333. function (res) {
  334. $("#allAmount").html(res.data.aa);
  335. $("#isAmount").html(res.data.bb);
  336. }, "json");
  337. },
  338. search: function (param) {
  339. param = param || {};
  340. param.SqlParameter = ' AND IsReport=1';
  341. param.Grade = "20";
  342. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  343. }
  344. };
  345. refreshGirdData = function () {
  346. page.search();
  347. };
  348. page.init();
  349. }