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.
 
 
 
 
 
 

64 lines
2.2 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-03-19 16:42
  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').lrselect({
  19. allowSearch: true,
  20. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo',
  21. param: { strWhere: "1=1 " },
  22. value: "empid",
  23. text: "empname",
  24. select: function (item) {
  25. if (!!item) {
  26. $('#EStatus').lrselectSet(item.isinactivestatus);
  27. }
  28. }
  29. });
  30. $('#EStatus').lrDataItemSelect({ code: 'JobStatus' });
  31. },
  32. initData: function () {
  33. if (!!keyValue) {
  34. $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherDimission/GetFormData?keyValue=' + keyValue, function (data) {
  35. for (var id in data) {
  36. if (!!data[id].length && data[id].length > 0) {
  37. $('#' + id).jfGridSet('refreshdata', data[id]);
  38. }
  39. else {
  40. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  41. }
  42. }
  43. });
  44. }
  45. }
  46. };
  47. // 保存数据
  48. acceptClick = function (callBack) {
  49. if (!$('body').lrValidform()) {
  50. return false;
  51. }
  52. var postData = {
  53. strEntity: JSON.stringify($('body').lrGetFormData())
  54. };
  55. $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/TeacherDimission/SaveForm?keyValue=' + keyValue, postData, function (res) {
  56. // 保存成功后才回调
  57. if (!!callBack) {
  58. callBack();
  59. }
  60. });
  61. };
  62. page.init();
  63. }