Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

184 Zeilen
8.8 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. $('#IsPay').lrDataItemSelect({ code: 'YesOrNoBit' });
  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. $("#Price").val(item.price);
  73. $("#BookNo").val(item.textbookno);
  74. $("#BookName").val(item.textbookname);
  75. }
  76. });
  77. $('#StuNo').lrGirdSelect({
  78. // 字段
  79. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic',
  80. selectWord: 'stuname',
  81. value: 'stuno',
  82. text: 'stuno',
  83. headData: [
  84. { label: "学号", name: "stuno", width: 100, align: "left" },
  85. { label: "姓名", name: "stuname", width: 100, align: "left" },
  86. {
  87. label: "性别", name: "genderno", width: 80, align: "left",
  88. formatter: function (cellvalue) {
  89. return cellvalue == true ? "男" : "女";
  90. }
  91. },
  92. {
  93. label: "系部", name: "deptno", width: 100, align: "left",
  94. formatterAsync: function (callback, value, row, op, $cell) {
  95. learun.clientdata.getAsync('custmerData', {
  96. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  97. key: value,
  98. keyId: 'deptno',
  99. callback: function (_data) {
  100. callback(_data['deptname']);
  101. }
  102. });
  103. }
  104. },
  105. {
  106. label: "专业", name: "majorno", width: 100, align: "left",
  107. formatterAsync: function (callback, value, row, op, $cell) {
  108. learun.clientdata.getAsync('custmerData', {
  109. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  110. key: value,
  111. keyId: 'majorno',
  112. callback: function (_data) {
  113. callback(_data['majorname']);
  114. }
  115. });
  116. }
  117. },
  118. {
  119. label: "班级", name: "classno", width: 100, align: "left",
  120. formatterAsync: function (callback, value, row, op, $cell) {
  121. learun.clientdata.getAsync('custmerData', {
  122. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  123. key: value,
  124. keyId: 'classno',
  125. callback: function (_data) {
  126. callback(_data['classname']);
  127. }
  128. });
  129. }
  130. },
  131. { label: "年级", name: "grade", width: 100, align: "left" },
  132. { label: "身份证", name: "identitycardno", width: 100, align: "left" },
  133. ],
  134. select: function (item) {
  135. $("#StuNo").val(item.stuno);
  136. $("#StuName").val(item.stuname);
  137. $("#DeptNo").lrselectSet(item.deptno);
  138. $("#MajorNo").lrselectSet(item.majorno);
  139. $("#ClassNo").lrselectSet(item.classno);
  140. $("#Grade").lrselectSet(item.grade);
  141. $("#IdCardNo").val(item.identitycardno);
  142. }
  143. });
  144. $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
  145. $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
  146. $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
  147. $('#Grade').lrselect({
  148. url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
  149. value: 'value',
  150. text: 'text'
  151. });
  152. },
  153. initData: function () {
  154. if (!!keyValue) {
  155. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/BookPayDetail/GetFormData?keyValue=' + keyValue, function (data) {
  156. for (var id in data) {
  157. if (!!data[id].length && data[id].length > 0) {
  158. $('#' + id).jfGridSet('refreshdata', data[id]);
  159. }
  160. else {
  161. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  162. }
  163. }
  164. });
  165. }
  166. }
  167. };
  168. // 保存数据
  169. acceptClick = function (callBack) {
  170. if (!$('#form').lrValidform()) {
  171. return false;
  172. }
  173. var postData = $('#form').lrGetFormData();
  174. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/BookPayDetail/SaveForm?keyValue=' + keyValue, postData, function (res) {
  175. // 保存成功后才回调
  176. if (!!callBack) {
  177. callBack();
  178. }
  179. });
  180. };
  181. page.init();
  182. }