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.
 
 
 
 
 
 

361 lines
18 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2023-03-16 11:49
  5. * 描 述:校级奖学金
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var startTime;
  11. var endTime;
  12. var startTimeRelease;
  13. var endTimeRelease;
  14. var page = {
  15. init: function () {
  16. page.initGird();
  17. page.bind();
  18. },
  19. bind: function () {
  20. $('#datesearch').lrdate({
  21. dfdata: [
  22. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  23. { 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') } },
  24. { 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') } },
  25. { 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') } }
  26. ],
  27. // 月
  28. mShow: false,
  29. premShow: false,
  30. // 季度
  31. jShow: false,
  32. prejShow: false,
  33. // 年
  34. ysShow: false,
  35. yxShow: false,
  36. preyShow: false,
  37. yShow: false,
  38. // 默认
  39. dfvalue: '-1',
  40. selectfn: function (begin, end) {
  41. startTime = begin;
  42. endTime = end;
  43. page.search();
  44. }
  45. });
  46. $('#datesearchRelease').lrdate({
  47. dfdata: [
  48. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  49. { 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') } },
  50. { 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') } },
  51. { 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') } }
  52. ],
  53. // 月
  54. mShow: false,
  55. premShow: false,
  56. // 季度
  57. jShow: false,
  58. prejShow: false,
  59. // 年
  60. ysShow: false,
  61. yxShow: false,
  62. preyShow: false,
  63. yShow: false,
  64. // 默认
  65. dfvalue: '-1',
  66. selectfn: function (begin, end) {
  67. startTimeRelease = begin;
  68. endTimeRelease = end;
  69. page.search();
  70. }
  71. });
  72. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  73. page.search(queryJson);
  74. }, 250, 400);
  75. $('#DeptNo').lrDataSourceSelect({
  76. code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) {
  77. if (!!item) {
  78. $('#ClassNo').lrselectRefresh({
  79. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  80. param: { strWhere: "deptno='" + item.deptno + "' order by classno " },
  81. });
  82. } else {
  83. $('#ClassNo').lrselectRefresh({
  84. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  85. param: { strWhere: "1=1 order by classno " },
  86. });
  87. }
  88. }
  89. });
  90. $('#ClassNo').lrselect({
  91. allowSearch: true,
  92. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  93. param: { strWhere: "1=1 order by classno " },
  94. value: "classno",
  95. text: "classname"
  96. });
  97. $('#FundingLevel').lrDataItemSelect({ code: 'SchoolFundingLevel' });
  98. // 刷新
  99. $('#lr_refresh').on('click', function () {
  100. location.reload();
  101. });
  102. // 新增
  103. $('#lr_add').on('click', function () {
  104. learun.layerForm({
  105. id: 'form',
  106. title: '新增',
  107. url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/FormOfStudent',
  108. width: 1100,
  109. height: 700,
  110. callBack: function (id) {
  111. return top[id].acceptClick(refreshGirdData);
  112. }
  113. });
  114. });
  115. // 编辑
  116. $('#lr_edit').on('click', function () {
  117. var keyValue = $('#gridtable').jfGridValue('Id');
  118. if (learun.checkrow(keyValue)) {
  119. var Status = $('#gridtable').jfGridValue('Status');
  120. if (Status != "0") {
  121. learun.alert.warning("当前项不属于草稿状态,无法编辑!");
  122. return false;
  123. }
  124. learun.layerForm({
  125. id: 'form',
  126. title: '编辑',
  127. url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/FormOfStudent?keyValue=' + keyValue,
  128. width: 1100,
  129. height: 700,
  130. callBack: function (id) {
  131. return top[id].acceptClick(refreshGirdData);
  132. }
  133. });
  134. }
  135. });
  136. // 删除
  137. $('#lr_delete').on('click', function () {
  138. var keyValue = $('#gridtable').jfGridValue('Id');
  139. if (learun.checkrow(keyValue)) {
  140. var Status = $('#gridtable').jfGridValue('Status');
  141. if (Status != "0") {
  142. learun.alert.warning("当前项不属于草稿状态,无法删除!");
  143. return false;
  144. }
  145. learun.layerConfirm('是否确认删除该项!', function (res) {
  146. if (res) {
  147. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/DeleteForm', { keyValue: keyValue }, function () {
  148. refreshGirdData();
  149. });
  150. }
  151. });
  152. }
  153. });
  154. // 提交二级学院审核
  155. $('#lr_submit').on('click', function () {
  156. var keyValue = $('#gridtable').jfGridValue('Id');
  157. if (learun.checkrow(keyValue)) {
  158. var Status = $('#gridtable').jfGridValue('Status');
  159. if (Status != "0") {
  160. learun.alert.warning("当前项不属于草稿状态,无法提交学院审核!");
  161. return false;
  162. }
  163. learun.layerConfirm('是否确认提交该项!', function (res) {
  164. if (res) {
  165. learun.postForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/DoSubmit', { keyValue: keyValue, status: '1', step: '1' }, function () {
  166. refreshGirdData();
  167. });
  168. }
  169. });
  170. }
  171. });
  172. // 查看
  173. $('#lr_view').on('click', function () {
  174. var keyValue = $('#gridtable').jfGridValue('Id');
  175. if (learun.checkrow(keyValue)) {
  176. learun.layerForm({
  177. id: 'formview',
  178. title: '查看',
  179. url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/FormView?keyValue=' + keyValue,
  180. width: 1100,
  181. height: 700,
  182. btn: null
  183. });
  184. }
  185. });
  186. },
  187. // 初始化列表
  188. initGird: function () {
  189. $('#gridtable').jfGrid({
  190. url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetPageList',
  191. headData: [
  192. { label: "学号", name: "StuNo", width: 100, align: "left" },
  193. { label: "姓名", name: "StuName", width: 100, align: "left" },
  194. {
  195. label: "所属院系", name: "DeptNo", width: 100, align: "left",
  196. formatterAsync: function (callback, value, row, op, $cell) {
  197. learun.clientdata.getAsync('custmerData', {
  198. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  199. key: value,
  200. keyId: 'deptno',
  201. callback: function (_data) {
  202. callback(_data['deptname']);
  203. }
  204. });
  205. }
  206. },
  207. {
  208. label: "所属班级", name: "ClassNo", width: 120, align: "left",
  209. formatterAsync: function (callback, value, row, op, $cell) {
  210. learun.clientdata.getAsync('custmerData', {
  211. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  212. key: value,
  213. keyId: 'classno',
  214. callback: function (_data) {
  215. callback(_data['classname']);
  216. }
  217. });
  218. }
  219. },
  220. {
  221. label: "身份证件类型", name: "IdCardType", width: 100, align: "left"
  222. , formatterAsync: function (callback, value, row, op, $cell) {
  223. learun.clientdata.getAsync('dataItem', {
  224. key: (value == null || value == "" || value == undefined) ? "01" : value,
  225. code: 'IdCardType',
  226. callback: function (_data) {
  227. callback(_data.text);
  228. }
  229. });
  230. }
  231. },
  232. { label: "身份证件号", name: "IdCard", width: 100, align: "left" },
  233. { label: "学年", name: "AcademicYearNo", width: 50, align: "left" },
  234. { label: "学期", name: "Semester", width: 50, align: "left" },
  235. { label: "成绩排名总人数", name: "CalssNum", width: 100, align: "left" },
  236. { label: "成绩排名名次", name: "ClassRank", width: 100, align: "left" },
  237. {
  238. label: "资助等级", name: "FundingLevel", width: 70, align: "left",
  239. formatterAsync: function (callback, value, row, op, $cell) {
  240. learun.clientdata.getAsync('dataItem', {
  241. key: value,
  242. code: 'SchoolFundingLevel',
  243. callback: function (_data) {
  244. callback(_data.text);
  245. }
  246. });
  247. }
  248. },
  249. { label: "资助标准", name: "FundingCriteria", width: 70, align: "left" },
  250. { label: "应发金额", name: "ShoudAmount", width: 70, align: "left" },
  251. { label: "实发金额", name: "ActualAmount", width: 70, align: "left" },
  252. {
  253. label: "申请日期", name: "ApplyDate", width: 100, align: "left",
  254. formatter: function (cellvalue) {
  255. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  256. }
  257. },
  258. {
  259. label: "发放日期", name: "ProvideDate", width: 100, align: "left",
  260. formatter: function (cellvalue) {
  261. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  262. }
  263. },
  264. { label: "申请理由", name: "ApplyAccount", width: 100, align: "left" },
  265. {
  266. label: "开户银行", name: "DepositBank", width: 100, align: "left"
  267. , formatterAsync: function (callback, value, row, op, $cell) {
  268. learun.clientdata.getAsync('dataItem', {
  269. key: value,
  270. code: 'DepositBank',
  271. callback: function (_data) {
  272. callback(_data.text);
  273. }
  274. });
  275. }
  276. },
  277. { label: "开户行账号", name: "BankCard", width: 100, align: "left" },
  278. { label: "开户行号", name: "BankCode", width: 100, align: "left" },
  279. { label: "备注说明", name: "Remark", width: 100, align: "left" },
  280. {
  281. label: '审核状态', name: 'Status', width: 100, align: "left", formatter: function (cellvalue) {
  282. 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>";
  283. }
  284. },
  285. {
  286. label: '创建人', name: 'CreateUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  287. learun.clientdata.getAsync('custmerData', {
  288. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  289. key: value,
  290. keyId: 'f_userid',
  291. callback: function (_data) {
  292. callback(_data['f_realname']);
  293. }
  294. });
  295. }
  296. },
  297. { label: '创建时间', name: 'CreateTime', width: 130, align: "left" },
  298. { label: '提交时间', name: 'SubmitTime', width: 130, align: "left" },
  299. {
  300. label: '提交人', name: 'SubmitUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  301. learun.clientdata.getAsync('custmerData', {
  302. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  303. key: value,
  304. keyId: 'f_userid',
  305. callback: function (_data) {
  306. callback(_data['f_realname']);
  307. }
  308. });
  309. }
  310. },
  311. {
  312. label: '学院审核人', name: 'FirstCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  313. learun.clientdata.getAsync('custmerData', {
  314. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  315. key: value,
  316. keyId: 'f_userid',
  317. callback: function (_data) {
  318. callback(_data['f_realname']);
  319. }
  320. });
  321. }
  322. },
  323. { label: '学院审核时间', name: 'FirstCheckTime', width: 130, align: "left" },
  324. {
  325. label: '学工部审核人', name: 'SecondCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  326. learun.clientdata.getAsync('custmerData', {
  327. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  328. key: value,
  329. keyId: 'f_userid',
  330. callback: function (_data) {
  331. callback(_data['f_realname']);
  332. }
  333. });
  334. }
  335. },
  336. { label: '学工部审核时间', name: 'SecondCheckTime', width: 130, align: "left" },
  337. ],
  338. mainId: 'Id',
  339. isPage: true,
  340. sidx: 'CreateTime desc'
  341. });
  342. page.search();
  343. },
  344. search: function (param) {
  345. param = param || {};
  346. param.StartTime = startTime;
  347. param.EndTime = endTime;
  348. param.StartTimeRelease = startTimeRelease;
  349. param.EndTimeRelease = endTimeRelease;
  350. if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") {
  351. param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号
  352. }
  353. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  354. }
  355. };
  356. refreshGirdData = function () {
  357. page.search();
  358. };
  359. page.init();
  360. }