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.
 
 
 
 
 
 

59 lines
2.0 KiB

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