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.

GetCloth.js 15 KiB

4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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. $("#IsTakeCloths").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. // 打印
  80. $('#lr_print').on('click', function () {
  81. $('#gridtable').jqprintTable();
  82. });
  83. $('#lr_view').on('click', function () {
  84. var keyValue = $('#gridtable').jfGridValue('StuId');
  85. if (learun.checkrow(keyValue)) {
  86. learun.layerForm({
  87. id: 'form',
  88. title: '查看',
  89. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  90. width: 800,
  91. height: 600,
  92. btn: null
  93. });
  94. }
  95. });
  96. //确认领取军训服
  97. $("#lr_getCloth").on('click', function () {
  98. var data = $('#gridtable').jfGridGet('rowdata');
  99. if (data.length > 0) {
  100. learun.layerConfirm('是否确认领取军训服!',
  101. function (res) {
  102. if (res) {
  103. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetCloth',
  104. { stuId: JSON.stringify(data), status: true },
  105. function (res) {
  106. refreshGirdData();
  107. });
  108. }
  109. });
  110. }
  111. });
  112. //确认领取军训服
  113. $("#lr_nogetCloth").on('click', function () {
  114. var data = $('#gridtable').jfGridGet('rowdata');
  115. if (data.length > 0) {
  116. learun.layerConfirm('是否设置未领取!',
  117. function (res) {
  118. if (res) {
  119. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetCloth',
  120. { stuId: JSON.stringify(data), status: false },
  121. function (res) {
  122. refreshGirdData();
  123. });
  124. }
  125. });
  126. }
  127. });
  128. //确认报到
  129. $("#lr_allgetCloth").on('click',
  130. function () {
  131. learun.layerConfirm('是否全部领取!',
  132. function (res) {
  133. if (res) {
  134. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllGetCloth',
  135. {},
  136. function (res) {
  137. refreshGirdData();
  138. });
  139. }
  140. });
  141. });
  142. },
  143. // 初始化列表
  144. initGird: function () {
  145. $('#gridtable').lrAuthorizeJfGrid({
  146. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  147. headData: [
  148. { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
  149. { label: "姓名", name: "StuName", width: 100, align: "left" },
  150. {
  151. label: "班级", name: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  152. learun.clientdata.getAsync('custmerData', {
  153. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  154. key: value,
  155. keyId: 'classno',
  156. callback: function (_data) {
  157. callback(_data['classname']);
  158. }
  159. });
  160. }
  161. },
  162. {
  163. label: "是否领取", name: "IsTakeCloths", width: 100, align: "left", formatter: function (value, row) {
  164. if (row.IsTakeCloths) {
  165. return '<span class=\"label label-success\">已领取</span>';
  166. } else if (row.IsTakeCloths == false) {
  167. return '<span class=\"label label-warning\">未领取</span>';
  168. } else {
  169. return '未处理';
  170. }
  171. }
  172. },
  173. {
  174. label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
  175. return value == "1" ? "男" : "女";
  176. }
  177. },
  178. {
  179. label: "民族", name: "Nationals", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  180. learun.clientdata.getAsync('custmerData', {
  181. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdNationality',
  182. key: value,
  183. keyId: 'nationalityno',
  184. callback: function (_data) {
  185. callback(_data['nationality']);
  186. }
  187. });
  188. }
  189. },
  190. { label: "出生年月", name: "Birthday", width: 100, align: "left", formatter: function (val) { return learun.formatDate(val, 'yyyy-MM-dd') } },
  191. { label: "身份证", name: "IDCard", width: 100, align: "left" },
  192. {
  193. label: "政治面貌", name: "Political", width: 100, align: "left",
  194. formatterAsync: function (callback, value, row, op, $cell) {
  195. learun.clientdata.getAsync('custmerData', {
  196. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdPartyFace',
  197. key: value,
  198. keyId: 'partyfaceno',
  199. callback: function (_data) {
  200. callback(_data['partyface']);
  201. }
  202. });
  203. }
  204. },
  205. {
  206. label: "届别", name: "FreshType", width: 100, align: "left",
  207. formatterAsync: function (callback, value, row, op, $cell) {
  208. learun.clientdata.getAsync('dataItem', {
  209. key: value,
  210. code: 'timeType',
  211. callback: function (_data) {
  212. callback(_data.text);
  213. }
  214. });
  215. }
  216. },
  217. {
  218. label: "户别", name: "ResidenceType", width: 100, align: "left",
  219. formatterAsync: function (callback, value, row, op, $cell) {
  220. learun.clientdata.getAsync('dataItem', {
  221. key: value,
  222. code: 'HouseholdCategory',
  223. callback: function (_data) {
  224. callback(_data.text);
  225. }
  226. });
  227. }
  228. },
  229. {
  230. label: "考生类别", name: "StuType", width: 100, align: "left",
  231. formatterAsync: function (callback, value, row, op, $cell) {
  232. learun.clientdata.getAsync('dataItem', {
  233. key: value,
  234. code: 'stuType',
  235. callback: function (_data) {
  236. callback(_data.text);
  237. }
  238. });
  239. }
  240. },
  241. { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
  242. { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
  243. { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
  244. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  245. { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
  246. { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
  247. { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
  248. { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
  249. { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
  250. { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
  251. { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
  252. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  253. { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
  254. { label: "收件人", name: "Recipient", width: 100, align: "left" },
  255. { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
  256. { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
  257. { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
  258. { label: "录取专业代码", name: "MajorNo", width: 100, align: "left" },
  259. { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
  260. {
  261. label: "录取方式", name: "Admissions", width: 100, align: "left",
  262. formatterAsync: function (callback, value, row, op, $cell) {
  263. learun.clientdata.getAsync('dataItem', {
  264. key: value,
  265. code: 'enrollType',
  266. callback: function (_data) {
  267. callback(_data.text);
  268. }
  269. });
  270. }
  271. },
  272. { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
  273. { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
  274. ],
  275. mainId: 'StuId',
  276. isMultiselect: true,
  277. isPage: true
  278. });
  279. page.search();
  280. },
  281. search: function (param) {
  282. param = param || {};
  283. //param.SqlParameter = " AND IsPay ='true'";
  284. param.SqlParameter = ' AND IsReport=1';
  285. param.Grade = "20";
  286. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  287. }
  288. };
  289. refreshGirdData = function () {
  290. page.search();
  291. };
  292. page.init();
  293. }