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.
 
 
 
 
 
 

71 lines
2.5 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-03-19 17:31
  5. * 描 述:教师职务变
  6. */
  7. var acceptClick;
  8. var keyValue = request('keyValue');
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. $('.lr-form-wrap').lrscroll();
  14. page.bind();
  15. page.initData();
  16. },
  17. bind: function () {
  18. $('#EID').lrformselect({
  19. layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm',
  20. layerUrlW: 400,
  21. layerUrlH: 300,
  22. dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds'
  23. });
  24. $('#TCDepartID').lrselect({
  25. type: 'tree',
  26. allowSearch: true,
  27. url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree',
  28. param: {}
  29. });
  30. $('#TCPostID').lrDataItemSelect({ code: 'jsgw' });
  31. $('#TCDepartNewID').lrselect({
  32. type: 'tree',
  33. allowSearch: true,
  34. url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree',
  35. param: {}
  36. });
  37. $('#TCPostNewID').lrDataItemSelect({ code: 'jsgw' });
  38. },
  39. initData: function () {
  40. if (!!keyValue) {
  41. $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherPostChange/GetFormData?keyValue=' + keyValue, function (data) {
  42. for (var id in data) {
  43. if (!!data[id].length && data[id].length > 0) {
  44. $('#' + id ).jfGridSet('refreshdata', data[id]);
  45. }
  46. else {
  47. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  48. }
  49. }
  50. });
  51. }
  52. }
  53. };
  54. // 保存数据
  55. acceptClick = function (callBack) {
  56. if (!$('body').lrValidform()) {
  57. return false;
  58. }
  59. var postData = {
  60. strEntity: JSON.stringify($('body').lrGetFormData())
  61. };
  62. $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/TeacherPostChange/SaveForm?keyValue=' + keyValue, postData, function (res) {
  63. // 保存成功后才回调
  64. if (!!callBack) {
  65. callBack();
  66. }
  67. });
  68. };
  69. page.init();
  70. }