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.
 
 
 
 
 
 

60 lines
2.1 KiB

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