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.
 
 
 
 
 
 

355 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/Form',
  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/Form?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. { label: "所属院系", name: "DeptNo", width: 100, align: "left",
  195. formatterAsync: function (callback, value, row, op,$cell) {
  196. learun.clientdata.getAsync('custmerData', {
  197. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  198. key: value,
  199. keyId: 'deptno',
  200. callback: function (_data) {
  201. callback(_data['deptname']);
  202. }
  203. });
  204. }},
  205. { label: "所属班级", name: "ClassNo", width: 120, align: "left",
  206. formatterAsync: function (callback, value, row, op,$cell) {
  207. learun.clientdata.getAsync('custmerData', {
  208. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  209. key: value,
  210. keyId: 'classno',
  211. callback: function (_data) {
  212. callback(_data['classname']);
  213. }
  214. });
  215. }},
  216. {
  217. label: "身份证件类型", name: "IdCardType", width: 100, align: "left"
  218. , formatterAsync: function (callback, value, row, op, $cell) {
  219. learun.clientdata.getAsync('dataItem', {
  220. key: (value == null || value == "" || value == undefined) ? "01" : value,
  221. code: 'IdCardType',
  222. callback: function (_data) {
  223. callback(_data.text);
  224. }
  225. });
  226. }
  227. },
  228. { label: "身份证件号", name: "IdCard", width: 100, align: "left"},
  229. { label: "学年", name: "AcademicYearNo", width: 50, align: "left" },
  230. { label: "学期", name: "Semester", width: 50, align: "left" },
  231. { label: "成绩排名总人数", name: "CalssNum", width: 100, align: "left"},
  232. { label: "成绩排名名次", name: "ClassRank", width: 100, align: "left"},
  233. { label: "资助等级", name: "FundingLevel", width: 70, align: "left",
  234. formatterAsync: function (callback, value, row, op,$cell) {
  235. learun.clientdata.getAsync('dataItem', {
  236. key: value,
  237. code: 'SchoolFundingLevel',
  238. callback: function (_data) {
  239. callback(_data.text);
  240. }
  241. });
  242. }},
  243. { label: "资助标准", name: "FundingCriteria", width: 70, align: "left"},
  244. { label: "应发金额", name: "ShoudAmount", width: 70, align: "left"},
  245. { label: "实发金额", name: "ActualAmount", width: 70, align: "left"},
  246. {
  247. label: "申请日期", name: "ApplyDate", width: 100, align: "left",
  248. formatter: function (cellvalue) {
  249. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  250. }
  251. },
  252. {
  253. label: "发放日期", name: "ProvideDate", width: 100, align: "left",
  254. formatter: function (cellvalue) {
  255. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  256. }
  257. },
  258. { label: "申请理由", name: "ApplyAccount", width: 100, align: "left"},
  259. {
  260. label: "开户银行", name: "DepositBank", width: 100, align: "left"
  261. , formatterAsync: function (callback, value, row, op, $cell) {
  262. learun.clientdata.getAsync('dataItem', {
  263. key: value,
  264. code: 'DepositBank',
  265. callback: function (_data) {
  266. callback(_data.text);
  267. }
  268. });
  269. }
  270. },
  271. { label: "开户行账号", name: "BankCard", width: 100, align: "left"},
  272. { label: "开户行号", name: "BankCode", width: 100, align: "left"},
  273. { label: "备注说明", name: "Remark", width: 100, align: "left" },
  274. {
  275. label: '审核状态', name: 'Status', width: 100, align: "left", formatter: function (cellvalue) {
  276. 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>";
  277. }
  278. },
  279. {
  280. label: '创建人', name: 'CreateUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  281. learun.clientdata.getAsync('custmerData', {
  282. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  283. key: value,
  284. keyId: 'f_userid',
  285. callback: function (_data) {
  286. callback(_data['f_realname']);
  287. }
  288. });
  289. }
  290. },
  291. { label: '创建时间', name: 'CreateTime', width: 130, align: "left" },
  292. { label: '提交时间', name: 'SubmitTime', width: 130, align: "left" },
  293. {
  294. label: '提交人', name: 'SubmitUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  295. learun.clientdata.getAsync('custmerData', {
  296. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  297. key: value,
  298. keyId: 'f_userid',
  299. callback: function (_data) {
  300. callback(_data['f_realname']);
  301. }
  302. });
  303. }
  304. },
  305. {
  306. label: '学院审核人', name: 'FirstCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  307. learun.clientdata.getAsync('custmerData', {
  308. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  309. key: value,
  310. keyId: 'f_userid',
  311. callback: function (_data) {
  312. callback(_data['f_realname']);
  313. }
  314. });
  315. }
  316. },
  317. { label: '学院审核时间', name: 'FirstCheckTime', width: 130, align: "left" },
  318. {
  319. label: '学工部审核人', name: 'SecondCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  320. learun.clientdata.getAsync('custmerData', {
  321. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  322. key: value,
  323. keyId: 'f_userid',
  324. callback: function (_data) {
  325. callback(_data['f_realname']);
  326. }
  327. });
  328. }
  329. },
  330. { label: '学工部审核时间', name: 'SecondCheckTime', width: 130, align: "left" },
  331. ],
  332. mainId:'Id',
  333. isPage: true,
  334. sidx: 'CreateTime desc'
  335. });
  336. page.search();
  337. },
  338. search: function (param) {
  339. param = param || {};
  340. param.StartTime = startTime;
  341. param.EndTime = endTime;
  342. param.StartTimeRelease = startTimeRelease;
  343. param.EndTimeRelease = endTimeRelease;
  344. if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") {
  345. param.CreateUserNo = learun.clientdata.get(['userinfo']).account;//辅导员
  346. }
  347. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  348. }
  349. };
  350. refreshGirdData = function () {
  351. page.search();
  352. };
  353. page.init();
  354. }