No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

133 líneas
5.6 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-06-18 10:08
  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. $('#StuNo').lrGirdSelect({
  35. // 字段
  36. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic',
  37. selectWord: 'stuno',
  38. value: 'stuno',
  39. text: 'stuno',
  40. headData: [
  41. { label: "学号", name: "stuno", width: 100, align: "left" },
  42. { label: "姓名", name: "stuname", width: 100, align: "left" },
  43. {
  44. label: "性别", name: "genderno", width: 80, align: "left",
  45. formatter: function (cellvalue) {
  46. return cellvalue == true ? "男" : "女";
  47. }
  48. },
  49. { label: "身份证号", name: "identitycardno", width: 100, align: "left" },
  50. {
  51. label: "系所", name: "deptno", width: 100, align: "left",
  52. formatterAsync: function (callback, value, row, op, $cell) {
  53. learun.clientdata.getAsync('custmerData', {
  54. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  55. key: value,
  56. keyId: 'deptno',
  57. callback: function (_data) {
  58. callback(_data['deptname']);
  59. }
  60. });
  61. }
  62. },
  63. {
  64. label: "专业", name: "majorno", width: 100, align: "left",
  65. formatterAsync: function (callback, value, row, op, $cell) {
  66. learun.clientdata.getAsync('custmerData', {
  67. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  68. key: value,
  69. keyId: 'majorno',
  70. callback: function (_data) {
  71. callback(_data['majorname']);
  72. }
  73. });
  74. }
  75. },
  76. {
  77. label: "班级", name: "classno", width: 100, align: "left",
  78. formatterAsync: function (callback, value, row, op, $cell) {
  79. learun.clientdata.getAsync('custmerData', {
  80. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  81. key: value,
  82. keyId: 'classno',
  83. callback: function (_data) {
  84. callback(_data['classname']);
  85. }
  86. });
  87. }
  88. },
  89. { label: "年级", name: "grade", width: 100, align: "left" }
  90. ],
  91. select: function (item) {
  92. $("#StuName").val(item.stuname);
  93. $("#ClassNo").val(item.classno);
  94. $("#MajorNo").val(item.majorno);
  95. $("#DeptNo").val(item.deptno);
  96. $("#Grade").val(item.grade);
  97. }
  98. });
  99. },
  100. initData: function () {
  101. if (!!keyValue) {
  102. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEncourgement/GetFormData?keyValue=' + keyValue, function (data) {
  103. for (var id in data) {
  104. if (!!data[id].length && data[id].length > 0) {
  105. $('#' + id ).jfGridSet('refreshdata', data[id]);
  106. }
  107. else {
  108. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  109. }
  110. }
  111. });
  112. }
  113. }
  114. };
  115. // 保存数据
  116. acceptClick = function (callBack) {
  117. if (!$('body').lrValidform()) {
  118. return false;
  119. }
  120. var postData = {
  121. strEntity: JSON.stringify($('body').lrGetFormData())
  122. };
  123. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEncourgement/SaveForm?keyValue=' + keyValue, postData, function (res) {
  124. // 保存成功后才回调
  125. if (!!callBack) {
  126. callBack();
  127. }
  128. });
  129. };
  130. page.init();
  131. }