Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-02-27 09:35
  5. * 描 述:TextBookIndentDetail
  6. */
  7. var selectedRow;
  8. var refreshGirdData;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. page.initGird();
  14. page.bind();
  15. },
  16. bind: function () {
  17. // 查询
  18. $('#btn_Search').on('click', function () {
  19. var keyword = $('#txt_Keyword').val();
  20. page.search({ keyword: keyword });
  21. });
  22. $('#ClassNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
  23. // 刷新
  24. $('#lr_refresh').on('click', function () {
  25. location.reload();
  26. });
  27. // 新增
  28. $('#lr_add').on('click', function () {
  29. selectedRow = null;
  30. learun.layerForm({
  31. id: 'form',
  32. title: '新增',
  33. url: top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/Form',
  34. width: 700,
  35. height: 400,
  36. callBack: function (id) {
  37. return top[id].acceptClick(refreshGirdData);
  38. }
  39. });
  40. });
  41. // 编辑
  42. $('#lr_edit').on('click', function () {
  43. var keyValue = $('#gridtable').jfGridValue('ID');
  44. selectedRow = $('#gridtable').jfGridGet('rowdata');
  45. if (learun.checkrow(keyValue)) {
  46. learun.layerForm({
  47. id: 'form',
  48. title: '编辑',
  49. url: top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/Form?keyValue=' + keyValue,
  50. width: 700,
  51. height: 400,
  52. callBack: function (id) {
  53. return top[id].acceptClick(refreshGirdData);
  54. }
  55. });
  56. }
  57. });
  58. // 删除
  59. $('#lr_delete').on('click', function () {
  60. var keyValue = $('#gridtable').jfGridValue('ID');
  61. if (learun.checkrow(keyValue)) {
  62. learun.layerConfirm('是否确认删除该项!', function (res) {
  63. if (res) {
  64. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/DeleteForm', { keyValue: keyValue}, function () {
  65. });
  66. }
  67. });
  68. }
  69. });
  70. },
  71. initGird: function () {
  72. $('#gridtable').lrAuthorizeJfGrid({
  73. url: top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/GetPageList',
  74. headData: [
  75. { label: 'ID', name: 'ID', width: 200, align: "left" },
  76. { label: 'IndentId', name: 'IndentId', width: 200, align: "left" },
  77. { label: 'DeptNo', name: 'DeptNo', width: 200, align: "left" },
  78. { label: 'MajorNo', name: 'MajorNo', width: 200, align: "left" },
  79. { label: 'ClassNo', name: 'ClassNo', width: 200, align: "left" },
  80. { label: 'TeachSum', name: 'TeachSum', width: 200, align: "left" },
  81. { label: 'StuSum', name: 'StuSum', width: 200, align: "left" },
  82. { label: 'Price', name: 'Price', width: 200, align: "left" },
  83. { label: 'BookNo', name: 'BookNo', width: 200, align: "left" },
  84. { label: 'BooName', name: 'BooName', width: 200, align: "left" },
  85. { label: '出版号', name: 'PublishNo', width: 200, align: "left" },
  86. { label: 'Remark', name: 'Remark', width: 200, align: "left" },
  87. { label: 'CreateTime', name: 'CreateTime', width: 200, align: "left" },
  88. { label: 'CreateUserID', name: 'CreateUserID', width: 200, align: "left" },
  89. { label: 'LessonNo', name: 'LessonNo', width: 200, align: "left" },
  90. ],
  91. mainId:'ID',
  92. isPage: true
  93. });
  94. page.search();
  95. },
  96. search: function (param) {
  97. param = param || {};
  98. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  99. }
  100. };
  101. refreshGirdData = function () {
  102. $('#gridtable').jfGridSet('reload');
  103. };
  104. page.init();
  105. }