diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs
index 17b681fef..03aa75a53 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollController.cs
@@ -224,6 +224,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return View();
}
///
+ /// 资助变更列表
+ ///
+ ///
+ [HttpGet]
+ public ActionResult IndexHelpChange()
+ {
+ return View();
+ }
+ ///
/// 新生学费管理
///
///
@@ -573,7 +582,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success(data);
}
-
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDataByProcessId(string processId)
+ {
+ StuEnrollEntity data = stuEnrollIBLL.GetEntityByProcessId(processId);
+ var jsonData = new
+ {
+ StuEnroll = data,
+ };
+ return Success(jsonData);
+ }
#endregion
#region 提交数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/HelpChange.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/HelpChange.js
index d4f3998fd..ecc714151 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/HelpChange.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/HelpChange.js
@@ -18,13 +18,13 @@ var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
- $('.lr-form-wrap').lrscroll();
+ // $('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
//idcardreader.objectcheck("btnread");
},
bind: function () {
-
+
$('#ClassNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
@@ -32,7 +32,7 @@ var bootstrap = function ($, learun) {
value: "classno",
text: "classname"
});
-
+
},
initData: function () {
if (!!keyValue) {
@@ -51,6 +51,28 @@ var bootstrap = function ($, learun) {
}
}
};
+ // 设置表单数据
+ setFormData = function (processId, param, callback) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetFormDataByProcessId?processId=' + processId, function (data) {
+ for (var id in data) {
+ if (!!data[id] && data[id].length > 0) {
+ $('#' + id).jfGridSet('refreshdata', data[id]);
+ }
+ else {
+ if (id == 'StuEnroll' && data[id]) {
+ keyValue = data[id].StuId;
+ }
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ //setTimeout(function () {
+ // ue.setContent(data[id].F_NewsContent);
+ //}, 100);
+ }
+ }
+ });
+ }
+ callback && callback();
+ }
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
@@ -65,13 +87,24 @@ var bootstrap = function ($, learun) {
}
var postData = {};
var strEntity = $('body').lrGetFormData();
- strEntity.SupportProcessId = processId;
+ if (!!processId) {
+ strEntity.SupportProcessId = processId;
+ }
postData.strEntity = JSON.stringify(strEntity);
-
+
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SupportChange?keyValue=' + keyValue, postData, function (res) {
- // 保存成功后才回调
- if (!!callBack) {
- callBack(res, strEntity, i);
+ if (!!processId) {
+ var res = {};
+ res.code = 200;
+ if (!!callBack) {
+ callBack(res, i);
+ }
+
+ } else {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, strEntity, i);
+ }
}
});
};
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IndexHelpChange.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IndexHelpChange.cshtml
index 907b8bf08..7455ffee8 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IndexHelpChange.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IndexHelpChange.cshtml
@@ -58,6 +58,7 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IndexHelpChange.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IndexHelpChange.js
index b9aa806a9..fdfd73741 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IndexHelpChange.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IndexHelpChange.js
@@ -19,7 +19,7 @@ var bootstrap = function ($, learun) {
page.search(queryJson);
//page.refreshMoney();
}, 380, 400);
-
+
$('#ClassNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
@@ -35,6 +35,7 @@ var bootstrap = function ($, learun) {
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
+ //查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('StuId');
if (learun.checkrow(keyValue)) {
@@ -48,13 +49,34 @@ var bootstrap = function ($, learun) {
});
}
});
-
+ //编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('StuId');
+ var status = $('#gridtable').jfGridValue('SupportStatus');
+ if (status != 0) {
+ learun.alert.warning("选中记录中已提交,不可编辑!");
+ return;
+ }
+ if (learun.checkrow(keyValue)) {
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/HelpChange?keyValue=' + keyValue,
+ width: 600,
+ height: 400,
+ callBack: function (id) {
+ top[id].save();
+ return refreshGirdData('', '');
+ }
+ });
+ }
+ });
// 提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('StuId');
if (learun.checkrow(keyValue)) {
- var AAStatus = $('#gridtable').jfGridValue('SupportStatus');
- if (AAStatus !== 0) {
+ var status = $('#gridtable').jfGridValue('SupportStatus');
+ if (status != 0) {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}
@@ -88,55 +110,22 @@ var bootstrap = function ($, learun) {
});
}
},
+ { label: "开户银行", name: "SupportBank", width: 100, align: "left" },
+ { label: "银行卡号", name: "SupportBankCard", width: 100, align: "left" },
+ { label: "金额", name: "SupportAmount", width: 100, align: "left" },
+ { label: "备注信息", name: "SupportChangeRemark", width: 200, align: "left" },
{
- label: "户别", name: "ResidenceType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'HouseholdCategory',
- callback: function (_data) {
- callback(_data.text);
- }
- });
+ label: "审批状态", name: "SupportStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue === 1) {
+ return '审批中';
+ } else if (cellvalue === 2) {
+ return '审批通过';
+ } else {
+ return '草稿';
+ }
}
- },
- {
- label: "享受等级", name: "SupportGrade", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- console.log('享受等级',value);
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'SupportGrade',
- callback: function (_data) {
- console.log('dataItem', _data);
- callback(_data.text);
- }
- });
- }
- }, {
- label: "资助种类", name: "SupportType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'SupportType1',
- callback: function (_data) {
- if (_data.text) {
- callback(_data.text);
- } else {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'SupportType2',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- }
- });
- }
- },
- { label: "符合资助条件", name: "SupportCondition", width: 200, align: "left" },
- { label: "备注信息", name: "SupportRemarks", width: 200, align: "left" }
+ }
],
isMultiselect: true,
mainId: 'StuId',
@@ -172,9 +161,8 @@ var bootstrap = function ($, learun) {
refreshGirdData = function (res, postData) {
if (res && res.code && res.code == 200) {
// 发起流程
-
var postData = {
- schemeCode: 'Ass_PurchaseApply',// 填写流程对应模板编号
+ schemeCode: 'HelpChange',// 填写流程对应模板编号
processId: processId,
level: '1',
};
@@ -185,5 +173,6 @@ var bootstrap = function ($, learun) {
}
page.search();
};
+
page.init();
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IsHelp.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IsHelp.js
index 3789e38f4..d3c9af121 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IsHelp.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/IsHelp.js
@@ -119,28 +119,35 @@ var bootstrap = function ($, learun) {
//资助变更
$("#lr_change").on('click', function () {
var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '资助变更',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/HelpChange?keyValue=' + keyValue,
- width: 600,
- height: 400,
- callBack: function (id) {
- var res = false;
- // 验证数据
- res = top[id].validForm();
- // 保存数据
- if (res) {
- res = top[id].save('', function () {
- page.search();
- });
+ var isSupportChange = $('#gridtable').jfGridValue('IsSupportChange');
+ //如果已变更,将不能重复变更
+ if (isSupportChange) {
+ learun.alert.warning("选中记录中已变更,不可重复变更!");
+ return;
+ } else {
+ if (learun.checkrow(keyValue)) {
+ learun.layerForm({
+ id: 'form',
+ title: '资助变更',
+ url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/HelpChange?keyValue=' + keyValue,
+ width: 600,
+ height: 400,
+ callBack: function (id) {
+ var res = false;
+ // 验证数据
+ res = top[id].validForm();
+ // 保存数据
+ if (res) {
+ res = top[id].save('', function () {
+ page.search();
+ });
+ }
+ return res;
}
- return res;
- }
- });
- }
+ });
+ }
+ }
});
},
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollBLL.cs
index b3724ef23..e0c11dc4b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollBLL.cs
@@ -159,7 +159,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
-
+ ///
+ /// 获取StuEnroll表实体数据
+ /// 主键
+ ///
+ ///
+ public StuEnrollEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return stuEnrollService.GetEntityByProcessId(processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
public object GetStuInfo(string stuId)
{
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollIBLL.cs
index 42bdae9f4..b151c5347 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollIBLL.cs
@@ -40,6 +40,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
///
StuEnrollEntity GetStuEnrollEntity(string keyValue);
+ ///
+ /// 获取数据
+ ///
+ ///
+ ///
+ StuEnrollEntity GetEntityByProcessId(string processId);
#endregion
#region 提交数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs
index fc7c08217..fb9810123 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs
@@ -99,7 +99,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
t.Grade,
t.THROUGHPROJECT,
t.Status,
-t.IsSupport,t.SupportGrade,t.SupportType,t.SupportCondition,t.SupportRemarks
+t.IsSupport,t.SupportGrade,t.SupportType,t.SupportCondition,t.SupportRemarks,
+t.IsSupportChange,t.SupportBank,t.SupportBankCard,t.SupportAmount,t.SupportStatus,t.SupportChangeRemark,t.SupportProcessId
");
strSql.Append(" FROM StuEnroll t ");
strSql.Append(" WHERE 1=1 ");
@@ -2202,6 +2203,40 @@ t.IsSupport,t.SupportGrade,t.SupportType,t.SupportCondition,t.SupportRemarks
}
}
+ ///
+ /// 获取StuEnroll表实体数据
+ /// 主键
+ ///
+ ///
+ public StuEnrollEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ var entity = this.BaseRepository("CollegeMIS").FindEntity(x=>x.SupportProcessId== processId);
+ //if (!string.IsNullOrEmpty(entity.Photo))
+ //{
+ // var path = this.BaseRepository().FindEntity(a => a.F_Id == entity.Photo)?.F_FilePath;
+ // if (!string.IsNullOrEmpty(path))
+ // {
+ // path = "/" + path.Substring(path.IndexOf("Resource"));
+ // entity.PhotoUrl = path;
+ // }
+ //}
+ return entity;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
#endregion 获取数据
#region 提交数据
@@ -2602,7 +2637,9 @@ where StuId='{keyValue}'";
string sql = $@"update StuEnroll set SupportBank='{entity.SupportBank}',
SupportBankCard='{entity.SupportBankCard}',
SupportAmount='{entity.SupportAmount}',
-SupportProcessId='{entity.SupportProcessId}',SupportStatus=0,IsSupportChange=1
+SupportProcessId='{entity.SupportProcessId}',
+SupportChangeRemark='{entity.SupportChangeRemark}',
+SupportStatus=0,IsSupportChange=1
where StuId='{keyValue}'";
this.BaseRepository("CollegeMis").ExecuteBySql(sql);
}