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.
 
 
 
 
 
 

75 lines
2.9 KiB

  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 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. $('#EID').lrselect({
  25. allowSearch: true,
  26. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo',
  27. param: { strWhere: "1=1 " },
  28. value: "empid",
  29. text: "empname",
  30. select: function (item) {
  31. if (!!item) {
  32. $('#TCTitlesID').lrselectSet(item.professionaltitle);
  33. $('#TCTitlesPostLevel').lrselectSet(item.professionaltitlelevel);
  34. $('#TCTime').val(item.professionaltitlegettime);
  35. }
  36. }
  37. });
  38. $('#TCTitlesID').lrDataItemSelect({ code: 'jszc' });
  39. $('#TCTitlesNewID').lrDataItemSelect({ code: 'jszc' });
  40. $('#TCTitlesPostLevel').lrDataItemSelect({ code: 'TeacherTitlePostLevel' });
  41. $('#TCTitlesPostLevelNew').lrDataItemSelect({ code: 'TeacherTitlePostLevel' });
  42. },
  43. initData: function () {
  44. if (!!keyValue) {
  45. $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherTitleChange/GetFormData?keyValue=' + keyValue, function (data) {
  46. for (var id in data) {
  47. if (!!data[id].length && data[id].length > 0) {
  48. $('#' + id ).jfGridSet('refreshdata', data[id]);
  49. }
  50. else {
  51. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  52. }
  53. }
  54. });
  55. }
  56. }
  57. };
  58. // 保存数据
  59. acceptClick = function (callBack) {
  60. if (!$('body').lrValidform()) {
  61. return false;
  62. }
  63. var postData = {
  64. strEntity: JSON.stringify($('body').lrGetFormData())
  65. };
  66. $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/TeacherTitleChange/SaveForm?keyValue=' + keyValue, postData, function (res) {
  67. // 保存成功后才回调
  68. if (!!callBack) {
  69. callBack();
  70. }
  71. });
  72. };
  73. page.init();
  74. }