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.

Index.js 6.5 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-03-19 17:02
  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. //$('#EID').lrUserSelect(0);
  20. // 刷新
  21. $('#lr_refresh').on('click', function () {
  22. location.reload();
  23. });
  24. // 新增
  25. $('#lr_add').on('click', function () {
  26. learun.layerForm({
  27. id: 'form',
  28. title: '新增',
  29. url: top.$.rootUrl + '/PersonnelManagement/TeacherTitleChange/Form',
  30. width: 1000,
  31. height: 600,
  32. callBack: function (id) {
  33. return top[id].acceptClick(refreshGirdData);
  34. }
  35. });
  36. });
  37. // 编辑
  38. $('#lr_edit').on('click', function () {
  39. var keyValue = $('#gridtable').jfGridValue('TCID');
  40. if (learun.checkrow(keyValue)) {
  41. learun.layerForm({
  42. id: 'form',
  43. title: '编辑',
  44. url: top.$.rootUrl + '/PersonnelManagement/TeacherTitleChange/Form?keyValue=' + keyValue,
  45. width: 1000,
  46. height: 600,
  47. callBack: function (id) {
  48. return top[id].acceptClick(refreshGirdData);
  49. }
  50. });
  51. }
  52. });
  53. // 删除
  54. $('#lr_delete').on('click', function () {
  55. var keyValue = $('#gridtable').jfGridValue('TCID');
  56. if (learun.checkrow(keyValue)) {
  57. learun.layerConfirm('是否确认删除该项!', function (res) {
  58. if (res) {
  59. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherTitleChange/DeleteForm', { keyValue: keyValue}, function () {
  60. refreshGirdData();
  61. });
  62. }
  63. });
  64. }
  65. });
  66. },
  67. // 初始化列表
  68. initGird: function () {
  69. $('#gridtable').lrAuthorizeJfGrid({
  70. url: top.$.rootUrl + '/PersonnelManagement/TeacherTitleChange/GetPageList',
  71. headData: [
  72. {
  73. label: "教师姓名", name: "EID", width: 100, align: "left",
  74. formatterAsync: function (callback, value, row, op, $cell) {
  75. learun.clientdata.getAsync('custmerData', {
  76. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
  77. key: value,
  78. keyId: 'empid',
  79. callback: function (_data) {
  80. callback(_data['empname']);
  81. }
  82. });
  83. }
  84. },
  85. { label: "原职称", name: "TCTitlesID", width: 100, align: "left",
  86. formatterAsync: function (callback, value, row, op,$cell) {
  87. learun.clientdata.getAsync('dataItem', {
  88. key: value,
  89. code: 'jszc',
  90. callback: function (_data) {
  91. callback(_data.text);
  92. }
  93. });
  94. }
  95. },
  96. {
  97. label: "原职称岗位等级", name: "TCTitlesPostLevel", width: 150, align: "left",
  98. formatterAsync: function (callback, value, row, op, $cell) {
  99. learun.clientdata.getAsync('dataItem', {
  100. key: value,
  101. code: 'TeacherTitlePostLevel',
  102. callback: function (_data) {
  103. callback(_data.text);
  104. }
  105. });
  106. }
  107. },
  108. { label: "获得时间", name: "TCTime", width: 100, align: "left"},
  109. { label: "现职称", name: "TCTitlesNewID", width: 100, align: "left",
  110. formatterAsync: function (callback, value, row, op,$cell) {
  111. learun.clientdata.getAsync('dataItem', {
  112. key: value,
  113. code: 'jszc',
  114. callback: function (_data) {
  115. callback(_data.text);
  116. }
  117. });
  118. }
  119. },
  120. {
  121. label: "现职称岗位等级", name: "TCTitlesPostLevelNew", width: 150, align: "left",
  122. formatterAsync: function (callback, value, row, op, $cell) {
  123. learun.clientdata.getAsync('dataItem', {
  124. key: value,
  125. code: 'TeacherTitlePostLevel',
  126. callback: function (_data) {
  127. callback(_data.text);
  128. }
  129. });
  130. }
  131. },
  132. { label: "变更日期", name: "TCChangeTime", width: 100, align: "left"},
  133. { label: "变更原因", name: "TCChangeReason", width: 100, align: "left"},
  134. ],
  135. mainId:'TCID',
  136. isPage: true
  137. });
  138. page.search();
  139. },
  140. search: function (param) {
  141. param = param || {};
  142. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  143. }
  144. };
  145. refreshGirdData = function () {
  146. page.search();
  147. };
  148. page.init();
  149. }