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.
 
 
 
 
 
 

136 lines
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 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_add').on('click', function () {
  26. learun.layerForm({
  27. id: 'form',
  28. title: '新增',
  29. url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/Form',
  30. width: 800,
  31. height: 600,
  32. callBack: function (id) {
  33. return top[id].acceptClick(refreshGirdData);
  34. }
  35. });
  36. });
  37. // 编辑
  38. $('#lr_edit').on('click', function () {
  39. var keyValue = $('#gridtable').jfGridValue('ID');
  40. if (learun.checkrow(keyValue)) {
  41. if (keyValue.indexOf(',') != -1) {
  42. learun.alert.warning("只能选择一条记录进行编辑!");
  43. return;
  44. }
  45. learun.layerForm({
  46. id: 'form',
  47. title: '编辑',
  48. url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/Form?keyValue=' + keyValue,
  49. width: 800,
  50. height: 600,
  51. callBack: function (id) {
  52. return top[id].acceptClick(refreshGirdData);
  53. }
  54. });
  55. }
  56. });
  57. // 删除
  58. $('#lr_delete').on('click', function () {
  59. var keyValue = $('#gridtable').jfGridValue('ID');
  60. if (learun.checkrow(keyValue)) {
  61. learun.layerConfirm('是否确认删除该项!', function (res) {
  62. if (res) {
  63. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/DeleteForm', { keyValue: keyValue }, function () {
  64. refreshGirdData();
  65. });
  66. }
  67. });
  68. }
  69. });
  70. // 打印
  71. $('#lr_print').on('click', function () {
  72. $('#gridtable').jqprintTable();
  73. });
  74. },
  75. // 初始化列表
  76. initGird: function () {
  77. $('#gridtable').lrAuthorizeJfGrid({
  78. url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetPageList',
  79. headData: [
  80. { label: "县区名称", name: "Address", width: 150, align: "left" },
  81. { label: "初中毕业学校", name: "BySchool", width: 150, align: "left" },
  82. { label: "初中学号", name: "H_SchoolNo", width: 150, align: "left" },
  83. { label: "中考报名号", name: "ApplyNo", width: 150, align: "left" },
  84. { label: "学号", name: "ProvinceCode", width: 150, align: "left" },
  85. { label: "学生姓名", name: "StuName", width: 100, align: "left" },
  86. {
  87. label: "性别", name: "Sex", width: 100, align: "left",
  88. formatterAsync: function (callback, value, row, op, $cell) {
  89. learun.clientdata.getAsync('dataItem', {
  90. key: value,
  91. code: 'usersex',
  92. callback: function (_data) {
  93. callback(_data.text);
  94. }
  95. });
  96. }
  97. },
  98. {
  99. label: "录取意向(本校)", name: "IsCYSchool", width: 100, align: "left",
  100. formatter: function (cellvalue) {
  101. return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
  102. "<span class=\"label label-danger\">否</span>";
  103. }
  104. },
  105. { label: "身份证号", name: "CardNo", width: 150, align: "left" },
  106. { label: "中考总分", name: "StuScore", width: 100, align: "left" },
  107. { label: "第一志愿", name: "FirstVolunteer", width: 120, align: "left" },
  108. { label: "第二志愿", name: "SecondVolunteer", width: 120, align: "left" },
  109. { label: "第三志愿", name: "ThirdVolunteer", width: 120, align: "left" },
  110. { label: "第四志愿", name: "FouthVolunteer", width: 120, align: "left" },
  111. { label: "第五志愿", name: "FifthVolunteer", width: 120, align: "left" },
  112. { label: "第六志愿", name: "SixthVolunteer", width: 120, align: "left" },
  113. { label: "第七志愿", name: "SeventhVolunteer", width: 120, align: "left" },
  114. { label: "第八志愿", name: "EighthVolunteer", width: 120, align: "left" },
  115. { label: "第九志愿", name: "NinthVolunteer", width: 120, align: "left" },
  116. { label: "备注", name: "Demo", width: 100, align: "left" },
  117. ],
  118. mainId: 'ID',
  119. sidx: 'UpdateTime desc',
  120. isPage: true,
  121. isMultiselect: true
  122. });
  123. page.search();
  124. },
  125. search: function (param) {
  126. param = param || {};
  127. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  128. }
  129. };
  130. refreshGirdData = function () {
  131. $('#gridtable').jfGridSet('reload');
  132. };
  133. page.init();
  134. }