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.

GetArticles.js 14 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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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. }, 380, 400);
  19. $("#IsGetBeddingArticle").lrDataItemSelect({ code: "jyYewOrNot" });
  20. $('#Year').lrselect({
  21. url:top.$.rootUrl+'/EducationalAdministration/StuEnroll/GetYearListByClass',
  22. value:"year",
  23. text:"year",
  24. })
  25. $('#DeptNo').lrselect({
  26. allowSearch: true,
  27. value: "deptno",
  28. text: "deptname",
  29. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  30. select: function (item) {
  31. if (item) {
  32. $('#MajorNo').lrselectRefresh({
  33. allowSearch: true,
  34. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  35. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  36. });
  37. } else {
  38. $('#MajorNo').lrselectRefresh({
  39. allowSearch: true,
  40. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  41. param: { strWhere: "1=1 AND CheckMark=1" }
  42. });
  43. }
  44. }
  45. });
  46. $('#MajorNo').lrselect({
  47. allowSearch: true,
  48. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  49. value: "majorno",
  50. text: "majorname",
  51. param: { strWhere: "1=1 AND CheckMark=1" },
  52. select: function (item) {
  53. if (item) {
  54. $('#ClassNo').lrselectRefresh({
  55. allowSearch: true,
  56. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  57. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
  58. });
  59. } else {
  60. $('#ClassNo').lrselectRefresh({
  61. allowSearch: true,
  62. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  63. param: { strWhere: "1=1 AND CheckMark=1" }
  64. });
  65. }
  66. }
  67. });
  68. $('#ClassNo').lrselect({
  69. allowSearch: true,
  70. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  71. param: { strWhere: "1=1 AND CheckMark=1" },
  72. value: "classno",
  73. text: "classname"
  74. });
  75. // 刷新
  76. $('#lr_refresh').on('click', function () {
  77. location.reload();
  78. });
  79. $('#lr_view').on('click', function () {
  80. var keyValue = $('#gridtable').jfGridValue('StuId');
  81. if (learun.checkrow(keyValue)) {
  82. learun.layerForm({
  83. id: 'form',
  84. title: '查看',
  85. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  86. width: 800,
  87. height: 600,
  88. btn: null
  89. });
  90. }
  91. });
  92. //确认领取床上用品
  93. $("#lr_getArticles").on('click', function () {
  94. var data = $('#gridtable').jfGridGet('rowdata');
  95. if (data.length > 0) {
  96. learun.layerConfirm('是否领取床上用品!',
  97. function (res) {
  98. if (res) {
  99. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetArticles',
  100. { stuId: JSON.stringify(data), status: true },
  101. function (res) {
  102. refreshGirdData();
  103. });
  104. }
  105. });
  106. }
  107. });
  108. //确认领取床上用品
  109. $("#lr_nogetArticles").on('click', function () {
  110. var data = $('#gridtable').jfGridGet('rowdata');
  111. if (data.length > 0) {
  112. learun.layerConfirm('是否设置未领取!',
  113. function (res) {
  114. if (res) {
  115. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetArticles',
  116. { stuId: JSON.stringify(data), status: false },
  117. function (res) {
  118. refreshGirdData();
  119. });
  120. }
  121. });
  122. }
  123. });
  124. //确认报到
  125. $("#lr_allgetArticles").on('click',
  126. function () {
  127. learun.layerConfirm('是否全部领取!',
  128. function (res) {
  129. if (res) {
  130. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllGetArticle',
  131. {},
  132. function (res) {
  133. refreshGirdData();
  134. });
  135. }
  136. });
  137. });
  138. },
  139. // 初始化列表
  140. initGird: function () {
  141. $('#gridtable').lrAuthorizeJfGrid({
  142. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  143. headData: [
  144. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  145. { label: "姓名", name: "StuName", width: 100, align: "left" },
  146. {
  147. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  148. learun.clientdata.getAsync('custmerData', {
  149. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  150. key: value,
  151. keyId: 'classno',
  152. callback: function (_data) {
  153. callback(_data['classname']);
  154. }
  155. });
  156. }
  157. },
  158. {
  159. label: "是否领取", name: "IsGetBeddingArticle", width: 100, align: "left", formatter: function (value, row) {
  160. if (row.IsGetBeddingArticle) {
  161. return '<span class=\"label label-success\">已领取</span>';
  162. } else if (row.IsGetBeddingArticle == false) {
  163. return '<span class=\"label label-warning\">未领取</span>';
  164. } else {
  165. return '未处理';
  166. }
  167. }
  168. },
  169. {
  170. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  171. return value == "1" ? "男" : "女";
  172. }
  173. },
  174. {
  175. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  176. learun.clientdata.getAsync('dataItem', {
  177. key: value,
  178. code: 'National',
  179. callback: function (_data) {
  180. callback(_data.text);
  181. }
  182. });
  183. }
  184. },
  185. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return val.substring(0, 10); } },
  186. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  187. {
  188. label: "政治面貌", name: "Political", width: 100, align: "left",
  189. formatterAsync: function (callback, value, row, op, $cell) {
  190. learun.clientdata.getAsync('dataItem', {
  191. key: value,
  192. code: 'BCdPartyFace',
  193. callback: function (_data) {
  194. callback(_data.text);
  195. }
  196. });
  197. }
  198. },
  199. {
  200. label: "届别", name: "FreshType", width: 100, align: "left",
  201. formatterAsync: function (callback, value, row, op, $cell) {
  202. learun.clientdata.getAsync('dataItem', {
  203. key: value,
  204. code: 'timeType',
  205. callback: function (_data) {
  206. callback(_data.text);
  207. }
  208. });
  209. }
  210. },
  211. {
  212. label: "户别", name: "ResidenceType", width: 100, align: "left",
  213. formatterAsync: function (callback, value, row, op, $cell) {
  214. learun.clientdata.getAsync('dataItem', {
  215. key: value,
  216. code: 'HouseholdCategory',
  217. callback: function (_data) {
  218. callback(_data.text);
  219. }
  220. });
  221. }
  222. },
  223. {
  224. label: "考生类别", name: "StuType", width: 100, align: "left",
  225. formatterAsync: function (callback, value, row, op, $cell) {
  226. learun.clientdata.getAsync('dataItem', {
  227. key: value,
  228. code: 'stuType',
  229. callback: function (_data) {
  230. callback(_data.text);
  231. }
  232. });
  233. }
  234. },
  235. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  236. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  237. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  238. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  239. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  240. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  241. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  242. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  243. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  244. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  245. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  246. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  247. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  248. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  249. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  250. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  251. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  252. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  253. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  254. {
  255. label: "录取方式", name: "Admissions", width: 100, align: "left",
  256. formatterAsync: function (callback, value, row, op, $cell) {
  257. learun.clientdata.getAsync('dataItem', {
  258. key: value,
  259. code: 'enrollType',
  260. callback: function (_data) {
  261. callback(_data.text);
  262. }
  263. });
  264. }
  265. },
  266. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  267. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  268. ],
  269. mainId: 'StuId',
  270. isMultiselect: true,
  271. isPage: true
  272. });
  273. page.search();
  274. },
  275. search: function (param) {
  276. param = param || {};
  277. //param.SqlParameter = " AND IsPay ='true'";
  278. param.SqlParameter = ' AND IsReport=1';
  279. param.Grade = "20";
  280. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  281. }
  282. };
  283. refreshGirdData = function () {
  284. page.search();
  285. };
  286. page.init();
  287. }