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.
 
 
 
 
 
 

219 Zeilen
9.7 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-09-24 17:38
  5. * 描 述:奖励惩罚管理
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. page.search(queryJson);
  18. }, 220, 400);
  19. $('#NatureType').lrGirdSelect({
  20. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=AwardSource',
  21. selectWord: 'id',
  22. value: 'id',
  23. text: 'awardname',
  24. headData:
  25. [
  26. { label: "奖励类型", name: "awardname", width: 100, align: "left" },
  27. {
  28. label: '奖励属性', name: 'naturetype', width: 100, align: "left",
  29. formatter: function (val) {
  30. if (val == '0') {
  31. return '集体';
  32. } else {
  33. return '个人';
  34. }
  35. }
  36. },
  37. {
  38. label: "奖励级别",name: "awardtype",width: 100,align: "left",
  39. formatterAsync: function(callback, value, row, op, $cell) {
  40. learun.clientdata.getAsync('dataItem',
  41. {
  42. key: value,
  43. code: 'EncouragementDegree',
  44. callback: function(_data) {
  45. callback(_data.text);
  46. }
  47. });
  48. },
  49. }
  50. ],
  51. select: function (item) {
  52. $("#NatureType").val(item.awardname);
  53. $("#shuxing").val(item.naturetype);
  54. $("#awardtype").val(item.awardtype);
  55. }
  56. });
  57. $('#StuName').lrGirdSelect({
  58. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic',
  59. selectWord: 'stuno',
  60. value: 'stuno',
  61. text: 'stuname',
  62. headData:
  63. [
  64. { label: "学号", name: "stuno", width: 100, align: "left" },
  65. { label: "姓名", name: "stuname", width: 100, align: "left" },
  66. {
  67. label: "班级", name: "classno", width: 100, align: "left",
  68. formatterAsync: function (callback, value, row, op, $cell) {
  69. learun.clientdata.getAsync('custmerData', {
  70. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  71. key: value,
  72. keyId: 'classno',
  73. callback: function (_data) {
  74. callback(_data['classname']);
  75. }
  76. });
  77. }
  78. },
  79. ],
  80. select: function (item) {
  81. $("#StuId").val(item.stuno);
  82. $("#RewardObjects").val(item.stuname);
  83. $("#ClassNo").val(item.classno);
  84. }
  85. });
  86. //$('#FileAddress').lrUploader();
  87. // 刷新
  88. $('#lr_refresh').on('click', function () {
  89. location.reload();
  90. });
  91. // 新增
  92. $('#lr_add').on('click', function () {
  93. learun.layerForm({
  94. id: 'form',
  95. title: '新增',
  96. url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/AwardForm',
  97. width: 600,
  98. height: 400,
  99. callBack: function (id) {
  100. return top[id].acceptClick(refreshGirdData);
  101. }
  102. });
  103. });
  104. // 编辑
  105. $('#lr_edit').on('click', function () {
  106. var keyValue = $('#gridtable').jfGridValue('Id');
  107. if (learun.checkrow(keyValue)) {
  108. learun.layerForm({
  109. id: 'form',
  110. title: '编辑',
  111. url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/AwardForm?keyValue=' + keyValue,
  112. width: 600,
  113. height: 400,
  114. callBack: function (id) {
  115. return top[id].acceptClick(refreshGirdData);
  116. }
  117. });
  118. }
  119. });
  120. // 删除
  121. $('#lr_delete').on('click', function () {
  122. var keyValue = $('#gridtable').jfGridValue('Id');
  123. if (learun.checkrow(keyValue)) {
  124. learun.layerConfirm('是否确认删除该项!', function (res) {
  125. if (res) {
  126. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/DeleteForm', { keyValue: keyValue }, function () {
  127. refreshGirdData();
  128. });
  129. }
  130. });
  131. }
  132. });
  133. },
  134. // 初始化列表
  135. initGird: function () {
  136. $('#gridtable').lrAuthorizeJfGrid({
  137. url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetPageList',
  138. headData: [
  139. {
  140. label: "获奖对象", name: "RewardObjects", width: 100, align: "left",
  141. formatterAsync: function (callback, value, row, op, $cell) {
  142. learun.clientdata.getAsync('custmerData', {
  143. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic',
  144. key: value,
  145. keyId: 'stuno',
  146. callback: function (_data) {
  147. callback(_data['stuname']);
  148. }
  149. });
  150. }
  151. },
  152. {
  153. label: "班级", name: "ClassNo", width: 200, align: "left",
  154. formatterAsync: function (callback, value, row, op, $cell) {
  155. learun.clientdata.getAsync('custmerData', {
  156. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  157. key: value,
  158. keyId: 'classno',
  159. callback: function (_data) {
  160. callback(_data['classname']);
  161. }
  162. });
  163. }
  164. },
  165. {
  166. label: "奖励类型", name: "NatureType", width: 100, align: "left",
  167. formatterAsync: function (callback, value, row, op, $cell) {
  168. learun.clientdata.getAsync('custmerData', {
  169. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardSource',
  170. key: value,
  171. keyId: 'id',
  172. callback: function (_data) {
  173. callback(_data['awardname']);
  174. }
  175. });
  176. }
  177. },
  178. {
  179. label: '奖励属性', name: 'NatureType', width: 100, align: "left",
  180. formatter: function (val) {
  181. if (val == '0') {
  182. return '集体';
  183. } else {
  184. return '个人';
  185. }
  186. }
  187. },
  188. { label: "获奖时间", name: "WinningTime", width: 100, align: "left" },
  189. ],
  190. mainId: 'Id',
  191. isMultiselect: true,
  192. isPage: true
  193. });
  194. page.search();
  195. },
  196. search: function (param) {
  197. param = param || {};
  198. param.IsVaild = '0'
  199. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  200. },
  201. downLoad: function (fileId) {
  202. top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: top.$.lrToken }, method: 'POST' });
  203. }
  204. };
  205. refreshGirdData = function () {
  206. $('#gridtable').jfGridSet('reload');
  207. };
  208. page.init();
  209. }
  210. function downLoad(fileId, fileTwo) {
  211. if (fileTwo) {
  212. top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () {
  213. });
  214. }
  215. top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' });
  216. }