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.
 
 
 
 
 
 

121 lines
5.2 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-05-10 11:32
  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. }, 200, 200);
  19. // 刷新
  20. $('#lr_refresh').on('click', function () {
  21. location.reload();
  22. });
  23. // 新增
  24. $('#lr_add').on('click', function () {
  25. learun.layerForm({
  26. id: 'form',
  27. title: '新增',
  28. url: top.$.rootUrl + '/PersonnelManagement/FundExaminer/Form',
  29. width: 600,
  30. height: 400,
  31. callBack: function (id) {
  32. return top[id].acceptClick(refreshGirdData);
  33. }
  34. });
  35. });
  36. // 编辑
  37. $('#lr_edit').on('click', function () {
  38. var keyValue = $('#gridtable').jfGridValue('ExaminerID');
  39. if (learun.checkrow(keyValue)) {
  40. learun.layerForm({
  41. id: 'form',
  42. title: '编辑',
  43. url: top.$.rootUrl + '/PersonnelManagement/FundExaminer/Form?keyValue=' + keyValue,
  44. width: 600,
  45. height: 400,
  46. callBack: function (id) {
  47. return top[id].acceptClick(refreshGirdData);
  48. }
  49. });
  50. }
  51. });
  52. // 删除
  53. $('#lr_delete').on('click', function () {
  54. var keyValue = $('#gridtable').jfGridValue('ExaminerID');
  55. if (learun.checkrow(keyValue)) {
  56. learun.layerConfirm('是否确认删除该项!', function (res) {
  57. if (res) {
  58. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/FundExaminer/DeleteForm', { keyValue: keyValue}, function () {
  59. refreshGirdData();
  60. });
  61. }
  62. });
  63. }
  64. });
  65. },
  66. // 初始化列表
  67. initGird: function () {
  68. $('#gridtable').lrAuthorizeJfGrid({
  69. url: top.$.rootUrl + '/PersonnelManagement/FundExaminer/GetPageList',
  70. headData: [
  71. { label: "姓名:", name: "ExaminerName", width: 100, align: "left"},
  72. { label: "电话号码:", name: "ExaminerIphone", width: 100, align: "left"},
  73. { label: "工号:", name: "ExaminerNumber", width: 100, align: "left"},
  74. { label: "所属部门", name: "FundDepartment", width: 100, align: "left",
  75. formatterAsync: function (callback, value, row, op,$cell) {
  76. learun.clientdata.getAsync('custmerData', {
  77. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  78. key: value,
  79. keyId: 'id',
  80. callback: function (_data) {
  81. callback(_data['name']);
  82. }
  83. });
  84. }},
  85. { label: "教职工类别", name: "StaffCategory", width: 100, align: "left",
  86. formatterAsync: function (callback, value, row, op,$cell) {
  87. learun.clientdata.getAsync('dataItem', {
  88. key: value,
  89. code: 'EmpSort',
  90. callback: function (_data) {
  91. callback(_data.text);
  92. }
  93. });
  94. }},
  95. { label: "是否启用:", name: "ExaminerState", width: 100, align: "left",
  96. formatterAsync: function (callback, value, row, op,$cell) {
  97. learun.clientdata.getAsync('dataItem', {
  98. key: value,
  99. code: 'EnableStatus',
  100. callback: function (_data) {
  101. callback(_data.text);
  102. }
  103. });
  104. }},
  105. ],
  106. mainId:'ExaminerID',
  107. isPage: true
  108. });
  109. page.search();
  110. },
  111. search: function (param) {
  112. param = param || {};
  113. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  114. }
  115. };
  116. refreshGirdData = function () {
  117. $('#gridtable').jfGridSet('reload');
  118. };
  119. page.init();
  120. }