diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/FamilyEconomyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/FamilyEconomyController.cs
index a26799491..30ab6fb5b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/FamilyEconomyController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/FamilyEconomyController.cs
@@ -18,6 +18,7 @@ namespace Learun.Application.Web.Areas.StudentWork.Controllers
{
private FamilyEconomyIBLL familyEconomyIBLL = new FamilyEconomyBLL();
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
+ private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
#region 视图功能
@@ -97,6 +98,23 @@ namespace Learun.Application.Web.Areas.StudentWork.Controllers
{
return View();
}
+ ///
+ /// 表单页【学生】
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormOfStudent()
+ {
+ var logUser = LoginUserInfo.Get();
+ var stuinfo = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(logUser.account);
+ ViewBag.StuNo = stuinfo?.StuNo;
+ ViewBag.StuName = stuinfo?.StuName;
+ ViewBag.DeptNo = stuinfo?.DeptNo;
+ ViewBag.ClassNo = stuinfo?.ClassNo;
+ ViewBag.IdentityCardNo = stuinfo?.IdentityCardNo;
+
+ return View();
+ }
#endregion
#region 获取数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormOfStudent.cshtml
new file mode 100644
index 000000000..1f7b16878
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormOfStudent.cshtml
@@ -0,0 +1,199 @@
+@{
+ ViewBag.Title = "家庭经济信息(辅导员)";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+
+
+@Html.AppendJsFile("/Areas/StudentWork/Views/FamilyEconomy/FormOfStudent.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormOfStudent.js
new file mode 100644
index 000000000..1af4fb9b9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormOfStudent.js
@@ -0,0 +1,165 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-03-16 17:18
+ * 描 述:家庭经济信息(辅导员)
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+var Step = request('Step');//第几步
+
+var bootstrap = function ($, learun) {
+ "use strict";
+ var selectedRow = learun.frameTab.currentIframe().selectedRow;
+ var page = {
+ init: function () {
+ page.hide();
+ page.bind();
+ page.initData();
+ },
+ hide: function () {
+ if (Step == "2") {//第二步:二级学院审核,时附件显示且必填;
+ $('#FilesDiv').show();
+ $('#Files').attr('isvalid', 'yes');
+ $('#Files').attr('checkexpession', 'NotNull');
+ $('#Files').prev().html('附件*');
+
+ } else {
+ $('#Files').removeAttr('isvalid');
+ $('#Files').removeAttr('checkexpession');
+ $('#Files').prev().html('附件');
+ $('#FilesDiv').hide();
+ }
+ },
+ bind: function () {
+ $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
+ $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
+ $('#IdCardType').lrDataItemSelect({ code: 'IdCardType' });
+ $('#IdCardType').lrselectSet('01');
+ //根据登录用户自动带出内容:学号 姓名 院系 班级 身份证件号
+ var timer = setTimeout(function () {
+ $("#StuNo").val(StuNo);
+ $("#StuName").val(StuName);
+ $("#DeptNo").lrselectSet(DeptNo);
+ $("#ClassNo").lrselectSet(ClassNo);
+ $("#IdentityCardNo").val(IdentityCardNo);
+ clearTimeout(timer);
+ }, 10);
+
+ //申请时间:默认当天
+ $('#ApplyTime').val(getNowDate());
+ $('#IsLowIncome').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsOrphan').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsSingleFamilyChildren').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsDisabledChildren').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsDisabled').lrDataItemSelect({
+ code: 'YesOrNoBit', select: function(item) {
+ //“残疾类别”非必填项。若“本人是否残疾”项填“是”,则该项为必填。
+ if (item != null && item.id == "true") {
+ $('#DisabledCategory').attr('isvalid', 'yes');
+ $('#DisabledCategory').attr('checkexpession', 'NotNull');
+ $('#DisabledCategory').prev().html('残疾类别*');
+ } else {
+ $('#DisabledCategory').removeAttr('isvalid');
+ $('#DisabledCategory').removeAttr('checkexpession');
+ $('#DisabledCategory').prev().html('残疾类别');
+ }
+ }
+ });
+ $('#DisabledCategory').lrDataItemSelect({ code: 'DisabledCategory' });
+ $('#IsParentsLoseWork').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsSeriouslyIllPatientInHome').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsOvercomePovertyFamilyStudent').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsUnstablePovertyFamilyStudent').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsEdgePovertyFamilyStudent').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsEdgeAcuteDifficultyStudent').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsLowIncomeFamily').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IsMartyrChildren').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#FamilyIncomeSourceCategory').lrDataItemSelect({ code: 'FamilyIncomeSourceCategory' });
+ $('#FamilyIsSufferNaturalDisaster').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#FamilyIsSufferUnexpectEvent').lrDataItemSelect({
+ code: 'YesOrNoBit', select: function (item) {
+ //“突发意外事件具体描述”非必填项。若“家庭是否遭受突然意外事件”项填“是”,则该项为必填项。
+ if (item != null && item.id == "true") {
+ $('#SufferUnexpectEventDescription').attr('isvalid', 'yes');
+ $('#SufferUnexpectEventDescription').attr('checkexpession', 'NotNull');
+ $('#SufferUnexpectEventDescription').prev().html('突发意外事件具体描述*');
+ } else {
+ $('#SufferUnexpectEventDescription').removeAttr('isvalid');
+ $('#SufferUnexpectEventDescription').removeAttr('checkexpession');
+ $('#SufferUnexpectEventDescription').prev().html('突发意外事件具体描述');
+ }
+ }
+ });
+ $('#IsSpecialPovertySupport').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#FamilyIsSufferEpidemic').lrDataItemSelect({ code: 'YesOrNoBit' });
+ $('#IdentifyDifficultyLevel').lrDataItemSelect({ code: 'DifficultyLevel' });
+ //“家庭遭受疫情具体情况描述”该项如果填写,则“认定时间”、“认定原因”、“认定困难级别名称”也必须同时填写且同时通过校验
+ $('#SufferEpidemicDescription').on('blur', function () {
+ if ($(this).val().trim() != null && $(this).val().trim() != undefined && $(this).val().trim() != "") {
+ $('#IdentifyDifficultyLevel').attr('isvalid', 'yes');
+ $('#IdentifyDifficultyLevel').attr('checkexpession', 'NotNull');
+ $('#IdentifyDifficultyLevel').prev().html('认定困难级别名称*');
+ $('#IdentifyTime').attr('isvalid', 'yes');
+ $('#IdentifyTime').attr('checkexpession', 'NotNull');
+ $('#IdentifyTime').prev().html('认定时间*');
+ $('#IdentifyReason').attr('checkexpession', 'LenStr');
+ $('#IdentifyReason').prev().html('认定原因*');
+ } else {
+ $('#IdentifyDifficultyLevel').removeAttr('isvalid');
+ $('#IdentifyDifficultyLevel').removeAttr('checkexpession');
+ $('#IdentifyDifficultyLevel').prev().html('认定困难级别名称');
+ $('#IdentifyTime').removeAttr('isvalid');
+ $('#IdentifyTime').removeAttr('checkexpession');
+ $('#IdentifyTime').prev().html('认定时间');
+ $('#IdentifyReason').attr('checkexpession', 'LenStrOrNull');
+ $('#IdentifyReason').prev().html('认定原因');
+ }
+ });
+ $('#Files').lrUploader();
+
+ },
+ initData: function () {
+ if (!!selectedRow) {
+ $('#form').lrSetFormData(selectedRow);
+ }
+ }
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ //判断:“是否单亲家庭子女”不能同时与“是否孤儿”同时填“是”
+ if ($('#IsOrphan').lrselectGet().toLowerCase() == "true") {
+ if ($('#IsSingleFamilyChildren').lrselectGet().toLowerCase() == "true") {
+ learun.alert.warning("“是否单亲家庭子女”不能同时与“是否孤儿”同时填“是”");
+ return false;
+ }
+ }
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+
+ var postData = $('#form').lrGetFormData();
+ $.lrSaveForm(top.$.rootUrl + '/StudentWork/FamilyEconomy/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
+//获取当前时间
+function getNowDate() {
+ var myDate = new Date;
+ var year = myDate.getFullYear(); //获取当前年
+ var mon = myDate.getMonth() + 1; //获取当前月
+ var date = myDate.getDate(); //获取当前日
+ var h = myDate.getHours();//获取当前小时数(0-23)
+ var m = myDate.getMinutes();//获取当前分钟数(0-59)
+ var s = myDate.getSeconds();//获取当前秒
+ var week = myDate.getDay();
+ var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
+ //console.log(year, mon, date, weeks[week])
+ var result = year + "-" + mon + "-" + date;
+ return result;
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.cshtml
index d20e96f20..5fd31172b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.cshtml
@@ -105,8 +105,16 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.js
index 558341bb3..3cf8ad5cb 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.js
@@ -89,6 +89,78 @@ var bootstrap = function ($, learun) {
$('#lr_refresh').on('click', function () {
location.reload();
});
+ // 新增
+ $('#lr_add').on('click', function () {
+ selectedRow = null;
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/StudentWork/FamilyEconomy/FormOfStudent',
+ width: 1100,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ var Status = $('#gridtable').jfGridValue('Status');
+ if (Status != "0") {
+ learun.alert.warning("当前项不属于草稿状态,无法编辑!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/StudentWork/FamilyEconomy/FormOfStudent?keyValue=' + keyValue,
+ width: 1100,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ if (learun.checkrow(keyValue)) {
+ var Status = $('#gridtable').jfGridValue('Status');
+ if (Status != "0") {
+ learun.alert.warning("当前项不属于草稿状态,无法删除!");
+ return false;
+ }
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/StudentWork/FamilyEconomy/DeleteForm', { keyValue: keyValue }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ // 提交二级学院审核
+ $('#lr_submit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ if (learun.checkrow(keyValue)) {
+ var Status = $('#gridtable').jfGridValue('Status');
+ if (Status != "0") {
+ learun.alert.warning("当前项不属于草稿状态,无法提交学院审核!");
+ return false;
+ }
+ learun.layerConfirm('是否确认提交该项!', function (res) {
+ if (res) {
+ learun.postForm(top.$.rootUrl + '/StudentWork/FamilyEconomy/DoSubmit', { keyValue: keyValue, status: '1', step: '1' }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
@@ -381,7 +453,6 @@ var bootstrap = function ($, learun) {
param.EndTime = endTime;
if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") {
param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号
- param.Status = 3;
}
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
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 7adf57573..6b0b1b70b 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
@@ -1776,6 +1776,7 @@
+
@@ -8307,6 +8308,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyService.cs
index ffa057f94..07e40d66c 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyService.cs
@@ -141,7 +141,9 @@ namespace Learun.Application.TwoDevelopment.StudentWork
strSql.Append("SELECT t.*,s.StuName,s.DeptNo,s.ClassNo,s.IdentityCardNo ");
strSql.Append(" FROM FamilyEconomy 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 ClassInfo c on t.CreateUserNo=c.ClassTutorNo and s.ClassNo=c.ClassNo ");
+ strSql.Append(" left join ClassInfo c on s.ClassNo=c.ClassNo ");
strSql.Append(" left join CdDept d on c.DeptNo=d.DeptNo ");
strSql.Append(" where 1=1 ");
if (!queryParam["StuNo"].IsEmpty())