25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

133 satır
6.3 KiB

  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 strsql = '';
  11. var page = {
  12. init: function () {
  13. page.initGird();
  14. page.bind();
  15. },
  16. bind: function () {
  17. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  18. page.search(queryJson);
  19. }, 220, 400);
  20. $('#Sex').lrDataItemSelect({ code: 'usersex' });
  21. $('#StuScore').lrDataItemSelect({
  22. code: 'EnrollScore',
  23. select: function (item) {
  24. if (item != undefined) {
  25. switch (item.id) {
  26. case item.id:
  27. strsql = " and t.StuScore " + item.id + "";
  28. break;
  29. default:
  30. break;
  31. }
  32. }
  33. }
  34. });
  35. // 刷新
  36. $('#lr_refresh').on('click', function () {
  37. location.reload();
  38. });
  39. // 录取
  40. $('#lr_enroll').on('click', function () {
  41. var keyValue = $('#gridtable').jfGridValue('ID');
  42. if (learun.checkrow(keyValue)) {
  43. learun.layerConfirm('是否确认录取选中项!', function (res) {
  44. if (res) {
  45. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/EnrollForm', { keyValue: keyValue }, function () {
  46. refreshGirdData();
  47. });
  48. }
  49. });
  50. }
  51. });
  52. // 取消录取
  53. $('#lr_cancel').on('click', function () {
  54. var keyValue = $('#gridtable').jfGridValue('ID');
  55. if (learun.checkrow(keyValue)) {
  56. learun.layerConfirm('是否确认取消录取选中项!', function (res) {
  57. if (res) {
  58. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/CancelForm', { keyValue: keyValue }, function () {
  59. refreshGirdData();
  60. });
  61. }
  62. });
  63. }
  64. });
  65. },
  66. // 初始化列表
  67. initGird: function () {
  68. $('#gridtable').lrAuthorizeJfGrid({
  69. url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetPageList',
  70. headData: [
  71. {
  72. label: "是否录取", name: "IsEnroll", width: 80, align: "left",
  73. formatter: function (cellvalue) {
  74. return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
  75. "<span class=\"label label-danger\">否</span>";
  76. }
  77. },
  78. {
  79. label: "录取意向(本校)", name: "IsCYSchool", width: 100, align: "left",
  80. formatter: function (cellvalue) {
  81. return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
  82. "<span class=\"label label-danger\">否</span>";
  83. }
  84. },
  85. { label: "中考总分", name: "StuScore", width: 100, align: "left" },
  86. { label: "学生姓名", name: "StuName", width: 100, align: "left" },
  87. {
  88. label: "性别", name: "Sex", width: 80, align: "left",
  89. formatterAsync: function (callback, value, row, op, $cell) {
  90. learun.clientdata.getAsync('dataItem', {
  91. key: value,
  92. code: 'usersex',
  93. callback: function (_data) {
  94. callback(_data.text);
  95. }
  96. });
  97. }
  98. },
  99. { label: "身份证号", name: "CardNo", width: 150, align: "left" },
  100. { label: "县区名称", name: "Address", width: 150, align: "left" },
  101. { label: "初中毕业学校", name: "BySchool", width: 150, align: "left" },
  102. { label: "初中学号", name: "H_SchoolNo", width: 150, align: "left" },
  103. { label: "中考报名号", name: "ApplyNo", width: 150, align: "left" },
  104. { label: "第一志愿", name: "FirstVolunteer", width: 120, align: "left" },
  105. { label: "第二志愿", name: "SecondVolunteer", width: 120, align: "left" },
  106. { label: "第三志愿", name: "ThirdVolunteer", width: 120, align: "left" },
  107. { label: "第四志愿", name: "FouthVolunteer", width: 120, align: "left" },
  108. { label: "第五志愿", name: "FifthVolunteer", width: 120, align: "left" },
  109. { label: "第六志愿", name: "SixthVolunteer", width: 120, align: "left" },
  110. { label: "第七志愿", name: "SeventhVolunteer", width: 120, align: "left" },
  111. { label: "第八志愿", name: "EighthVolunteer", width: 120, align: "left" },
  112. { label: "第九志愿", name: "NinthVolunteer", width: 120, align: "left" },
  113. { label: "备注", name: "Demo", width: 100, align: "left" },
  114. ],
  115. mainId: 'ID',
  116. isPage: true,
  117. isMultiselect: true
  118. });
  119. page.search();
  120. },
  121. search: function (param) {
  122. param = param || {};
  123. param.SqlParameter = strsql + " and MajorOne is null and IsCYSchool = 'True' ";
  124. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  125. }
  126. };
  127. refreshGirdData = function () {
  128. $('#gridtable').jfGridSet('reload');
  129. };
  130. page.init();
  131. }