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.
 
 
 
 
 
 

485 lines
26 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_add').on('click', function () {
  94. selectedRow = null;
  95. learun.layerForm({
  96. id: 'form',
  97. title: '新增',
  98. url: top.$.rootUrl + '/StudentWork/FamilyEconomy/Form',
  99. width: 1100,
  100. height: 800,
  101. callBack: function (id) {
  102. return top[id].acceptClick(refreshGirdData);
  103. }
  104. });
  105. });
  106. // 编辑
  107. $('#lr_edit').on('click', function () {
  108. var keyValue = $('#gridtable').jfGridValue('Id');
  109. selectedRow = $('#gridtable').jfGridGet('rowdata');
  110. if (learun.checkrow(keyValue)) {
  111. var Status = $('#gridtable').jfGridValue('Status');
  112. if (Status != "0") {
  113. learun.alert.warning("当前项不属于草稿状态,无法编辑!");
  114. return false;
  115. }
  116. learun.layerForm({
  117. id: 'form',
  118. title: '编辑',
  119. url: top.$.rootUrl + '/StudentWork/FamilyEconomy/Form?keyValue=' + keyValue,
  120. width: 1100,
  121. height: 800,
  122. callBack: function (id) {
  123. return top[id].acceptClick(refreshGirdData);
  124. }
  125. });
  126. }
  127. });
  128. // 删除
  129. $('#lr_delete').on('click', function () {
  130. var keyValue = $('#gridtable').jfGridValue('Id');
  131. if (learun.checkrow(keyValue)) {
  132. var Status = $('#gridtable').jfGridValue('Status');
  133. if (Status != "0") {
  134. learun.alert.warning("当前项不属于草稿状态,无法删除!");
  135. return false;
  136. }
  137. learun.layerConfirm('是否确认删除该项!', function (res) {
  138. if (res) {
  139. learun.deleteForm(top.$.rootUrl + '/StudentWork/FamilyEconomy/DeleteForm', { keyValue: keyValue }, function () {
  140. refreshGirdData();
  141. });
  142. }
  143. });
  144. }
  145. });
  146. // 提交二级学院审核
  147. $('#lr_submit').on('click', function () {
  148. var keyValue = $('#gridtable').jfGridValue('Id');
  149. if (learun.checkrow(keyValue)) {
  150. var Status = $('#gridtable').jfGridValue('Status');
  151. if (Status != "0") {
  152. learun.alert.warning("当前项不属于草稿状态,无法提交学院审核!");
  153. return false;
  154. }
  155. learun.layerConfirm('是否确认提交该项!', function (res) {
  156. if (res) {
  157. learun.postForm(top.$.rootUrl + '/StudentWork/FamilyEconomy/DoSubmit', { keyValue: keyValue, status: '1', step: '1' }, function () {
  158. refreshGirdData();
  159. });
  160. }
  161. });
  162. }
  163. });
  164. // 查看
  165. $('#lr_view').on('click', function () {
  166. var keyValue = $('#gridtable').jfGridValue('Id');
  167. selectedRow = $('#gridtable').jfGridGet('rowdata');
  168. if (learun.checkrow(keyValue)) {
  169. learun.layerForm({
  170. id: 'formview',
  171. title: '查看',
  172. url: top.$.rootUrl + '/StudentWork/FamilyEconomy/FormView?keyValue=' + keyValue,
  173. width: 1100,
  174. height: 800,
  175. btn:null
  176. });
  177. }
  178. });
  179. },
  180. initGird: function () {
  181. $('#gridtable').jfGrid({
  182. url: top.$.rootUrl + '/StudentWork/FamilyEconomy/GetPageList',
  183. headData: [
  184. { label: '学号', name: 'StuNo', width: 100, align: "left" },
  185. { label: '姓名', name: 'StuName', width: 150, align: "left" },
  186. {
  187. label: '性别', name: 'GenderNo', width: 50, align: "left", formatter: function (cellvalue) {
  188. return cellvalue ? "男" : "女";
  189. }
  190. },
  191. {
  192. label: '院系', name: 'DeptNo', width: 120, align: "left",
  193. formatterAsync: function (callback, value, row, op, $cell) {
  194. learun.clientdata.getAsync('custmerData', {
  195. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  196. key: value,
  197. keyId: 'deptno',
  198. callback: function (_data) {
  199. callback(_data['deptname']);
  200. }
  201. });
  202. }
  203. },
  204. {
  205. label: '专业', name: 'MajorNo', width: 120, align: "left",
  206. formatterAsync: function (callback, value, row, op, $cell) {
  207. learun.clientdata.getAsync('custmerData', {
  208. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  209. key: value,
  210. keyId: 'majorno',
  211. callback: function (_data) {
  212. callback(_data['majorname']);
  213. }
  214. });
  215. }
  216. },
  217. {
  218. label: '班级', name: 'ClassNo', width: 120, align: "left",
  219. formatterAsync: function (callback, value, row, op, $cell) {
  220. learun.clientdata.getAsync('custmerData', {
  221. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  222. key: value,
  223. keyId: 'classno',
  224. callback: function (_data) {
  225. callback(_data['classname']);
  226. }
  227. });
  228. }
  229. },
  230. {
  231. label: '身份证件类型', name: 'IdCardType', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  232. learun.clientdata.getAsync('dataItem', {
  233. key: (value == null || value == "" || value == undefined) ? "01" : value,
  234. code: 'IdCardType',
  235. callback: function (_data) {
  236. callback(_data.text);
  237. }
  238. });
  239. }
  240. },
  241. { label: '身份证件号', name: 'IdentityCardNo', width: 150, align: "left" },
  242. {
  243. label: '申请时间', name: 'ApplyTime', width: 100, align: "left", formatter: function (cellvalue) {
  244. return cellvalue.substring(0, 11);
  245. }
  246. },
  247. {
  248. label: '是否低保', name: 'IsLowIncome', width: 100, align: "left",
  249. formatter: function (cellvalue) {
  250. return cellvalue == true ? "是" : "否";
  251. }
  252. },
  253. {
  254. label: '是否孤儿', name: 'IsOrphan', width: 100, align: "left",
  255. formatter: function (cellvalue) {
  256. return cellvalue == true ? "是" : "否";
  257. }
  258. },
  259. {
  260. label: '是否单亲家庭子女', name: 'IsSingleFamilyChildren', width: 150, align: "left",
  261. formatter: function (cellvalue) {
  262. return cellvalue == true ? "是" : "否";
  263. }
  264. },
  265. {
  266. label: '是否残疾人子女', name: 'IsDisabledChildren', width: 100, align: "left",
  267. formatter: function (cellvalue) {
  268. return cellvalue == true ? "是" : "否";
  269. }
  270. },
  271. {
  272. label: '本人是否残疾', name: 'IsDisabled', width: 100, align: "left",
  273. formatter: function (cellvalue) {
  274. return cellvalue == true ? "是" : "否";
  275. }
  276. },
  277. {
  278. label: '残疾类别', name: 'DisabledCategory', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  279. learun.clientdata.getAsync('dataItem', {
  280. key: value,
  281. code: 'DisabledCategory',
  282. callback: function (_data) {
  283. callback(_data.text);
  284. }
  285. });
  286. }
  287. },
  288. {
  289. label: '是否父母丧失劳动能力', name: 'IsParentsLoseWork', width: 150, align: "left",
  290. formatter: function (cellvalue) {
  291. return cellvalue == true ? "是" : "否";
  292. }
  293. },
  294. {
  295. label: '是否家中有大病患者', name: 'IsSeriouslyIllPatientInHome', width: 150, align: "left",
  296. formatter: function (cellvalue) {
  297. return cellvalue == true ? "是" : "否";
  298. }
  299. },
  300. {
  301. label: '是否脱贫家庭学生', name: 'IsOvercomePovertyFamilyStudent', width: 150, align: "left",
  302. formatter: function (cellvalue) {
  303. return cellvalue == true ? "是" : "否";
  304. }
  305. },
  306. {
  307. label: '是否脱贫不稳定家庭学生', name: 'IsUnstablePovertyFamilyStudent', width: 150, align: "left",
  308. formatter: function (cellvalue) {
  309. return cellvalue == true ? "是" : "否";
  310. }
  311. },
  312. {
  313. label: '是否边缘易致贫家庭学生', name: 'IsEdgePovertyFamilyStudent', width: 150, align: "left",
  314. formatter: function (cellvalue) {
  315. return cellvalue == true ? "是" : "否";
  316. }
  317. },
  318. {
  319. label: '是否边突发严重困难学生', name: 'IsEdgeAcuteDifficultyStudent', width: 150, align: "left",
  320. formatter: function (cellvalue) {
  321. return cellvalue == true ? "是" : "否";
  322. }
  323. },
  324. {
  325. label: '是否低收入家庭', name: 'IsLowIncomeFamily', width: 100, align: "left",
  326. formatter: function (cellvalue) {
  327. return cellvalue == true ? "是" : "否";
  328. }
  329. },
  330. {
  331. label: '烈士子女', name: 'IsMartyrChildren', width: 100, align: "left",
  332. formatter: function (cellvalue) {
  333. return cellvalue == true ? "是" : "否";
  334. }
  335. },
  336. { label: '家庭人均年收入', name: 'FamilyAverageIncome', width: 100, align: "left" },
  337. {
  338. label: '家庭主要收入来源类型', name: 'FamilyIncomeSourceCategory', width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  339. learun.clientdata.getAsync('dataItem', {
  340. key: value,
  341. code: 'FamilyIncomeSourceCategory',
  342. callback: function (_data) {
  343. callback(_data.text);
  344. }
  345. });
  346. }
  347. },
  348. {
  349. label: '家庭是否遭受自然灾害', name: 'FamilyIsSufferNaturalDisaster', width: 150, align: "left",
  350. formatter: function (cellvalue) {
  351. return cellvalue == true ? "是" : "否";
  352. }
  353. },
  354. { label: '自然灾害具体情况描述', name: 'SufferNaturalDisasterDescription', width: 150, align: "left" },
  355. {
  356. label: '家庭是否遭受突发意外事件', name: 'FamilyIsSufferUnexpectEvent', width: 200, align: "left",
  357. formatter: function (cellvalue) {
  358. return cellvalue == true ? "是" : "否";
  359. }
  360. },
  361. { label: '突发意外事件具体描述', name: 'SufferUnexpectEventDescription', width: 150, align: "left" },
  362. { label: '家庭欠债金额', name: 'FamilyOwesAmount', width: 100, align: "left" },
  363. { label: '家庭欠债原因', name: 'FamilyOwesReason', width: 100, align: "left" },
  364. { label: '家庭人口数', name: 'FamilyNumber', width: 100, align: "left" },
  365. { label: '劳动力人口数', name: 'LaborNumber', width: 100, align: "left" },
  366. { label: '家庭成员失业人数', name: 'FamilyUnemployNumber', width: 150, align: "left" },
  367. { label: '赡养人口数', name: 'SupportNumber', width: 100, align: "left" },
  368. { label: '其他信息', name: 'OtherInformation', width: 100, align: "left" },
  369. {
  370. label: '是否特困供养', name: 'IsSpecialPovertySupport', width: 100, align: "left",
  371. formatter: function (cellvalue) {
  372. return cellvalue == true ? "是" : "否";
  373. }
  374. },
  375. { label: '其他', name: 'Others', width: 100, align: "left" },
  376. {
  377. label: '家庭是否遭受疫情', name: 'FamilyIsSufferEpidemic', width: 150, align: "left",
  378. formatter: function (cellvalue) {
  379. return cellvalue == true ? "是" : "否";
  380. }
  381. },
  382. { label: '家庭遭受疫情具体情况描述', name: 'SufferEpidemicDescription', width: 200, align: "left" },
  383. {
  384. label: '认定困难级别名称', name: 'IdentifyDifficultyLevel', width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  385. learun.clientdata.getAsync('dataItem', {
  386. key: value,
  387. code: 'DifficultyLevel',
  388. callback: function (_data) {
  389. callback(_data.text);
  390. }
  391. });
  392. }
  393. },
  394. {
  395. label: '认定时间', name: 'IdentifyTime', width: 100, align: "left", formatter: function (cellvalue) {
  396. if (cellvalue != null && cellvalue != undefined && cellvalue != "") {
  397. return cellvalue.substring(0, 11);
  398. }
  399. }
  400. },
  401. { label: '认定原因', name: 'IdentifyReason', width: 100, align: "left" },
  402. { label: '班级认定意见', name: 'ClassIdentifyOpinion', width: 100, align: "left" },
  403. { label: '年级认定意见', name: 'GradeIdentifyOpinion', width: 100, align: "left" },
  404. {
  405. label: '审核状态', name: 'Status', width: 100, align: "left", formatter: function (cellvalue) {
  406. 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>";
  407. }
  408. },
  409. {
  410. label: '创建人', name: 'CreateUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  411. learun.clientdata.getAsync('custmerData', {
  412. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  413. key: value,
  414. keyId: 'f_userid',
  415. callback: function (_data) {
  416. callback(_data['f_realname']);
  417. }
  418. });
  419. }
  420. },
  421. { label: '创建时间', name: 'CreateTime', width: 130, align: "left" },
  422. { label: '提交时间', name: 'SubmitTime', width: 130, align: "left" },
  423. {
  424. label: '提交人', name: 'SubmitUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  425. learun.clientdata.getAsync('custmerData', {
  426. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  427. key: value,
  428. keyId: 'f_userid',
  429. callback: function (_data) {
  430. callback(_data['f_realname']);
  431. }
  432. });
  433. }
  434. },
  435. {
  436. label: '学院审核人', name: 'FirstCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  437. learun.clientdata.getAsync('custmerData', {
  438. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  439. key: value,
  440. keyId: 'f_userid',
  441. callback: function (_data) {
  442. callback(_data['f_realname']);
  443. }
  444. });
  445. }
  446. },
  447. { label: '学院审核时间', name: 'FirstCheckTime', width: 130, align: "left" },
  448. { label: '学院审核原因', name: 'FirstCheckRemark', width: 100, align: "left" },
  449. {
  450. label: '学工部审核人', name: 'SecondCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  451. learun.clientdata.getAsync('custmerData', {
  452. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  453. key: value,
  454. keyId: 'f_userid',
  455. callback: function (_data) {
  456. callback(_data['f_realname']);
  457. }
  458. });
  459. }
  460. },
  461. { label: '学工部审核时间', name: 'SecondCheckTime', width: 130, align: "left" },
  462. { label: '学工部审核原因', name: 'SecondCheckRemark', width: 100, align: "left" },
  463. ],
  464. mainId: 'Id',
  465. isPage: true,
  466. sidx: 'CreateTime desc'
  467. });
  468. page.search();
  469. },
  470. search: function (param) {
  471. param = param || {};
  472. param.StartTime = startTime;
  473. param.EndTime = endTime;
  474. if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") {
  475. param.CreateUserNo = learun.clientdata.get(['userinfo']).account;//辅导员
  476. }
  477. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  478. }
  479. };
  480. refreshGirdData = function () {
  481. page.search();
  482. };
  483. page.init();
  484. }