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.
 
 
 
 
 
 

394 lines
21 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2023-03-16 17:18
  5. * 描 述:家庭经济信息
  6. */
  7. var selectedRow;
  8. var refreshGirdData;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var startTime;
  12. var endTime;
  13. var page = {
  14. init: function () {
  15. page.initGird();
  16. page.bind();
  17. },
  18. bind: function () {
  19. // 时间搜索框
  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. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  47. page.search(queryJson);
  48. }, 450, 600);
  49. $('#DeptNo').lrDataSourceSelect({
  50. code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) {
  51. if (!!item) {
  52. $('#ClassNo').lrselectRefresh({
  53. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  54. param: { strWhere: "deptno='" + item.deptno + "' order by classno " },
  55. });
  56. } else {
  57. $('#ClassNo').lrselectRefresh({
  58. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  59. param: { strWhere: "1=1 order by classno " },
  60. });
  61. }
  62. }
  63. });
  64. $('#ClassNo').lrselect({
  65. allowSearch: true,
  66. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  67. param: { strWhere: "1=1 order by classno " },
  68. value: "classno",
  69. text: "classname"
  70. });
  71. $('#IsLowIncome').lrDataItemSelect({ code: 'YesOrNoBit' });
  72. $('#IsOrphan').lrDataItemSelect({ code: 'YesOrNoBit' });
  73. $('#IsSingleFamilyChildren').lrDataItemSelect({ code: 'YesOrNoBit' });
  74. $('#IsDisabledChildren').lrDataItemSelect({ code: 'YesOrNoBit' });
  75. $('#IsDisabled').lrDataItemSelect({ code: 'YesOrNoBit' });
  76. $('#IsParentsLoseWork').lrDataItemSelect({ code: 'YesOrNoBit' });
  77. $('#IsSeriouslyIllPatientInHome').lrDataItemSelect({ code: 'YesOrNoBit' });
  78. $('#IsOvercomePovertyFamilyStudent').lrDataItemSelect({ code: 'YesOrNoBit' });
  79. $('#IsUnstablePovertyFamilyStudent').lrDataItemSelect({ code: 'YesOrNoBit' });
  80. $('#IsEdgePovertyFamilyStudent').lrDataItemSelect({ code: 'YesOrNoBit' });
  81. $('#IsEdgeAcuteDifficultyStudent').lrDataItemSelect({ code: 'YesOrNoBit' });
  82. $('#IsLowIncomeFamily').lrDataItemSelect({ code: 'YesOrNoBit' });
  83. $('#IsMartyrChildren').lrDataItemSelect({ code: 'YesOrNoBit' });
  84. $('#FamilyIsSufferNaturalDisaster').lrDataItemSelect({ code: 'YesOrNoBit' });
  85. $('#FamilyIsSufferUnexpectEvent').lrDataItemSelect({ code: 'YesOrNoBit' });
  86. $('#IsSpecialPovertySupport').lrDataItemSelect({ code: 'YesOrNoBit' });
  87. $('#FamilyIsSufferEpidemic').lrDataItemSelect({ code: 'YesOrNoBit' });
  88. // 刷新
  89. $('#lr_refresh').on('click', function () {
  90. location.reload();
  91. });
  92. // 查看
  93. $('#lr_view').on('click', function () {
  94. var keyValue = $('#gridtable').jfGridValue('Id');
  95. selectedRow = $('#gridtable').jfGridGet('rowdata');
  96. if (learun.checkrow(keyValue)) {
  97. learun.layerForm({
  98. id: 'formview',
  99. title: '查看',
  100. url: top.$.rootUrl + '/StudentWork/FamilyEconomy/FormView?keyValue=' + keyValue,
  101. width: 1100,
  102. height: 800,
  103. btn: null
  104. });
  105. }
  106. });
  107. },
  108. initGird: function () {
  109. $('#gridtable').jfGrid({
  110. url: top.$.rootUrl + '/StudentWork/FamilyEconomy/GetPageList',
  111. headData: [
  112. { label: '学号', name: 'StuNo', width: 100, align: "left" },
  113. { label: '姓名', name: 'StuName', width: 150, align: "left" },
  114. {
  115. label: '院系', name: 'DeptNo', width: 120, align: "left",
  116. formatterAsync: function (callback, value, row, op, $cell) {
  117. learun.clientdata.getAsync('custmerData', {
  118. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  119. key: value,
  120. keyId: 'deptno',
  121. callback: function (_data) {
  122. callback(_data['deptname']);
  123. }
  124. });
  125. }
  126. },
  127. {
  128. label: '班级', name: 'ClassNo', width: 120, align: "left",
  129. formatterAsync: function (callback, value, row, op, $cell) {
  130. learun.clientdata.getAsync('custmerData', {
  131. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  132. key: value,
  133. keyId: 'classno',
  134. callback: function (_data) {
  135. callback(_data['classname']);
  136. }
  137. });
  138. }
  139. },
  140. {
  141. label: '身份证件类型', name: 'IdCardType', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  142. learun.clientdata.getAsync('dataItem', {
  143. key: (value == null || value == "" || value == undefined) ? "01" : value,
  144. code: 'IdCardType',
  145. callback: function (_data) {
  146. callback(_data.text);
  147. }
  148. });
  149. }
  150. },
  151. { label: '身份证件号', name: 'IdentityCardNo', width: 150, align: "left" },
  152. {
  153. label: '申请时间', name: 'ApplyTime', width: 100, align: "left", formatter: function (cellvalue) {
  154. return cellvalue.substring(0, 11);
  155. }
  156. },
  157. {
  158. label: '是否低保', name: 'IsLowIncome', width: 100, align: "left",
  159. formatter: function (cellvalue) {
  160. return cellvalue == true ? "是" : "否";
  161. }
  162. },
  163. {
  164. label: '是否孤儿', name: 'IsOrphan', width: 100, align: "left",
  165. formatter: function (cellvalue) {
  166. return cellvalue == true ? "是" : "否";
  167. }
  168. },
  169. {
  170. label: '是否单亲家庭子女', name: 'IsSingleFamilyChildren', width: 150, align: "left",
  171. formatter: function (cellvalue) {
  172. return cellvalue == true ? "是" : "否";
  173. }
  174. },
  175. {
  176. label: '是否残疾人子女', name: 'IsDisabledChildren', width: 100, align: "left",
  177. formatter: function (cellvalue) {
  178. return cellvalue == true ? "是" : "否";
  179. }
  180. },
  181. {
  182. label: '本人是否残疾', name: 'IsDisabled', width: 100, align: "left",
  183. formatter: function (cellvalue) {
  184. return cellvalue == true ? "是" : "否";
  185. }
  186. },
  187. {
  188. label: '残疾类别', name: 'DisabledCategory', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  189. learun.clientdata.getAsync('dataItem', {
  190. key: value,
  191. code: 'DisabledCategory',
  192. callback: function (_data) {
  193. callback(_data.text);
  194. }
  195. });
  196. }
  197. },
  198. {
  199. label: '是否父母丧失劳动能力', name: 'IsParentsLoseWork', width: 150, align: "left",
  200. formatter: function (cellvalue) {
  201. return cellvalue == true ? "是" : "否";
  202. }
  203. },
  204. {
  205. label: '是否家中有大病患者', name: 'IsSeriouslyIllPatientInHome', width: 150, align: "left",
  206. formatter: function (cellvalue) {
  207. return cellvalue == true ? "是" : "否";
  208. }
  209. },
  210. {
  211. label: '是否脱贫家庭学生', name: 'IsOvercomePovertyFamilyStudent', width: 150, align: "left",
  212. formatter: function (cellvalue) {
  213. return cellvalue == true ? "是" : "否";
  214. }
  215. },
  216. {
  217. label: '是否脱贫不稳定家庭学生', name: 'IsUnstablePovertyFamilyStudent', width: 150, align: "left",
  218. formatter: function (cellvalue) {
  219. return cellvalue == true ? "是" : "否";
  220. }
  221. },
  222. {
  223. label: '是否边缘易致贫家庭学生', name: 'IsEdgePovertyFamilyStudent', width: 150, align: "left",
  224. formatter: function (cellvalue) {
  225. return cellvalue == true ? "是" : "否";
  226. }
  227. },
  228. {
  229. label: '是否边突发严重困难学生', name: 'IsEdgeAcuteDifficultyStudent', width: 150, align: "left",
  230. formatter: function (cellvalue) {
  231. return cellvalue == true ? "是" : "否";
  232. }
  233. },
  234. {
  235. label: '是否低收入家庭', name: 'IsLowIncomeFamily', width: 100, align: "left",
  236. formatter: function (cellvalue) {
  237. return cellvalue == true ? "是" : "否";
  238. }
  239. },
  240. {
  241. label: '烈士子女', name: 'IsMartyrChildren', width: 100, align: "left",
  242. formatter: function (cellvalue) {
  243. return cellvalue == true ? "是" : "否";
  244. }
  245. },
  246. { label: '家庭人均年收入', name: 'FamilyAverageIncome', width: 100, align: "left" },
  247. {
  248. label: '家庭主要收入来源类型', name: 'FamilyIncomeSourceCategory', width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  249. learun.clientdata.getAsync('dataItem', {
  250. key: value,
  251. code: 'FamilyIncomeSourceCategory',
  252. callback: function (_data) {
  253. callback(_data.text);
  254. }
  255. });
  256. }
  257. },
  258. {
  259. label: '家庭是否遭受自然灾害', name: 'FamilyIsSufferNaturalDisaster', width: 150, align: "left",
  260. formatter: function (cellvalue) {
  261. return cellvalue == true ? "是" : "否";
  262. }
  263. },
  264. { label: '自然灾害具体情况描述', name: 'SufferNaturalDisasterDescription', width: 150, align: "left" },
  265. {
  266. label: '家庭是否遭受突发意外事件', name: 'FamilyIsSufferUnexpectEvent', width: 200, align: "left",
  267. formatter: function (cellvalue) {
  268. return cellvalue == true ? "是" : "否";
  269. }
  270. },
  271. { label: '突发意外事件具体描述', name: 'SufferUnexpectEventDescription', width: 150, align: "left" },
  272. { label: '家庭欠债金额', name: 'FamilyOwesAmount', width: 100, align: "left" },
  273. { label: '家庭欠债原因', name: 'FamilyOwesReason', width: 100, align: "left" },
  274. { label: '家庭人口数', name: 'FamilyNumber', width: 100, align: "left" },
  275. { label: '劳动力人口数', name: 'LaborNumber', width: 100, align: "left" },
  276. { label: '家庭成员失业人数', name: 'FamilyUnemployNumber', width: 150, align: "left" },
  277. { label: '赡养人口数', name: 'SupportNumber', width: 100, align: "left" },
  278. { label: '其他信息', name: 'OtherInformation', width: 100, align: "left" },
  279. {
  280. label: '是否特困供养', name: 'IsSpecialPovertySupport', width: 100, align: "left",
  281. formatter: function (cellvalue) {
  282. return cellvalue == true ? "是" : "否";
  283. }
  284. },
  285. { label: '其他', name: 'Others', width: 100, align: "left" },
  286. {
  287. label: '家庭是否遭受疫情', name: 'FamilyIsSufferEpidemic', width: 150, align: "left",
  288. formatter: function (cellvalue) {
  289. return cellvalue == true ? "是" : "否";
  290. }
  291. },
  292. { label: '家庭遭受疫情具体情况描述', name: 'SufferEpidemicDescription', width: 200, align: "left" },
  293. {
  294. label: '认定困难级别名称', name: 'IdentifyDifficultyLevel', width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  295. learun.clientdata.getAsync('dataItem', {
  296. key: value,
  297. code: 'DifficultyLevel',
  298. callback: function (_data) {
  299. callback(_data.text);
  300. }
  301. });
  302. }
  303. },
  304. {
  305. label: '认定时间', name: 'IdentifyTime', width: 100, align: "left", formatter: function (cellvalue) {
  306. if (cellvalue != null && cellvalue != undefined && cellvalue != "") {
  307. return cellvalue.substring(0, 11);
  308. }
  309. }
  310. },
  311. { label: '认定原因', name: 'IdentifyReason', width: 100, align: "left" },
  312. { label: '班级认定意见', name: 'ClassIdentifyOpinion', width: 100, align: "left" },
  313. { label: '年级认定意见', name: 'GradeIdentifyOpinion', width: 100, align: "left" },
  314. {
  315. label: '审核状态', name: 'Status', width: 100, align: "left", formatter: function (cellvalue) {
  316. 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>";
  317. }
  318. },
  319. {
  320. label: '创建人', name: 'CreateUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  321. learun.clientdata.getAsync('custmerData', {
  322. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  323. key: value,
  324. keyId: 'f_userid',
  325. callback: function (_data) {
  326. callback(_data['f_realname']);
  327. }
  328. });
  329. }
  330. },
  331. { label: '创建时间', name: 'CreateTime', width: 130, align: "left" },
  332. { label: '提交时间', name: 'SubmitTime', width: 130, align: "left" },
  333. {
  334. label: '提交人', name: 'SubmitUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  335. learun.clientdata.getAsync('custmerData', {
  336. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  337. key: value,
  338. keyId: 'f_userid',
  339. callback: function (_data) {
  340. callback(_data['f_realname']);
  341. }
  342. });
  343. }
  344. },
  345. {
  346. label: '学院审核人', name: 'FirstCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  347. learun.clientdata.getAsync('custmerData', {
  348. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  349. key: value,
  350. keyId: 'f_userid',
  351. callback: function (_data) {
  352. callback(_data['f_realname']);
  353. }
  354. });
  355. }
  356. },
  357. { label: '学院审核时间', name: 'FirstCheckTime', width: 130, align: "left" },
  358. {
  359. label: '学工部审核人', name: 'SecondCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  360. learun.clientdata.getAsync('custmerData', {
  361. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  362. key: value,
  363. keyId: 'f_userid',
  364. callback: function (_data) {
  365. callback(_data['f_realname']);
  366. }
  367. });
  368. }
  369. },
  370. { label: '学工部审核时间', name: 'SecondCheckTime', width: 130, align: "left" },
  371. ],
  372. mainId: 'Id',
  373. isPage: true,
  374. sidx: 'SubmitTime desc'
  375. });
  376. page.search();
  377. },
  378. search: function (param) {
  379. param = param || {};
  380. param.StartTime = startTime;
  381. param.EndTime = endTime;
  382. if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") {
  383. param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号
  384. param.Status = 3;
  385. }
  386. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  387. }
  388. };
  389. refreshGirdData = function () {
  390. page.search();
  391. };
  392. page.init();
  393. }