From 5b903a97c399afff45fd562acf1bbea4023011fd Mon Sep 17 00:00:00 2001
From: dyy <807692433@qq.com>
Date: Thu, 21 Sep 2023 15:19:27 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E8=B5=84?=
=?UTF-8?q?=E5=8A=A9-=E5=8A=A9=E5=AD=A6=E9=87=91=EF=BC=9A=E5=AD=A6?=
=?UTF-8?q?=E7=94=9F=E5=8F=AF=E4=BB=A5=E5=8F=91=E8=B5=B7=E7=94=B3=E8=AF=B7?=
=?UTF-8?q?=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/StuFellowshipController.cs | 20 +++
.../Views/StuFellowship/FormOfStudent.cshtml | 93 ++++++++++++
.../Views/StuFellowship/FormOfStudent.js | 142 ++++++++++++++++++
.../Views/StuFellowship/IndexOfStudent.cshtml | 8 +-
.../Views/StuFellowship/IndexOfStudent.js | 71 ++++++++-
.../Views/FamilyEconomy/FormOfStudent.cshtml | 2 +-
.../Learun.Application.Web.csproj | 2 +
.../StuFellowship/StuFellowshipService.cs | 4 +-
8 files changed, 338 insertions(+), 4 deletions(-)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormOfStudent.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormOfStudent.js
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 fccd18f63..022211d4d 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
@@ -17,6 +17,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
private StuFellowshipIBLL stuFellowshipIBLL = new StuFellowshipBLL();
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
+ private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
#region 视图功能
@@ -96,6 +97,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.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;
+ ViewBag.OpenBank = stuinfo?.DepositBank;
+ ViewBag.OpenAccount = stuinfo?.BankCard;
+
+ return View();
+ }
#endregion
#region 获取数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormOfStudent.cshtml
new file mode 100644
index 000000000..f6d13ccac
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormOfStudent.cshtml
@@ -0,0 +1,93 @@
+@{
+ ViewBag.Title = "定制功能助学金";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuFellowship/FormOfStudent.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormOfStudent.js
new file mode 100644
index 000000000..c55695caf
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormOfStudent.js
@@ -0,0 +1,142 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-03-13 10:37
+ * 描 述:定制功能助学金
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+var Step = request('Step');//第几步
+var Types = request('Types');//助学金类型:1国家助学金,2校级助学金
+if (Types != null && Types != undefined && Types != "") {
+ $('#Types').val(Types);
+}
+
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ 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");
+ $('#OpenBank').lrDataItemSelect({ code: 'DepositBank' });
+ //根据登录用户自动带出内容:姓名 院系 班级 身份证件号 开户银行 开户卡账号
+ var timer = setTimeout(function () {
+ $("#StuNo").val(StuNo);
+ $("#StuName").val(StuName);
+ $("#DeptNo").lrselectSet(DeptNo);
+ $("#ClassNo").lrselectSet(ClassNo);
+ $("#IdentityCardNo").val(IdentityCardNo);
+ $("#OpenBank").lrselectSet(OpenBank);
+ $("#OpenAccount").val(OpenAccount);
+ clearTimeout(timer);
+ }, 10);
+
+ //判断助学金类型:1国家助学金,2校级助学金
+ if (Types == "1") {
+ $('#SubsidizeType').lrDataItemSelect({
+ code: 'StateStipend',
+ select: function (item) {
+ //系统自动带出标准、应发金额和实发金额
+ if (item != null && item != undefined) {
+ $("#FunderNationStandard").val(item.id);
+ $("#FinalPayingAmount").val(item.id);
+ $("#AmountPayable").val(item.id);
+ }
+ }
+ });
+ } else if (Types == "2") {
+ $('#SubsidizeType').lrDataItemSelect({
+ code: 'SchoolStipend',
+ select: function (item) {
+ //系统自动带出标准、应发金额和实发金额
+ if (item != null && item != undefined) {
+ $("#FunderNationStandard").val(item.id);
+ $("#FinalPayingAmount").val(item.id);
+ $("#AmountPayable").val(item.id);
+ }
+ }
+ });
+ }
+
+ //申请时间:默认当天
+ $('#ApplyDate').val(getNowDate());
+ $('#Files').lrUploader();
+
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/GetFormData?keyValue=' + keyValue, function (data) {
+ for (var id in data) {
+ if (!!data[id].length && data[id].length > 0) {
+ $('#' + id).jfGridSet('refreshdata', data[id]);
+ }
+ else {
+
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ //判断身份证件类型为空时,默认选择“居民身份证”
+ if (data[id].IdCardType == null || data[id].IdCardType == "" || data[id].IdCardType == undefined) {
+ $('#IdCardType').lrselectSet("01");
+ }
+ }
+
+ });
+ }
+ }
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+ var postData = $('#form').lrGetFormData();
+ var postDatas = {
+ strEntity: JSON.stringify(postData)
+ };
+
+ $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/SaveForm?keyValue=' + keyValue, postDatas, 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;
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.cshtml
index 34cbf57fc..95d5e1845 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.cshtml
@@ -67,9 +67,15 @@
-
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.js
index b8004ef57..d0490ec09 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.js
@@ -108,6 +108,76 @@ var bootstrap = function ($, learun) {
$('#lr_refresh').on('click', function () {
location.reload();
});
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/FormOfStudent?Types=' + types,
+ width: 1000,
+ height: 600,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').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.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/FormOfStudent?Types=' + types + '&keyValue=' + keyValue,
+ width: 1000,
+ height: 600,
+ 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 + '/EducationalAdministration/StuFellowship/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 + '/EducationalAdministration/StuFellowship/DoSubmit', { keyValue: keyValue, status: '1', step: '1' }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
@@ -279,7 +349,6 @@ var bootstrap = function ($, learun) {
param.EndTimeRelease = endTimeRelease;
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/Areas/StudentWork/Views/FamilyEconomy/FormOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormOfStudent.cshtml
index 1f7b16878..6b729440d 100644
--- 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
@@ -13,7 +13,7 @@