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.
 
 
 
 
 
 

64 lines
2.2 KiB

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