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.
 
 
 
 
 
 

79 lines
3.1 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-01-04 11:47
  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. // 刷新
  20. $('#lr_refresh').on('click', function () {
  21. location.reload();
  22. });
  23. //申请
  24. $('#lr_apply').on('click', function () {
  25. var keyValue = $('#gridtable').jfGridValue('Id');
  26. if (learun.checkrow(keyValue)) {
  27. var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); //(1申请中,2已通过,3未通过,)
  28. if (ApplyStatus == "1") {
  29. learun.alert.warning("该项申请中!");
  30. return false;
  31. }
  32. if (ApplyStatus == "2") {
  33. learun.alert.warning("该项已通过申请!");
  34. return false;
  35. }
  36. learun.layerConfirm('是否确认申请该项!', function (res) {
  37. if (res) {
  38. learun.postForm(top.$.rootUrl + '/PersonnelManagement/CommunityInfo/DoApply', { keyValue: keyValue }, function () {
  39. refreshGirdData();
  40. });
  41. }
  42. });
  43. }
  44. });
  45. },
  46. // 初始化列表
  47. initGird: function () {
  48. $('#gridtable').jfGrid({
  49. url: top.$.rootUrl + '/PersonnelManagement/CommunityInfo/GetPageListOfApply',
  50. headData: [
  51. { label: "社团编号", name: "CommunityCode", width: 100, align: "left" },
  52. { label: "社团名称", name: "CommunityName", width: 100, align: "left" },
  53. {
  54. label: "申请状态", name: "ApplyStatus", width: 100, align: "left", formatter: function (cellvalue) {
  55. return cellvalue == "1" ? "申请中" : cellvalue == "2" ? "已申请" : ""
  56. }
  57. },
  58. { label: "申请时间", name: "ApplyCreateTime", width: 100, align: "left" },
  59. ],
  60. mainId: 'Id',
  61. isPage: true,
  62. sidx: 'Sort',
  63. sord: 'asc'
  64. });
  65. page.search();
  66. },
  67. search: function (param) {
  68. param = param || {};
  69. param.StuNo = learun.clientdata.get(['userinfo']).account;
  70. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  71. }
  72. };
  73. refreshGirdData = function () {
  74. page.search();
  75. };
  76. page.init();
  77. }