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.
 
 
 
 
 
 

112 lines
4.5 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-08-05 09:35
  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. $('#Name').lrDataItemSelect({ code: 'GraduateCondition' });
  20. $('#EnabledMark').lrRadioCheckbox({
  21. type: 'radio',
  22. code: 'YesOrNoInt',
  23. });
  24. // 刷新
  25. $('#lr_refresh').on('click', function () {
  26. location.reload();
  27. });
  28. // 新增
  29. $('#lr_add').on('click', function () {
  30. learun.layerForm({
  31. id: 'form',
  32. title: '新增',
  33. url: top.$.rootUrl + '/EducationalAdministration/StuGraduateCondition/Form',
  34. width: 600,
  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. if (learun.checkrow(keyValue)) {
  45. learun.layerForm({
  46. id: 'form',
  47. title: '编辑',
  48. url: top.$.rootUrl + '/EducationalAdministration/StuGraduateCondition/Form?keyValue=' + keyValue,
  49. width: 600,
  50. height: 400,
  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/StuGraduateCondition/DeleteForm', { keyValue: keyValue}, function () {
  64. refreshGirdData();
  65. });
  66. }
  67. });
  68. }
  69. });
  70. },
  71. // 初始化列表
  72. initGird: function () {
  73. $('#gridtable').lrAuthorizeJfGrid({
  74. url: top.$.rootUrl + '/EducationalAdministration/StuGraduateCondition/GetPageList',
  75. headData: [
  76. { label: "条件", name: "Name", width: 300, align: "left",
  77. formatterAsync: function (callback, value, row, op,$cell) {
  78. learun.clientdata.getAsync('dataItem', {
  79. key: value,
  80. code: 'GraduateCondition',
  81. callback: function (_data) {
  82. callback(_data.text);
  83. }
  84. });
  85. }},
  86. { label: "启用", name: "EnabledMark", width: 100, align: "left",
  87. formatterAsync: function (callback, value, row, op,$cell) {
  88. learun.clientdata.getAsync('dataItem', {
  89. key: value,
  90. code: 'YesOrNoInt',
  91. callback: function (_data) {
  92. callback(_data.text);
  93. }
  94. });
  95. }},
  96. ],
  97. mainId:'Id',
  98. isPage: true
  99. });
  100. page.search();
  101. },
  102. search: function (param) {
  103. param = param || {};
  104. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  105. }
  106. };
  107. refreshGirdData = function () {
  108. $('#gridtable').jfGridSet('reload');
  109. };
  110. page.init();
  111. }