diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuFellowshipController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuFellowshipController.cs index aec0d80b6..e509cee42 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuFellowshipController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuFellowshipController.cs @@ -49,6 +49,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers ViewBag.ClassNo = ClassNos.TrimEnd(','); return View(); } + /// + /// 主页面【二级学院】 + /// + /// + [HttpGet] + public ActionResult IndexOfTwo() + { + return View(); + } #endregion #region 获取数据 @@ -148,6 +157,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuFellowshipIBLL.DoSubmit(keyValue, status, step); return Success("操作成功!"); } + /// + /// 退回 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoBack(string keyValue, string status, string step) + { + stuFellowshipIBLL.DoBack(keyValue, status, step); + return Success("操作成功!"); + } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.cshtml new file mode 100644 index 000000000..962affddd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.cshtml @@ -0,0 +1,83 @@ +@{ + ViewBag.Title = "助学金管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+
+
+
+
申请
+
+
+
+
发放
+
+
+
+
+
+
+
+
学号
+ +
+
+
姓名
+ +
+
+
院系
+
+
+
+
班级
+
+
+
+
身份证号
+ +
+
+
资助等级
+
+
+
+
开户行户
+ +
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.js new file mode 100644 index 000000000..e2189bc59 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.js @@ -0,0 +1,305 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-03-13 10:37 + * 描 述:定制功能助学金 + */ +var refreshGirdData; +var types = request('types');//助学金类型:1国家助学金,2校级助学金 +console.log(types == "1" ? "国家助学金" : types == "2" ? "校级助学金" : ""); +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var startTimeRelease; + var endTimeRelease; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { 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') } }, + { 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') } }, + { 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') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + $('#datesearchRelease').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { 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') } }, + { 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') } }, + { 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') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTimeRelease = begin; + endTimeRelease = end; + page.search(); + } + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 350, 400); + //下拉框绑定 + $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#SubsidizeType').lrDataItemSelect({ code: 'StateStipend' }); + + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "1") { + learun.alert.warning("当前项不属于学院审核状态,无法编辑!"); + return false; + } + learun.layerForm({ + id: 'formOfTwo', + title: '审核', + url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/Form?Types=' + types + '&Step=2&keyValue=' + keyValue, + width: 1000, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 提交学工部审核 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "1") { + learun.alert.warning("当前项不属于学院审核状态,无法提交学工部审核!"); + return false; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/DoSubmit', { keyValue: keyValue, status: '2', step: '2' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 退回辅导员 + $('#lr_back').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "1") { + learun.alert.warning("当前项不属于学院审核状态,无法退回辅导员!"); + return false; + } + learun.layerConfirm('是否确认退回该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/DoBack', { keyValue: keyValue, status: '0', step: '2' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/GetPageList', + headData: [ + { label: '学号', name: 'StuNo', width: 120, align: "left" }, + { label: '姓名', name: 'StuName', width: 150, align: "left" }, + { + label: '院校', name: 'F_SchoolId', width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { + label: "所属班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { + label: '身份证件类型', name: 'IdCardType', width: 100, align: "left" + , formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'IdCardType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: '身份证件号', name: 'IdentityCardNo', width: 160, align: "left" }, + { + label: '资助等级', name: 'SubsidizeType', width: 100, align: "left" + , formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'StateStipend', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: '资助标准', name: 'FunderNationStandard', width: 100, align: "left" }, + { label: '应发金额', name: 'AmountPayable', width: 100, align: "left" }, + { label: '实发金额', name: 'FinalPayingAmount', width: 100, align: "left" }, + { + label: '申请日期', name: 'ApplyDate', width: 100, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { label: '发放日期', name: 'ReleaseDate', width: 100, align: "left" }, + { label: '申请理由', name: 'ApplyReason', width: 200, align: "left" }, + { + label: '开户银行', name: 'OpenBank', width: 200, align: "left" + , formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'DepositBank', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: '开户卡账号', name: 'OpenAccount', width: 200, align: "left" }, + { label: '开户行号', name: 'OpenBankNo', width: 120, align: "left" }, + { label: '备注说明', name: 'Remark', width: 200, align: "left" }, + { + label: '审核状态', name: 'Status', width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue == "0" ? "草稿" : cellvalue == "1" ? "学院审核中" : cellvalue == "2" ? "学工部审核中" : cellvalue == "3" ? "已归档" : "草稿"; + } + }, + { + label: '创建人', name: 'CreateUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: '创建时间', name: 'CreateTime', width: 130, align: "left" }, + { label: '提交时间', name: 'SubmitTime', width: 130, align: "left" }, + { + label: '提交人', name: 'SubmitUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { + label: '学院审核人', name: 'FirstCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: '学院审核时间', name: 'FirstCheckTime', width: 130, align: "left" }, + { + label: '学工部审核人', name: 'SecondCheckUserId', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: '学工部审核时间', name: 'SecondCheckTime', width: 130, align: "left" }, + ], + mainId: 'ID', + isPage: true, + sidx: 'SubmitTime desc' + }); + }, + search: function (param) { + param = param || {}; + param.Types = types; + param.StartTime = startTime; + param.EndTime = endTime; + param.StartTimeRelease = startTimeRelease; + param.EndTimeRelease = endTimeRelease; + param.Step = "2";//第二步:二级学院审核 + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index d542eca60..9c5c6e13d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -997,6 +997,7 @@ + @@ -8122,6 +8123,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipBLL.cs index b849a4312..8e59eda77 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipBLL.cs @@ -166,6 +166,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 退回 + /// + /// 主键 + public void DoBack(string keyValue, string status, string step) + { + try + { + stuFellowshipService.DoBack(keyValue, status, step); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipIBLL.cs index eb2445c3b..d750012c1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipIBLL.cs @@ -55,6 +55,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// 主键 void DoSubmit(string keyValue, string status, string step); + /// + /// 退回 + /// + /// 主键 + void DoBack(string keyValue, string status, string step); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipService.cs index 178e00db7..14f896f67 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipService.cs @@ -69,6 +69,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append("SELECT t.*,s.StuName,s.F_SchoolId,s.ClassNo,s.IdentityCardNo,s.IdCardType,s.DepositBank as OpenBank,s.BankCard as OpenAccount "); strSql.Append(" FROM StuFellowship t "); strSql.Append(" left join StuInfoBasic s on t.StuNo=s.StuNo "); + strSql.Append(" left join ClassInfo c on t.CreateUserNo=c.ClassTutorNo and s.ClassNo=c.ClassNo "); + strSql.Append(" left join CdDept d on c.DeptNo=d.DeptNo "); strSql.Append(" where 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 @@ -126,6 +128,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("EndTimeRelease", queryParam["EndTimeRelease"].ToDate(), DbType.DateTime); strSql.Append(" AND ( t.ReleaseDate >= @StartTimeRelease AND t.ReleaseDate <= @EndTimeRelease ) "); } + if (!queryParam["Step"].IsEmpty() && queryParam["Step"].ToString() == "2")//第二步:二级学院审核 + { + //不查看状态为草稿的记录 + strSql.Append(" AND t.Status > 0 "); + //二级学院审核专员==系部负责人==登录用户 + strSql.Append($" and d.DeptDirector='{LoginUserInfo.Get().account}' "); + } + if (!queryParam["Step"].IsEmpty() && queryParam["Step"].ToString() == "3")//第三步:学工部审核 + { + //不查看状态为草稿的记录 + strSql.Append(" AND t.Status > 1 "); + } + if (!queryParam["Status"].IsEmpty()) + { + dp.Add("Status", queryParam["Status"].ToString(), DbType.String); + strSql.Append(" AND t.Status = @Status "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -262,6 +281,37 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 退回 + /// + /// 主键 + public void DoBack(string keyValue, string status, string step) + { + try + { + if (step == "2")//第二步:退回辅导员 + { + this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuFellowship set FirstCheckTime='{DateTime.Now}',FirstCheckUserId='{LoginUserInfo.Get().userId}',Status='{status}' where Id='{keyValue}' "); + } + else if (step == "3")//第三步:退回辅导员、退回二级学院 + { + this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuFellowship set SecondCheckTime='{DateTime.Now}',SecondCheckUserId='{LoginUserInfo.Get().userId}',Status='{status}' where Id='{keyValue}' "); + } + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion }