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.
 
 
 
 
 
 

292 lines
15 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2023-03-13 10:37
  5. * 描 述:定制功能助学金
  6. */
  7. var refreshGirdData;
  8. var types = request('types');//助学金类型:1国家助学金,2校级助学金
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var startTime;
  12. var endTime;
  13. var startTimeRelease;
  14. var endTimeRelease;
  15. var page = {
  16. init: function () {
  17. page.initGird();
  18. page.bind();
  19. },
  20. bind: function () {
  21. $('#datesearch').lrdate({
  22. dfdata: [
  23. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  24. { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  25. { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  26. { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
  27. ],
  28. // 月
  29. mShow: false,
  30. premShow: false,
  31. // 季度
  32. jShow: false,
  33. prejShow: false,
  34. // 年
  35. ysShow: false,
  36. yxShow: false,
  37. preyShow: false,
  38. yShow: false,
  39. // 默认
  40. dfvalue: '-1',
  41. selectfn: function (begin, end) {
  42. startTime = begin;
  43. endTime = end;
  44. page.search();
  45. }
  46. });
  47. $('#datesearchRelease').lrdate({
  48. dfdata: [
  49. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  50. { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  51. { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  52. { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
  53. ],
  54. // 月
  55. mShow: false,
  56. premShow: false,
  57. // 季度
  58. jShow: false,
  59. prejShow: false,
  60. // 年
  61. ysShow: false,
  62. yxShow: false,
  63. preyShow: false,
  64. yShow: false,
  65. // 默认
  66. dfvalue: '-1',
  67. selectfn: function (begin, end) {
  68. startTimeRelease = begin;
  69. endTimeRelease = end;
  70. page.search();
  71. }
  72. });
  73. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  74. page.search(queryJson);
  75. }, 350, 400);
  76. //下拉框绑定
  77. $('#DeptNo').lrDataSourceSelect({
  78. code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) {
  79. if (!!item) {
  80. $('#ClassNo').lrselectRefresh({
  81. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  82. param: { strWhere: "deptno='" + item.deptno + "' order by classno " },
  83. });
  84. } else {
  85. $('#ClassNo').lrselectRefresh({
  86. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  87. param: { strWhere: "1=1 order by classno " },
  88. });
  89. }
  90. }
  91. });
  92. $('#ClassNo').lrselect({
  93. allowSearch: true,
  94. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  95. param: { strWhere: "1=1 order by classno " },
  96. value: "classno",
  97. text: "classname"
  98. });
  99. //判断助学金类型:1国家助学金,2校级助学金
  100. if (types == "1") {
  101. $('#SubsidizeType').lrDataItemSelect({ code: 'StateStipend' });
  102. } else {
  103. $('#SubsidizeType').lrDataItemSelect({ code: 'SchoolStipend' });
  104. }
  105. // 刷新
  106. $('#lr_refresh').on('click', function () {
  107. location.reload();
  108. });
  109. // 查看
  110. $('#lr_view').on('click', function () {
  111. var keyValue = $('#gridtable').jfGridValue('ID');
  112. if (learun.checkrow(keyValue)) {
  113. learun.layerForm({
  114. id: 'formview',
  115. title: '查看',
  116. url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/FormView?Types=' + types + '&keyValue=' + keyValue,
  117. width: 1000,
  118. height: 600,
  119. btn: null
  120. });
  121. }
  122. });
  123. },
  124. initGird: function () {
  125. $('#gridtable').jfGrid({
  126. url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/GetPageList',
  127. headData: [
  128. { label: '学号', name: 'StuNo', width: 120, align: "left" },
  129. { label: '姓名', name: 'StuName', width: 150, align: "left" },
  130. {
  131. label: '所属院系', name: 'DeptNo', width: 100, align: "left",
  132. formatterAsync: function (callback, value, row, op, $cell) {
  133. learun.clientdata.getAsync('custmerData', {
  134. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  135. key: value,
  136. keyId: 'deptno',
  137. callback: function (_data) {
  138. callback(_data['deptname']);
  139. }
  140. });
  141. }
  142. },
  143. {
  144. label: "所属班级", name: "ClassNo", width: 120, align: "left",
  145. formatterAsync: function (callback, value, row, op, $cell) {
  146. learun.clientdata.getAsync('custmerData', {
  147. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  148. key: value,
  149. keyId: 'classno',
  150. callback: function (_data) {
  151. callback(_data['classname']);
  152. }
  153. });
  154. }
  155. },
  156. {
  157. label: '身份证件类型', name: 'IdCardType', width: 100, align: "left"
  158. , formatterAsync: function (callback, value, row, op, $cell) {
  159. learun.clientdata.getAsync('dataItem', {
  160. key: (value == null || value == "" || value == undefined) ? "01" : value,
  161. code: 'IdCardType',
  162. callback: function (_data) {
  163. callback(_data.text);
  164. }
  165. });
  166. }
  167. },
  168. { label: '身份证件号', name: 'IdentityCardNo', width: 160, align: "left" },
  169. {
  170. label: '资助等级', name: 'SubsidizeType', width: 100, align: "left"
  171. , formatterAsync: function (callback, value, row, op, $cell) {
  172. learun.clientdata.getAsync('dataItem', {
  173. key: value,
  174. code: types == "1" ? 'StateStipend' : 'SchoolStipend',
  175. callback: function (_data) {
  176. callback(_data.text);
  177. }
  178. });
  179. }
  180. },
  181. { label: '资助标准', name: 'FunderNationStandard', width: 100, align: "left" },
  182. { label: '应发金额', name: 'AmountPayable', width: 100, align: "left" },
  183. { label: '实发金额', name: 'FinalPayingAmount', width: 100, align: "left" },
  184. {
  185. label: '申请日期', name: 'ApplyDate', width: 100, align: "left",
  186. formatter: function (cellvalue) {
  187. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  188. }
  189. },
  190. { label: '发放日期', name: 'ReleaseDate', width: 100, align: "left" },
  191. { label: '申请理由', name: 'ApplyReason', width: 200, align: "left" },
  192. {
  193. label: '开户银行', name: 'OpenBank', width: 200, align: "left"
  194. , formatterAsync: function (callback, value, row, op, $cell) {
  195. learun.clientdata.getAsync('dataItem', {
  196. key: value,
  197. code: 'DepositBank',
  198. callback: function (_data) {
  199. callback(_data.text);
  200. }
  201. });
  202. }
  203. },
  204. { label: '开户卡账号', name: 'OpenAccount', width: 200, align: "left" },
  205. { label: '开户行号', name: 'OpenBankNo', width: 120, align: "left" },
  206. { label: '备注说明', name: 'Remark', width: 200, align: "left" },
  207. {
  208. label: '审核状态', name: 'Status', width: 100, align: "left", formatter: function (cellvalue) {
  209. return cellvalue == "0" ? "<span class=\"label label-default\">草稿</span>" : cellvalue == "1" ? "<span class=\"label label-success\">学院审核中</span>" : cellvalue == "2" ? "<span class=\"label label-success\">学工部审核中</span>" : cellvalue == "3" ? "<span class=\"label label-success\">已归档</span>" : "<span class=\"label label-default\">草稿</span>";
  210. }
  211. },
  212. {
  213. label: '创建人', name: 'CreateUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  214. learun.clientdata.getAsync('custmerData', {
  215. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  216. key: value,
  217. keyId: 'f_userid',
  218. callback: function (_data) {
  219. callback(_data['f_realname']);
  220. }
  221. });
  222. }
  223. },
  224. { label: '创建时间', name: 'CreateTime', width: 130, align: "left" },
  225. { label: '提交时间', name: 'SubmitTime', width: 130, align: "left" },
  226. {
  227. label: '提交人', name: 'SubmitUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  228. learun.clientdata.getAsync('custmerData', {
  229. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  230. key: value,
  231. keyId: 'f_userid',
  232. callback: function (_data) {
  233. callback(_data['f_realname']);
  234. }
  235. });
  236. }
  237. },
  238. {
  239. label: '学院审核人', name: 'FirstCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  240. learun.clientdata.getAsync('custmerData', {
  241. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  242. key: value,
  243. keyId: 'f_userid',
  244. callback: function (_data) {
  245. callback(_data['f_realname']);
  246. }
  247. });
  248. }
  249. },
  250. { label: '学院审核时间', name: 'FirstCheckTime', width: 130, align: "left" },
  251. {
  252. label: '学工部审核人', name: 'SecondCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  253. learun.clientdata.getAsync('custmerData', {
  254. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  255. key: value,
  256. keyId: 'f_userid',
  257. callback: function (_data) {
  258. callback(_data['f_realname']);
  259. }
  260. });
  261. }
  262. },
  263. { label: '学工部审核时间', name: 'SecondCheckTime', width: 130, align: "left" },
  264. ],
  265. mainId: 'ID',
  266. isPage: true,
  267. sidx: 'SubmitTime desc'
  268. });
  269. page.search();
  270. },
  271. search: function (param) {
  272. param = param || {};
  273. param.Types = types;
  274. param.StartTime = startTime;
  275. param.EndTime = endTime;
  276. param.StartTimeRelease = startTimeRelease;
  277. param.EndTimeRelease = endTimeRelease;
  278. if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") {
  279. param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号
  280. param.Status = 3;
  281. }
  282. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  283. }
  284. };
  285. refreshGirdData = function () {
  286. page.search();
  287. };
  288. page.init();
  289. }