@@ -1,5 +1,5 @@ | |||
@{ | |||
ViewBag.Title = "新生资助变更"; | |||
ViewBag.Title = "新生学费变更"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
@@ -113,6 +113,8 @@ 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: "SupportChangeTime", width: 200, align: "left" }, | |||
{ label: "操作人", name: "SupportChangeUserName", width: 100, align: "left" }, | |||
{ label: "备注信息", name: "SupportChangeRemark", width: 200, align: "left" }, | |||
{ | |||
label: "审批状态", name: "SupportStatus", width: 100, align: "left", | |||
@@ -127,9 +129,11 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
], | |||
isMultiselect: true, | |||
//isMultiselect: true, | |||
mainId: 'StuId', | |||
isPage: true | |||
isPage: true, | |||
sord: 'desc', | |||
sidx: 'SupportChangeTime' | |||
}); | |||
page.search(); | |||
}, | |||
@@ -59,7 +59,6 @@ | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_supply" class="btn btn-default"><i class="fa fa-plus"></i> 完善资助信息</a> | |||
<a id="lr_change" class="btn btn-default"><i class="fa fa-plus"></i> 资助变更</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -107,7 +107,7 @@ var bootstrap = function ($, learun) { | |||
title: '完善信息', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/IsHelpForm?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
height: 450, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
@@ -116,39 +116,6 @@ var bootstrap = function ($, learun) { | |||
}); | |||
//资助变更 | |||
$("#lr_change").on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||
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; | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
@@ -192,34 +159,64 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
} | |||
}, { | |||
label: "资助种类", name: "SupportType", width: 100, align: "left", | |||
}, | |||
{ | |||
label: "资助种类(一等)", name: "SupportType", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
learun.clientdata.getsAsync('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); | |||
} | |||
}); | |||
} | |||
callback: function (text) { | |||
callback(text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "资助种类(二等)", name: "SupportType1", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getsAsync('dataItem', { | |||
key: value, | |||
code: 'SupportType2', | |||
callback: function (text) { | |||
callback(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: "SupportTime", width: 200, align: "left" }, | |||
{ label: "操作人", name: "SupportUserName", width: 100, align: "left" }, | |||
{ label: "备注信息", name: "SupportRemarks", width: 200, align: "left" } | |||
], | |||
isMultiselect: true, | |||
//isMultiselect: true, | |||
mainId: 'StuId', | |||
isPage: true | |||
isPage: true, | |||
sord: 'desc', | |||
sidx: 'SupportTime' | |||
}); | |||
page.search(); | |||
}, | |||
@@ -247,5 +244,8 @@ var bootstrap = function ($, learun) { | |||
}, | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -7,21 +7,43 @@ | |||
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div> | |||
<input id="StuName" type="text" class="form-control" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||
<div class="lr-form-item-title">享受等级<font face="宋体">*</font></div> | |||
<div id="SupportGrade" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnroll"> | |||
<div class="lr-form-item-title">资助种类<font face="宋体">*</font></div> | |||
<div id="SupportType" isvalid="yes" checkexpession="NotNull"></div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||
<div class="lr-form-item-title">资助种类</div> | |||
<div id="" class="checkbox lr-checkbox" type="lr-checkbox"> | |||
<label> | |||
<input name="SupportGrade" value="1" type="checkbox" />一等助学金 | |||
</label> | |||
<div id="SupportType" isvalid="yes" checkexpession="NotNull"></div> | |||
<br /> | |||
<label> | |||
<input name="SupportGrade" value="2" type="checkbox" />二等助学金 | |||
</label> | |||
<div id="SupportType1"></div> | |||
</div> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||
<div class="lr-form-item-title">享受等级</div> | |||
<div id="SupportGrade" style="margin-top: 6px;">一等助学金</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||
<div class="lr-form-item-title">资助种类<font face="宋体">*</font></div> | |||
<div id="SupportType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||
<div class="lr-form-item-title"></div> | |||
<div id="SupportGrade1" style="margin-top: 6px;">二等助学金</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||
<div class="lr-form-item-title">资助种类</div> | |||
<div id="SupportType1" ></div> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||
<div class="lr-form-item-title">符合资助条件</div> | |||
<input id="SupportCondition" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuEnroll"> | |||
<div class="lr-form-item-title">备注信息</div> | |||
<input id="SupportRemarks" type="text" class="form-control"/> | |||
<input id="SupportRemarks" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnroll/IsHelpForm.js") | |||
@@ -15,20 +15,28 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#SupportGrade').lrDataItemSelect({ | |||
code: 'SupportGrade', | |||
select: function (item) { | |||
if (item != undefined) { | |||
if (item.id == '1') { | |||
$('#SupportType').lrDataItemSelect({ code: 'SupportType1' }); | |||
} | |||
else if (item.id == '2') { | |||
$('#SupportType').lrDataItemSelect({ code: 'SupportType2' }); | |||
} | |||
} | |||
} | |||
//$('#SupportGrade').lrDataItemSelect({ | |||
// code: 'SupportGrade' | |||
// //,select: function (item) { | |||
// // if (item != undefined) { | |||
// // if (item.id == '1') { | |||
// // $('#SupportType').lrDataItemSelect({ code: 'SupportType1' }); | |||
// // } | |||
// // else if (item.id == '2') { | |||
// // $('#SupportType').lrDataItemSelect({ code: 'SupportType2' }); | |||
// // } | |||
// // } | |||
// //} | |||
//}); | |||
//$('#SupportGrade').lrselectSet("1"); | |||
$('#SupportType').lrRadioCheckbox({ | |||
type: 'checkbox', | |||
code: 'SupportType1', | |||
}); | |||
$('#SupportType1').lrRadioCheckbox({ | |||
type: 'checkbox', | |||
code: 'SupportType2', | |||
}); | |||
$('#SupportType').lrDataItemSelect({ code: 'SupportType1' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -41,7 +49,7 @@ var bootstrap = function ($, learun) { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
@@ -51,8 +59,16 @@ var bootstrap = function ($, learun) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var strEntity = $('body').lrGetFormData(); | |||
if (strEntity.SupportType) { | |||
strEntity.SupportGrade = '1'; | |||
} | |||
else if (strEntity.SupportType1) { | |||
strEntity.SupportGrade = '2'; | |||
} | |||
//console.log(strEntity); | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
strEntity: JSON.stringify(strEntity) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SupplySupport?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
@@ -63,6 +63,7 @@ | |||
<a id="lr_nohelp" class="btn btn-default"><i class="fa fa-plus"></i> 不免学费</a> | |||
@*<a id="lr_allhelp" class="btn btn-default"><i class="fa fa-plus"></i> 全部免学费</a>*@ | |||
<a id="lr_support" class="btn btn-default"><i class="fa fa-plus"></i> 确认资助</a> | |||
<a id="lr_change" class="btn btn-default"><i class="fa fa-plus"></i> 学费变更</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -20,9 +20,9 @@ var bootstrap = function ($, learun) { | |||
}, 380, 400); | |||
$("#IsSubsidize1").lrDataItemSelect({ code: "jyYewOrNot" }); | |||
$('#Year').lrselect({ | |||
url:top.$.rootUrl+'/EducationalAdministration/StuEnroll/GetYearListByClass', | |||
value:"year", | |||
text:"year", | |||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass', | |||
value: "year", | |||
text: "year", | |||
}) | |||
$('#DeptNo').lrselect({ | |||
@@ -118,6 +118,12 @@ var bootstrap = function ($, learun) { | |||
$("#lr_help").on('click', function () { | |||
var data = $('#gridtable').jfGridGet('rowdata'); | |||
if (data.length > 0) { | |||
var IsManualSubsidize = $('#gridtable').jfGridValue('IsManualSubsidize'); | |||
if (IsManualSubsidize.indexOf('true') != -1) { | |||
learun.alert.warning('选中项目包含多次操作免学费的数据!'); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认免学费!', | |||
function (res) { | |||
if (res) { | |||
@@ -174,7 +180,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
//确认资助 | |||
$('#lr_support').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||
@@ -188,7 +194,46 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//学费变更 | |||
$("#lr_change").on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||
if (keyValue.indexOf(',') > 0) { | |||
learun.alert.warning("只能选中一条记录变更!"); | |||
return; | |||
} | |||
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; | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -295,10 +295,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("ISSUBSIDIZE1")] | |||
public bool? IsSubsidize1 { get; set; } | |||
/// <summary> | |||
/// 是否手动点击免学费 | |||
/// </summary> | |||
[Column("ISMANUALSUBSIDIZE")] | |||
public bool? IsManualSubsidize { get; set; } | |||
/// <summary> | |||
/// 是否资助 | |||
/// </summary> | |||
[Column("ISSUPPORT")] | |||
public bool? IsSupport { get; set; } | |||
/// <summary> | |||
/// 资助时间 | |||
/// </summary> | |||
[Column("SUPPORTTIME")] | |||
public DateTime? SupportTime { get; set; } | |||
/// <summary> | |||
/// 确认资助操作人 | |||
/// </summary> | |||
[Column("SUPPORTUSERID")] | |||
public string SupportUserId { get; set; } | |||
/// <summary> | |||
/// 确认资助操作人 | |||
/// </summary> | |||
[Column("SUPPORTUSERNAME")] | |||
public string SupportUserName { get; set; } | |||
/// <summary> | |||
/// 资助等级 | |||
/// </summary> | |||
@@ -310,6 +331,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("SUPPORTTYPE")] | |||
public string SupportType { get; set; } | |||
/// <summary> | |||
/// 资助种类 | |||
/// </summary> | |||
[Column("SUPPORTTYPE1")] | |||
public string SupportType1 { get; set; } | |||
/// <summary> | |||
/// 符合资助条件 | |||
/// </summary> | |||
[Column("SUPPORTCONDITION")] | |||
@@ -321,37 +347,55 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
public string SupportRemarks { get; set; } | |||
/// <summary> | |||
/// 资助变更--是否变更 | |||
/// 学费变更--是否变更 | |||
/// </summary> | |||
[Column("ISSUPPORTCHANGE")] | |||
public bool? IsSupportChange { get; set; } | |||
/// <summary> | |||
/// 资助变更--开户行 | |||
/// 学费变更--开户行 | |||
/// </summary> | |||
[Column("SUPPORTBANK")] | |||
public string SupportBank { get; set; } | |||
/// <summary> | |||
/// 学费变更--变更时间 | |||
/// </summary> | |||
[Column("SUPPORTCHANGETIME")] | |||
public DateTime? SupportChangeTime { get; set; } | |||
/// <summary> | |||
/// 学费变更--操作人 | |||
/// </summary> | |||
[Column("SUPPORTCHANGEUSERID")] | |||
public string SupportChangeUserId { get; set; } | |||
/// <summary> | |||
/// 学费变更--操作人 | |||
/// </summary> | |||
[Column("SUPPORTCHANGEUSERNAME")] | |||
public string SupportChangeUserName { get; set; } | |||
/// <summary> | |||
/// 资助变更--银行卡号 | |||
/// 学费变更--银行卡号 | |||
/// </summary> | |||
[Column("SUPPORTBANKCARD")] | |||
public string SupportBankCard { get; set; } | |||
/// <summary> | |||
/// 资助变更--金额 | |||
/// 学费变更--金额 | |||
/// </summary> | |||
[Column("SUPPORTAMOUNT")] | |||
public decimal? SupportAmount { get; set; } | |||
/// <summary> | |||
/// 资助变更--状态 | |||
/// 学费变更--状态 | |||
/// </summary> | |||
[Column("SUPPORTSTATUS")] | |||
public int? SupportStatus { get; set; } | |||
/// <summary> | |||
/// 资助变更--备注 | |||
/// 学费变更--备注 | |||
/// </summary> | |||
[Column("SUPPORTCHANGEREMARK")] | |||
public string SupportChangeRemark { get; set; } | |||
/// <summary> | |||
/// 资助变更--流程Id | |||
/// 学费变更--流程Id | |||
/// </summary> | |||
[Column("SUPPORTPROCESSID")] | |||
public string SupportProcessId { get; set; } | |||
@@ -99,8 +99,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
t.Grade, | |||
t.THROUGHPROJECT, | |||
t.Status, | |||
t.IsSupport,t.SupportGrade,t.SupportType,t.SupportCondition,t.SupportRemarks, | |||
t.IsSupportChange,t.SupportBank,t.SupportBankCard,t.SupportAmount,t.SupportStatus,t.SupportChangeRemark,t.SupportProcessId | |||
t.IsSupport,t.SupportGrade,t.SupportType,t.SupportType1,t.SupportCondition,t.SupportRemarks, | |||
t.SupportTime,t.SupportUserName, | |||
t.IsSupportChange,t.SupportBank,t.SupportBankCard,t.SupportAmount,t.SupportStatus,t.SupportChangeRemark,t.SupportProcessId,t.IsManualSubsidize, | |||
t.SupportChangeTime,t.SupportChangeUserName | |||
"); | |||
strSql.Append(" FROM StuEnroll t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
@@ -1266,13 +1268,16 @@ t.IsSupportChange,t.SupportBank,t.SupportBankCard,t.SupportAmount,t.SupportStatu | |||
var result = ""; | |||
if (!string.IsNullOrEmpty(stuId)) | |||
{ | |||
var data = JsonConvert.DeserializeObject<List<StuEnrollEntity>>(stuId); | |||
if (data.Any()) | |||
{ | |||
foreach (var item in data) | |||
{ | |||
if (status) | |||
{ | |||
item.IsManualSubsidize = true; | |||
} | |||
if (payAfter) | |||
{ | |||
//if (loginUser.roleIds.Contains(roleid)) | |||
@@ -2574,7 +2579,8 @@ t.IsSupportChange,t.SupportBank,t.SupportBankCard,t.SupportAmount,t.SupportStatu | |||
{ | |||
if (!string.IsNullOrEmpty(stuIds)) | |||
{ | |||
string sql = $"update StuEnroll set IsSupport=1 where StuId in ('{stuIds}')"; | |||
var userinfo = LoginUserInfo.Get(); | |||
string sql = $"update StuEnroll set IsSupport=1,SupportTime=getdate(),SupportUserId='{userinfo.userId}',SupportUserName='{userinfo.realName}' where StuId in ('{stuIds}')"; | |||
this.BaseRepository("CollegeMis").ExecuteBySql(sql); | |||
} | |||
} | |||
@@ -2592,7 +2598,7 @@ t.IsSupportChange,t.SupportBank,t.SupportBankCard,t.SupportAmount,t.SupportStatu | |||
} | |||
/// <summary> | |||
/// 新生资助管理--完善资助信息 | |||
/// 新生资助管理--完善学费信息 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="entity"></param> | |||
@@ -2604,6 +2610,7 @@ t.IsSupportChange,t.SupportBank,t.SupportBankCard,t.SupportAmount,t.SupportStatu | |||
{ | |||
string sql = $@"update StuEnroll set SupportGrade='{entity.SupportGrade}', | |||
SupportType='{entity.SupportType}', | |||
SupportType1='{entity.SupportType1}', | |||
SupportCondition='{entity.SupportCondition}', | |||
SupportRemarks='{entity.SupportRemarks}' | |||
where StuId='{keyValue}'"; | |||
@@ -2624,7 +2631,7 @@ where StuId='{keyValue}'"; | |||
} | |||
/// <summary> | |||
/// 新生资助管理--资助变更 | |||
/// 新生资助管理--学费变更 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="entity"></param> | |||
@@ -2634,12 +2641,14 @@ where StuId='{keyValue}'"; | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var userinfo = LoginUserInfo.Get(); | |||
string sql = $@"update StuEnroll set SupportBank='{entity.SupportBank}', | |||
SupportBankCard='{entity.SupportBankCard}', | |||
SupportAmount='{entity.SupportAmount}', | |||
SupportProcessId='{entity.SupportProcessId}', | |||
SupportChangeRemark='{entity.SupportChangeRemark}', | |||
SupportStatus=0,IsSupportChange=1 | |||
SupportStatus=0,IsSupportChange=1, | |||
SupportChangeTime=getdate(),SupportChangeUserId='{userinfo.userId}',SupportChangeUserName='{userinfo.realName}' | |||
where StuId='{keyValue}'"; | |||
this.BaseRepository("CollegeMis").ExecuteBySql(sql); | |||
} | |||