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 lines
3.3 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-12-17 14:29
  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. //学年
  19. $('#AcademicYearNo').lrselect({
  20. placeholder: "请选择学年",
  21. allowSearch: true,
  22. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  23. value: 'value',
  24. text: 'text'
  25. });
  26. //学期
  27. $('#Semester').lrselect({
  28. placeholder: "请选择学年",
  29. allowSearch: true,
  30. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
  31. value: 'value',
  32. text: 'text'
  33. });
  34. $('#DeptNo').lrDataSourceSelect({
  35. code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) {
  36. if (item) {
  37. $('#MajorNo').lrselectRefresh({
  38. allowSearch: true,
  39. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  40. param: { strWhere: "deptno='" + item.deptno + "' AND CheckMark=1" }
  41. });
  42. } else {
  43. $('#MajorNo').lrselectRefresh({
  44. allowSearch: true,
  45. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  46. param: { strWhere: "CheckMark=1" }
  47. });
  48. }
  49. }
  50. });
  51. $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' });
  52. $('#ProgramFile').lrUploader();
  53. },
  54. initData: function () {
  55. if (!!keyValue) {
  56. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/GetFormData?keyValue=' + keyValue, function (data) {
  57. for (var id in data) {
  58. if (!!data[id].length && data[id].length > 0) {
  59. $('#' + id ).jfGridSet('refreshdata', data[id]);
  60. }
  61. else {
  62. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  63. }
  64. }
  65. });
  66. }
  67. }
  68. };
  69. // 保存数据
  70. acceptClick = function (callBack) {
  71. if (!$('body').lrValidform()) {
  72. return false;
  73. }
  74. var postData = {
  75. strEntity: JSON.stringify($('body').lrGetFormData())
  76. };
  77. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/SaveForm?keyValue=' + keyValue, postData, function (res) {
  78. // 保存成功后才回调
  79. if (!!callBack) {
  80. callBack();
  81. }
  82. });
  83. };
  84. page.init();
  85. }