Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

313 rindas
14 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. }, 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. {
  186. label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (cellvalue) {
  187. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  188. } },
  189. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  190. {
  191. label: "政治面貌", name: "Political", width: 100, align: "left",
  192. formatterAsync: function (callback, value, row, op, $cell) {
  193. learun.clientdata.getAsync('dataItem', {
  194. key: value,
  195. code: 'BCdPartyFace',
  196. callback: function (_data) {
  197. callback(_data.text);
  198. }
  199. });
  200. }
  201. },
  202. {
  203. label: "届别", name: "FreshType", width: 100, align: "left",
  204. formatterAsync: function (callback, value, row, op, $cell) {
  205. learun.clientdata.getAsync('dataItem', {
  206. key: value,
  207. code: 'timeType',
  208. callback: function (_data) {
  209. callback(_data.text);
  210. }
  211. });
  212. }
  213. },
  214. {
  215. label: "户别", name: "ResidenceType", width: 100, align: "left",
  216. formatterAsync: function (callback, value, row, op, $cell) {
  217. learun.clientdata.getAsync('dataItem', {
  218. key: value,
  219. code: 'HouseholdCategory',
  220. callback: function (_data) {
  221. callback(_data.text);
  222. }
  223. });
  224. }
  225. },
  226. {
  227. label: "考生类别", name: "StuType", width: 100, align: "left",
  228. formatterAsync: function (callback, value, row, op, $cell) {
  229. learun.clientdata.getAsync('dataItem', {
  230. key: value,
  231. code: 'stuType',
  232. callback: function (_data) {
  233. callback(_data.text);
  234. }
  235. });
  236. }
  237. },
  238. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  239. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  240. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  241. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  242. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  243. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  244. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  245. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  246. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  247. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  248. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  249. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  250. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  251. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  252. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  253. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  254. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  255. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  256. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  257. {
  258. label: "录取方式", name: "Admissions", width: 100, align: "left",
  259. formatterAsync: function (callback, value, row, op, $cell) {
  260. learun.clientdata.getAsync('dataItem', {
  261. key: value,
  262. code: 'enrollType',
  263. callback: function (_data) {
  264. callback(_data.text);
  265. }
  266. });
  267. }
  268. },
  269. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  270. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  271. ],
  272. mainId: 'StuId',
  273. isMultiselect: true,
  274. isPage: true
  275. });
  276. page.search();
  277. },
  278. search: function (param) {
  279. param = param || {};
  280. //param.SqlParameter = " AND IsPay ='true'";
  281. param.SqlParameter = ' AND IsReport=1';
  282. //param.Grade = "20";
  283. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  284. }
  285. };
  286. refreshGirdData = function () {
  287. page.search();
  288. };
  289. page.init();
  290. }