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.
 
 
 
 
 
 

261 lines
11 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-07-17 11:20
  5. * 描 述:新生资助变更管理
  6. */
  7. var refreshGirdData;
  8. var NowGrade;
  9. var processId = '';
  10. var bootstrap = function ($, learun) {
  11. "use strict";
  12. var page = {
  13. init: function () {
  14. var data_grade = learun.httpGet(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByMaxClass',
  15. {});
  16. NowGrade = data_grade.info;
  17. page.initGird();
  18. page.bind();
  19. //page.refreshMoney();
  20. },
  21. bind: function () {
  22. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  23. page.search(queryJson);
  24. //page.refreshMoney();
  25. }, 380, 400);
  26. $("#IsSubsidize1").lrDataItemSelect({ code: "jyYewOrNot" });
  27. $('#Grade').lrselect({
  28. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
  29. value: "year",
  30. text: "year",
  31. });
  32. $('#Grade').lrselectSet(NowGrade);
  33. $('#DeptNo').lrselect({
  34. allowSearch: true,
  35. value: "deptno",
  36. text: "deptname",
  37. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  38. select: function (item) {
  39. if (item) {
  40. $('#MajorNo').lrselectRefresh({
  41. allowSearch: true,
  42. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  43. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  44. });
  45. } else {
  46. $('#MajorNo').lrselectRefresh({
  47. allowSearch: true,
  48. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  49. param: { strWhere: "1=1 AND CheckMark=1" }
  50. });
  51. }
  52. }
  53. });
  54. $('#MajorNo').lrselect({
  55. allowSearch: true,
  56. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  57. value: "majorno",
  58. text: "majorname",
  59. param: { strWhere: "1=1 AND CheckMark=1" },
  60. select: function (item) {
  61. if (item) {
  62. $('#ClassNo').lrselectRefresh({
  63. allowSearch: true,
  64. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  65. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
  66. });
  67. } else {
  68. $('#ClassNo').lrselectRefresh({
  69. allowSearch: true,
  70. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  71. param: { strWhere: "1=1 AND CheckMark=1" }
  72. });
  73. }
  74. }
  75. });
  76. $('#ClassNo').lrselect({
  77. allowSearch: true,
  78. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  79. param: { strWhere: "1=1 AND CheckMark=1" },
  80. value: "classno",
  81. text: "classname"
  82. });
  83. // 刷新
  84. $('#lr_refresh').on('click', function () {
  85. location.reload();
  86. });
  87. // 打印
  88. $('#lr_print').on('click', function () {
  89. $('#gridtable').jqprintTable();
  90. });
  91. //查看
  92. $('#lr_view').on('click', function () {
  93. page.eye();
  94. //var keyValue = $('#gridtable').jfGridValue('StuId');
  95. //if (learun.checkrow(keyValue)) {
  96. // learun.layerForm({
  97. // id: 'form',
  98. // title: '查看',
  99. // url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
  100. // width: 800,
  101. // height: 600,
  102. // btn: null
  103. // });
  104. //}
  105. });
  106. //编辑
  107. $('#lr_edit').on('click', function () {
  108. var keyValue = $('#gridtable').jfGridValue('StuId');
  109. var status = $('#gridtable').jfGridValue('SupportStatus');
  110. if (status != 0) {
  111. learun.alert.warning("选中记录中已提交,不可编辑!");
  112. return;
  113. }
  114. if (learun.checkrow(keyValue)) {
  115. learun.layerForm({
  116. id: 'form',
  117. title: '编辑',
  118. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/HelpChange?keyValue=' + keyValue,
  119. width: 600,
  120. height: 400,
  121. callBack: function (id) {
  122. top[id].save();
  123. return refreshGirdData('', '');
  124. }
  125. });
  126. }
  127. });
  128. //  提交
  129. $('#lr_submit').on('click', function () {
  130. var keyValue = $('#gridtable').jfGridValue('StuId');
  131. if (learun.checkrow(keyValue)) {
  132. var status = $('#gridtable').jfGridValue('SupportStatus');
  133. if (status != 0) {
  134. learun.alert.warning("当前项目已提交,请耐心等待审批!");
  135. return;
  136. }
  137. learun.layerConfirm('是否确认提交该项!', function (res) {
  138. if (res) {
  139. processId = learun.newGuid();
  140. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) {
  141. refreshGirdData(res, {});
  142. });
  143. }
  144. });
  145. }
  146. });
  147. },
  148. // 初始化列表
  149. initGird: function () {
  150. $('#gridtable').jfGrid({
  151. url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
  152. headData: [
  153. { label: "姓名", name: "StuName", width: 100, align: "left" },
  154. {
  155. label: "班级", name: "ClassNo", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  156. learun.clientdata.getAsync('custmerData', {
  157. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  158. key: value,
  159. keyId: 'classno',
  160. callback: function (_data) {
  161. callback(_data['classname']);
  162. }
  163. });
  164. }
  165. },
  166. { label: "开户银行", name: "SupportBank", width: 100, align: "left" },
  167. { label: "银行卡号", name: "SupportBankCard", width: 100, align: "left" },
  168. { label: "金额", name: "SupportAmount", width: 100, align: "left" },
  169. { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
  170. { label: "创建时间", name: "SupportChangeTime", width: 200, align: "left" },
  171. { label: "操作人", name: "SupportChangeUserName", width: 100, align: "left" },
  172. { label: "备注信息", name: "SupportChangeRemark", width: 200, align: "left" },
  173. {
  174. label: "审批状态", name: "SupportStatus", width: 100, align: "left",
  175. formatter: function (cellvalue, row) {
  176. if (cellvalue === 1) {
  177. return '<span class=\"label label-warning\">进行中</span>';
  178. } else if (cellvalue === 2) {
  179. return '<span class=\"label label-success\">审批通过</span>';
  180. } else {
  181. return '<span class=\"label label-default\" >草稿</span>';
  182. }
  183. }
  184. }
  185. ],
  186. //isMultiselect: true,
  187. mainId: 'StuId',
  188. isPage: true,
  189. sord: 'desc',
  190. sidx: 'SupportChangeTime'
  191. });
  192. page.search();
  193. },
  194. refreshMoney: function () {
  195. //var deptNo = $("#DeptNo").lrselectGet();
  196. //var majorNo = $("#MajorNo").lrselectGet();
  197. //var classNo = $("#ClassNo").lrselectGet();
  198. //$.post(
  199. // top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetHelpStatistics',
  200. // {
  201. // DeptNo: deptNo,
  202. // MajorNo: majorNo,
  203. // ClassNo: classNo
  204. // },
  205. // function (res) {
  206. // $("#allAmount").html(res.data.aa);
  207. // $("#isAmount").html(res.data.bb);
  208. // }, "json");
  209. },
  210. search: function (param) {
  211. param = param || {};
  212. param.SqlParameter = ' AND IsReport=1 AND IsSupportChange=1';
  213. if (!param.Grade && param.Grade == undefined) {
  214. param.Grade = NowGrade;
  215. }
  216. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  217. },
  218. eye: function () {
  219. var processId = $('#gridtable').jfGridValue('SupportProcessId') || '';
  220. var title = $('#gridtable').jfGridValue('StuName');
  221. var SupportStatus = $('#gridtable').jfGridValue('SupportStatus');
  222. if (SupportStatus == '0') {
  223. return learun.alert.warning('该项目暂无流程进度!');
  224. }
  225. if (learun.checkrow(processId)) {
  226. learun.frameTab.open({
  227. F_ModuleId: 'monitor' + processId,
  228. F_FullName: '查看-' + title,
  229. F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId
  230. });
  231. }
  232. }
  233. };
  234. refreshGirdData = function (res, postData) {
  235. if (res && res.code && res.code == 200) {
  236. // 发起流程
  237. var postData = {
  238. schemeCode: 'HelpChange',// 填写流程对应模板编号
  239. processId: processId,
  240. level: '1',
  241. };
  242. learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
  243. learun.loading(false);
  244. });
  245. }
  246. page.search();
  247. };
  248. page.init();
  249. }