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.
 
 
 
 
 
 

116 lines
5.2 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. $('#AcademicYearNo').lrselect({
  20. placeholder: "请选择学年",
  21. allowSearch: true,
  22. url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear',
  23. value: 'value',
  24. text: 'text'
  25. });
  26. //学期
  27. $('#Semester').lrselect({
  28. placeholder: "请选择学期",
  29. allowSearch: true,
  30. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
  31. value: 'value',
  32. text: 'text'
  33. });
  34. // 刷新
  35. $('#lr_refresh').on('click', function () {
  36. location.reload();
  37. });
  38. },
  39. // 初始化列表
  40. initGird: function () {
  41. $('#gridtable').lrAuthorizeJfGridLei({
  42. url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/GetStatistics',
  43. headData: [
  44. { label: "学年", name: "AcademicYearNo", width: 50, align: "left" },
  45. { label: "学期", name: "Semester", width: 50, align: "left" },
  46. { label: "教材名称", name: "TextBookName", width: 150, align: "left" },
  47. { label: "出版号", name: "PublishNo", width: 100, align: "left" },
  48. { label: "第一作者", name: "FirstAuthor", width: 100, align: "left" },
  49. { label: "其他作者", name: "OtherAuthor", width: 100, align: "left" },
  50. {
  51. label: "出版日期", name: "Pubdate", width: 80, align: "left",
  52. formatter: function (value) {
  53. return learun.formatDate(value, 'yyyy-MM-dd');
  54. }
  55. },
  56. { label: "出版社", name: "Publisher", width: 100, align: "left" },
  57. {
  58. label: "教材类型", name: "TextBookType", width: 100, align: "left",
  59. formatterAsync: function (callback, value, row, op, $cell) {
  60. learun.clientdata.getAsync('dataItem', {
  61. key: value,
  62. code: 'TextBookType',
  63. callback: function (_data) {
  64. callback(_data.text);
  65. }
  66. });
  67. }
  68. },
  69. {
  70. label: "教材性质", name: "TextBookNature", width: 100, align: "left",
  71. formatterAsync: function (callback, value, row, op, $cell) {
  72. learun.clientdata.getAsync('dataItem', {
  73. key: value,
  74. code: 'TextBookNature',
  75. callback: function (_data) {
  76. callback(_data.text);
  77. }
  78. });
  79. }
  80. },
  81. { label: "单价", name: "Price", width: 60, align: "left" },
  82. { label: "版次", name: "Edition", width: 100, align: "left" },
  83. { label: "印次", name: "Impression", width: 100, align: "left" },
  84. {
  85. label: "练习册", name: "IsWorkBook", width: 100, align: "left",
  86. formatter: function (cellvalue) {
  87. return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
  88. "<span class=\"label label-danger\">否</span>";
  89. }
  90. },
  91. {
  92. label: "教参教辅", name: "IsTeachConsult", width: 100, align: "left",
  93. formatter: function (cellvalue) {
  94. return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
  95. "<span class=\"label label-danger\">否</span>";
  96. }
  97. },
  98. { label: "订购数量", name: "DGNum", width: 200, align: "left" }
  99. ],
  100. mainId: 'PublishNo',
  101. sidx: 'PublishNo desc',
  102. isPage: true
  103. });
  104. page.search();
  105. },
  106. search: function (param) {
  107. param = param || {};
  108. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  109. }
  110. };
  111. refreshGirdData = function () {
  112. $('#gridtable').jfGridSet('reload');
  113. };
  114. page.init();
  115. }