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.
 
 
 
 
 
 

107 lines
5.0 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2023-10-13 10:31
  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. page.initData();
  14. page.bind();
  15. },
  16. bind: function () {
  17. $('#AcademicYearNo').lrselect({
  18. placeholder: "请选择学年",
  19. allowSearch: true,
  20. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  21. value: 'value',
  22. text: 'text'
  23. });
  24. $('#Semester').lrDataItemSelect({ code: 'Semester' });
  25. $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname',allowSearch: true,maxHeight: 200, });
  26. $('#BookName').lrGirdSelect({
  27. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=TextBookInfo',
  28. param: { strWhere: " IsDel = '0' and IsValid ='true' " },
  29. height: 800,
  30. width: 1100,
  31. selectWord: 'textbookname',
  32. value: 'textbookname',
  33. text: 'textbookname',
  34. headData:
  35. [
  36. { label: "教材号", name: "publishno", width: 150, align: "left" },
  37. { label: "教材名称", name: "textbookname", width: 150, align: "left" },
  38. { label: "教材名称", name: "textbookno", width: 150, align: "left" },
  39. { label: "作者", name: "firstauthor", width: 150, align: "left" },
  40. { label: "其他作者", name: "otherauthor", width: 100, align: "left" },
  41. { label: "出版社", name: "publisher", width: 100, align: "left" },
  42. {
  43. label: "教材类型", name: "textbooktype", width: 100, align: "left",
  44. formatterAsync: function (callback, value, row, op, $cell) {
  45. learun.clientdata.getAsync('dataItem', {
  46. key: value,
  47. code: 'TextBookType',
  48. callback: function (_data) {
  49. callback(_data.text);
  50. }
  51. });
  52. }
  53. },
  54. {
  55. label: "教材性质", name: "textbooknature", width: 100, align: "left",
  56. formatterAsync: function (callback, value, row, op, $cell) {
  57. learun.clientdata.getAsync('dataItem', {
  58. key: value,
  59. code: 'TextBookNature',
  60. callback: function (_data) {
  61. callback(_data.text);
  62. }
  63. });
  64. }
  65. },
  66. { label: "价格", name: "price", width: 50, align: "left" },
  67. { label: "版次", name: "edition", width: 100, align: "left" },
  68. { label: "印次", name: "impression", width: 100, align: "left" },
  69. ],
  70. select: function (item) {
  71. ////赋值
  72. $("#BookNo").val(item.textbookno);
  73. $("#BookName").val(item.textbookname);
  74. }
  75. });
  76. },
  77. initData: function () {
  78. if (!!keyValue) {
  79. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/BookPayDetail/GetFormData?keyValue=' + keyValue, function (data) {
  80. for (var id in data) {
  81. if (!!data[id].length && data[id].length > 0) {
  82. $('#' + id).jfGridSet('refreshdata', data[id]);
  83. }
  84. else {
  85. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  86. }
  87. }
  88. });
  89. }
  90. }
  91. };
  92. // 保存数据
  93. acceptClick = function (callBack) {
  94. if (!$('#form').lrValidform()) {
  95. return false;
  96. }
  97. var postData = $('#form').lrGetFormData();
  98. learun.postForm(top.$.rootUrl + '/EducationalAdministration/BookPayDetail/ClassForm', { classno: postData.ClassNo,bookno:postData.BookNo,AcademicYearNo:postData.AcademicYearNo,Semester:postData.Semester },function (res) {
  99. var index = top.layer.getFrameIndex(window.name);
  100. top.layer.close(index);
  101. });
  102. };
  103. page.init();
  104. }