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.
 
 
 
 
 
 

86 regels
2.8 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-10-15 10:08
  5. * 描 述:教学计划--课程子表
  6. */
  7. var acceptClick;
  8. var keyValue = request('keyValue');
  9. var selectedRow;
  10. var bootstrap = function ($, learun) {
  11. "use strict";
  12. selectedRow = top["layer_form_FormManage"].selectedRow;
  13. var page = {
  14. init: function () {
  15. $('.lr-form-wrap').lrscroll();
  16. page.bind();
  17. page.initData();
  18. },
  19. bind: function () {
  20. $('#LessonNo').hide();
  21. },
  22. initData: function () {
  23. //if (!!keyValue) {
  24. // $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TeachingPlanItem/GetFormData?keyValue=' + keyValue, function (data) {
  25. // for (var id in data) {
  26. // if (!!data[id].length && data[id].length > 0) {
  27. // $('#' + id ).jfGridSet('refreshdata', data[id]);
  28. // }
  29. // else {
  30. // $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  31. // }
  32. // }
  33. // });
  34. //}
  35. if (!!keyValue) {
  36. if (!!selectedRow) {
  37. $('#form').lrSetFormData(selectedRow);
  38. if (!!selectedRow.LessonNo) {
  39. learun.clientdata.getAsync('custmerData', {
  40. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
  41. key: selectedRow.LessonNo,
  42. keyId: 'lessonno',
  43. callback: function (_data) {
  44. $('#LessonName').val(_data['lessonname']);
  45. }
  46. });
  47. }
  48. }
  49. }
  50. }
  51. };
  52. // 保存数据
  53. acceptClick = function (callBack) {
  54. if (!$('body').lrValidform()) {
  55. return false;
  56. }
  57. //var postData = {
  58. // strEntity: JSON.stringify($('body').lrGetFormData())
  59. //};
  60. //$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TeachingPlanItem/SaveForm?keyValue=' + keyValue, postData, function (res) {
  61. // // 保存成功后才回调
  62. // if (!!callBack) {
  63. // callBack();
  64. // }
  65. //});
  66. var postData = $('body').lrGetFormData();
  67. if (!!keyValue) {
  68. if (!!selectedRow) {
  69. postData.Id = selectedRow.Id;
  70. }
  71. } else {
  72. postData.Id = learun.newGuid();
  73. }
  74. if (!!callBack) {
  75. callBack(postData);
  76. return true;
  77. }
  78. };
  79. page.init();
  80. }