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.

IndexLabel.js 7.3 KiB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-12-16 10:14
  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. }, 220, 400);
  19. $('#Sex').lrDataItemSelect({ code: 'usersex' });
  20. // 刷新
  21. $('#lr_refresh').on('click', function () {
  22. location.reload();
  23. });
  24. // 标注
  25. $('#lr_label').on('click', function () {
  26. var keyValue = $('#gridtable').jfGridValue('ID');
  27. if (learun.checkrow(keyValue)) {
  28. learun.layerConfirm('是否确认标注选中该项!', function (res) {
  29. if (res) {
  30. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/LabelForm', { keyValue: keyValue }, function () {
  31. refreshGirdData();
  32. });
  33. }
  34. });
  35. }
  36. });
  37. // 取消标注
  38. $('#lr_cancel').on('click', function () {
  39. var keyValue = $('#gridtable').jfGridValue('ID');
  40. if (learun.checkrow(keyValue)) {
  41. learun.layerConfirm('是否取消标注选中该项!', function (res) {
  42. if (res) {
  43. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/CancelLabel', { keyValue: keyValue }, function () {
  44. refreshGirdData();
  45. });
  46. }
  47. });
  48. }
  49. });
  50. // 填报志愿
  51. $('#lr_school').on('click', function () {
  52. var keyValue = $('#gridtable').jfGridValue('ID');
  53. if (learun.checkrow(keyValue)) {
  54. if (keyValue.indexOf(',') != -1) {
  55. learun.alert.warning("只能选择一条记录进行编辑!");
  56. return;
  57. }
  58. var IsOurSchool = $('#gridtable').jfGridValue('IsOurSchool');
  59. if (IsOurSchool == false) {
  60. learun.layerForm({
  61. id: 'form',
  62. title: '填报学校',
  63. url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/Formschool?keyValue=' + keyValue,
  64. width: 600,
  65. height: 400,
  66. callBack: function (id) {
  67. return top[id].acceptClick(refreshGirdData);
  68. }
  69. });
  70. } else {
  71. learun.alert.warning("当前项无需填报!");
  72. return;
  73. }
  74. }
  75. });
  76. },
  77. // 初始化列表
  78. initGird: function () {
  79. $('#gridtable').lrAuthorizeJfGrid({
  80. url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetPageList',
  81. headData: [
  82. {
  83. label: "是否有意(本校)", name: "IsIntention", width: 100, align: "IsIntention",
  84. formatter: function (cellvalue) {
  85. return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
  86. "<span class=\"label label-danger\">否</span>";
  87. }
  88. },
  89. {
  90. label: "填报志愿(本校)", name: "IsOurSchool", width: 100, align: "IsIntention",
  91. formatter: function (cellvalue) {
  92. return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
  93. "<span class=\"label label-danger\">否</span>";
  94. }
  95. },
  96. { label: "县区名称", name: "Address", width: 200, align: "left" },
  97. { label: "毕业学校", name: "BySchool", width: 200, align: "left" },
  98. { label: "初中学号", name: "H_SchoolNo", width: 200, align: "left" },
  99. { label: "报名号", name: "ApplyNo", width: 200, align: "left" },
  100. { label: "学生姓名", name: "StuName", width: 100, align: "left" },
  101. {
  102. label: "性别", name: "Sex", width: 100, align: "left",
  103. formatterAsync: function (callback, value, row, op, $cell) {
  104. learun.clientdata.getAsync('dataItem', {
  105. key: value,
  106. code: 'usersex',
  107. callback: function (_data) {
  108. callback(_data.text);
  109. }
  110. });
  111. }
  112. },
  113. {
  114. label: "录取意向", name: "IsCYSchool", width: 200, align: "left",
  115. formatter: function (cellvalue) {
  116. return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
  117. "<span class=\"label label-danger\">否</span>";
  118. }
  119. },
  120. { label: "身份证号", name: "CardNo", width: 150, align: "left" },
  121. { label: "中考总分", name: "StuScore", width: 100, align: "left" },
  122. { label: "第一志愿", name: "FirstVolunteer", width: 120, align: "left" },
  123. { label: "第二志愿", name: "SecondVolunteer", width: 120, align: "left" },
  124. { label: "第三志愿", name: "ThirdVolunteer", width: 120, align: "left" },
  125. { label: "第四志愿", name: "FouthVolunteer", width: 120, align: "left" },
  126. { label: "第五志愿", name: "FifthVolunteer", width: 120, align: "left" },
  127. { label: "第六志愿", name: "SixthVolunteer", width: 120, align: "left" },
  128. { label: "第七志愿", name: "SeventhVolunteer", width: 120, align: "left" },
  129. { label: "第八志愿", name: "EighthVolunteer", width: 120, align: "left" },
  130. { label: "第九志愿", name: "NinthVolunteer", width: 120, align: "left" },
  131. { label: "备注", name: "Demo", width: 100, align: "left" },
  132. ],
  133. mainId: 'ID',
  134. isPage: true,
  135. isMultiselect: true
  136. });
  137. page.search();
  138. },
  139. search: function (param) {
  140. param = param || {};
  141. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  142. }
  143. };
  144. refreshGirdData = function () {
  145. $('#gridtable').jfGridSet('reload');
  146. };
  147. page.init();
  148. }