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
2.8 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-11-19 10:26
  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. $('#Status').lrRadioCheckbox({
  19. type: 'radio',
  20. code: 'YesOrNoInt',
  21. });
  22. //实习基地
  23. $('#IUnit').lrselect({
  24. text: 'name',
  25. value: 'id',
  26. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=PracticeBase',
  27. select: function (item) {
  28. if (item) {
  29. $('#IPost').lrselectRefresh({
  30. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
  31. param: { code: "PBPost", strWhere: "PBID='" + item.id + "'" }
  32. });
  33. }
  34. }
  35. });
  36. //实习岗位
  37. $('#IPost').lrselect({
  38. text: 'name',
  39. value: 'id',
  40. });
  41. $('#IPost').on("click",
  42. function () {
  43. var data1 = $('#IUnit').lrselectGet();
  44. if (!data1) {
  45. learun.alert.error('请先选择实习单位');
  46. }
  47. });
  48. },
  49. initData: function () {
  50. if (!!keyValue) {
  51. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/InternShipSignUp/GetFormData?keyValue=' + keyValue, function (data) {
  52. for (var id in data) {
  53. if (!!data[id].length && data[id].length > 0) {
  54. $('#' + id ).jfGridSet('refreshdata', data[id]);
  55. }
  56. else {
  57. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  58. }
  59. }
  60. });
  61. }
  62. }
  63. };
  64. // 保存数据
  65. acceptClick = function (callBack) {
  66. if (!$('body').lrValidform()) {
  67. return false;
  68. }
  69. var postData = {
  70. strEntity: JSON.stringify($('body').lrGetFormData())
  71. };
  72. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/InternShipSignUp/SaveForm?keyValue=' + keyValue, postData, function (res) {
  73. // 保存成功后才回调
  74. if (!!callBack) {
  75. callBack();
  76. }
  77. });
  78. };
  79. page.init();
  80. }