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.

AnalysisByMonthForStudent.js 5.0 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-07-11 14:34
  5. * 描 述:宿舍调换申请
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var startTime;
  11. var endTime;
  12. var page = {
  13. init: function () {
  14. page.initGird();
  15. page.bind();
  16. },
  17. bind: function () {
  18. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  19. page.search(queryJson);
  20. }, 300, 400);
  21. // 刷新
  22. $('#lr_refresh').on('click', function () {
  23. location.reload();
  24. });
  25. $('#DeptNo').lrselect({
  26. value: "deptno",
  27. text: "deptname",
  28. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  29. select: function (item) {
  30. if (item) {
  31. $('#MajorNo').lrselectRefresh({
  32. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
  33. param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" }
  34. });
  35. }
  36. else {
  37. $('#MajorNo').lrselectRefresh({
  38. url: "",
  39. data: []
  40. });
  41. }
  42. $('#ClassNo').lrselectRefresh({
  43. url: "",
  44. data: []
  45. });
  46. }
  47. });
  48. $('#MajorNo').lrselect({
  49. value: "majorno",
  50. text: "majorname",
  51. select: function (item) {
  52. if (item) {
  53. $('#ClassNo').lrselectRefresh({
  54. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
  55. param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" }
  56. });
  57. }
  58. }
  59. });
  60. $('#MajorNo').on("click",
  61. function () {
  62. var data = $('#DeptNo').lrselectGet();
  63. if (!data) {
  64. learun.alert.error('请先选择系');
  65. }
  66. });
  67. $('#ClassNo').on("click",
  68. function () {
  69. var data1 = $('#DeptNo').lrselectGet();
  70. var data2 = $('#MajorNo').lrselectGet();
  71. if (!data1 || !data2) {
  72. learun.alert.error('请先选择系和专业');
  73. }
  74. });
  75. $('#ClassNo').lrselect({
  76. value: "classno",
  77. text: "classname"
  78. });
  79. $('#Months').lrDataItemSelect({ code: "MonthInt", type: "multiple" });
  80. $('#Year').lrselect({
  81. url: top.$.rootUrl + '/EducationalAdministration/YKTStateMent/GenerateNearByYear',
  82. value: 'value',
  83. text: 'text'
  84. });
  85. },
  86. // 初始化列表
  87. initGird: function () {
  88. $('#gridtable').jfGrid({
  89. url: top.$.rootUrl + '/EducationalAdministration/YKTStateMent/GetAnalysisByMonthForStudentPageList',
  90. headData: [
  91. { label: "学号", name: "StuNo", width: 100, align: "left" },
  92. { label: "姓名", name: "StuName", width: 100, align: "left" },
  93. {
  94. label: "性别", name: "GenderNo", width: 100, align: "left", formatter: function (cellvalue) {
  95. return cellvalue == "1" ? "男" : "女";
  96. }
  97. },
  98. { label: "系部", name: "DeptName", width: 100, align: "left" },
  99. { label: "专业", name: "MajorName", width: 100, align: "left" },
  100. { label: "班级", name: "ClassName", width: 100, align: "left" },
  101. { label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" },
  102. { label: "消费金额", name: "MONEY", width: 100, align: "left", statistics: true },
  103. { label: "消费次数", name: "PayTimes", width: 100, align: "left", statistics: true },
  104. { label: "平均消费金额", name: "PerMoney", width: 100, align: "left", statistics: true }
  105. ],
  106. isPage: true
  107. });
  108. //page.search();
  109. },
  110. search: function (param) {
  111. param = param || {};
  112. param.StartDate = startTime;
  113. param.EndDate = endTime;
  114. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  115. }
  116. };
  117. refreshGirdData = function () {
  118. page.search();
  119. };
  120. page.init();
  121. }