@@ -1,6 +1,7 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Web.Mvc; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
@@ -15,6 +16,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class StuFellowshipController : MvcControllerBase | |||
{ | |||
private StuFellowshipIBLL stuFellowshipIBLL = new StuFellowshipBLL(); | |||
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | |||
#region 视图功能 | |||
@@ -25,7 +27,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -34,7 +36,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
var logUser = LoginUserInfo.Get(); | |||
var ClassNos = ""; | |||
var Classinfo = classInfoIBLL.GetAllClass().Where(x => x.ClassTutorNo == logUser.account).ToList(); | |||
if (Classinfo.Any()) | |||
{ | |||
foreach (var item in Classinfo) | |||
{ | |||
ClassNos += item.ClassNo + ","; | |||
} | |||
} | |||
ViewBag.ClassNo = ClassNos.TrimEnd(','); | |||
return View(); | |||
} | |||
#endregion | |||
@@ -47,7 +60,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetList( string queryJson ) | |||
public ActionResult GetList(string queryJson) | |||
{ | |||
var data = stuFellowshipIBLL.GetList(queryJson); | |||
return Success(data); | |||
@@ -82,8 +95,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var data = stuFellowshipIBLL.GetEntity(keyValue); | |||
return Success(data); | |||
//var data = stuFellowshipIBLL.GetEntity(keyValue); | |||
//return Success(data); | |||
var stuFellowshipData = stuFellowshipIBLL.GetEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
StuFellowship = stuFellowshipData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
@@ -110,8 +129,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue,StuFellowshipEntity entity) | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
StuFellowshipEntity entity = strEntity.ToObject<StuFellowshipEntity>(); | |||
stuFellowshipIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
@@ -2,90 +2,78 @@ | |||
ViewBag.Title = "定制功能助学金"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<script type="text/javascript"> | |||
var classs = "@ViewBag.ClassNo"; | |||
</script> | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuFellowship"> | |||
<div class="lr-form-item-title">学号<font face="宋体">*</font></div> | |||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DeptNo" type="text" class="form-control" style="display:none" /> | |||
<input id="MajorNo" type="text" class="form-control" style="display:none" /> | |||
<input id="ClassNo" type="text" class="form-control" style="display:none" /> | |||
<input id="OpenBank" type="text" class="form-control" style="display:none" /> | |||
<input id="OpenAccount" type="text" class="form-control" style="display:none" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div> | |||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<div class="col-xs-6 lr-form-item" data-table="StuFellowship"> | |||
<div class="lr-form-item-title">姓名<font face="宋体" >*</font></div> | |||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
@*<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">系部<font face="宋体">*</font></div> | |||
<input id="DeptNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||
<input id="MajorNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||
<input id="ClassNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">证件类型<font face="宋体">*</font></div> | |||
<input id="IdCardType" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | |||
<input id="IdentityCardNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">开户银行<font face="宋体">*</font></div> | |||
<input id="OpenBank" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<div class="lr-form-item-title" data-table="StuFellowship">证件类型<font face="宋体">*</font></div> | |||
<div id="IdCardType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">开户卡账号<font face="宋体">*</font></div> | |||
<input id="OpenAccount" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<div class="lr-form-item-title" data-table="StuFellowship">身份证号<font face="宋体">*</font></div> | |||
<input id="IdentityCardNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">开户行号<font face="宋体">*</font></div> | |||
<div class="lr-form-item-title" data-table="StuFellowship">开户行号<font face="宋体">*</font></div> | |||
<input id="OpenBankNo" type="text" class="form-control" readonly value="20230307230" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">资助等级<font face="宋体">*</font></div> | |||
<div id="SubsidizeType"></div> | |||
<div class="lr-form-item-title" data-table="StuFellowship">资助等级<font face="宋体">*</font></div> | |||
<div id="SubsidizeType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">资助标准<font face="宋体">*</font></div> | |||
<input id="FunderNationStandard" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title" data-table="StuFellowship">资助标准<font face="宋体">*</font></div> | |||
<input id="FunderNationStandard" type="text" class="form-control" readonly/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">应发金额<font face="宋体">*</font></div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title" data-table="StuFellowship">应发金额<font face="宋体">*</font></div> | |||
<input id="AmountPayable" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">实发金额<font face="宋体">*</font></div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title" data-table="StuFellowship">实发金额<font face="宋体">*</font></div> | |||
<input id="FinalPayingAmount" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">申请日期<font face="宋体">*</font></div> | |||
<input id="CreateDate" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<div class="lr-form-item-title" data-table="StuFellowship">申请日期<font face="宋体">*</font></div> | |||
<input id="CreateDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#Birthday').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">发放日期<font face="宋体">*</font></div> | |||
<div class="lr-form-item-title" data-table="StuFellowship">发放日期<font face="宋体">*</font></div> | |||
<input id="ReleaseDate" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">申请理由<font face="宋体">*</font></div> | |||
<input id="ApplyReason" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title" data-table="StuFellowship">申请理由<font face="宋体">*</font></div> | |||
<textarea id="ApplyReason" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">Remark<font face="宋体">*</font></div> | |||
<input id="Remark" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">Files<font face="宋体">*</font></div> | |||
<input id="Files" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title"> 0 草稿 2 二级学院 3 学工部 4 归档<font face="宋体">*</font></div> | |||
<input id="State" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">助学金类型<font face="宋体">*</font></div> | |||
<input id="Types" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title" data-table="StuFellowship">备注</div> | |||
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuFellowship/Form.js") |
@@ -8,16 +8,198 @@ var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var selectedRow = learun.frameTab.currentIframe().selectedRow; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.initData(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#IdCardType').lrDataItemSelect({ code: 'IdCardType' }); | |||
$('#IdCardType').lrselectSet("01"); | |||
if (classs != "" && classs != undefined && classs != null) { | |||
$('#StuNo').lrGirdSelect({ | |||
// 字段 | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||
param: { strWhere: " 1=1 and classno in (" + classs + ") order by deptno,majorno,classno,grade desc" }, | |||
selectWord: 'stuno', | |||
value: 'stuno', | |||
text: 'stuno', | |||
headData: [ | |||
{ label: "学号", name: "stuno", width: 100, align: "left" }, | |||
{ label: "姓名", name: "stuname", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "genderno", width: 80, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ label: "身份证号", name: "identitycardno", width: 100, align: "left" }, | |||
{ | |||
label: "系所", name: "deptno", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "majorno", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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: "grade", width: 100, align: "left" } | |||
], | |||
select: function (item) { | |||
$("#StuNo").val(item.stuno); | |||
$("#StuName").val(item.stuname); | |||
$("#IdentityCardNo").val(item.identitycardno); | |||
$("#DeptNo").val(item.deptno); | |||
$("#MajorNo").val(item.majorno); | |||
$("#ClassNo").val(item.classno); | |||
$("#OpenBank").val(item.depositbank); | |||
$("#OpenAccount").val(item.bankcard); | |||
//绑定值到下拉框 1 | |||
//$("#DeptNo").lrselectSet(item.deptno); | |||
//$("#MajorNo").lrselectSet(item.majorno); | |||
//$('#ClassNo').lrselectSet(item.bankcard); | |||
//$('#DepositBank').lrselectSet(item.depositbank); | |||
} | |||
}); | |||
} else { | |||
$('#StuNo').lrGirdSelect({ | |||
// 字段 | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||
param: { strWhere: " 1=1 " }, | |||
selectWord: 'stuno', | |||
value: 'stuno', | |||
text: 'stuno', | |||
headData: [ | |||
{ label: "学号", name: "stuno", width: 100, align: "left" }, | |||
{ label: "姓名", name: "stuname", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "genderno", width: 80, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ label: "身份证号", name: "identitycardno", width: 100, align: "left" }, | |||
{ | |||
label: "系所", name: "deptno", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "majorno", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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: "grade", width: 100, align: "left" } | |||
], | |||
select: function (item) { | |||
$("#StuNo").val(item.stuno); | |||
$("#StuName").val(item.stuname); | |||
$("#IdentityCardNo").val(item.identitycardno); | |||
$("#DeptNo").val(item.deptno); | |||
$("#MajorNo").val(item.majorno); | |||
$("#ClassNo").val(item.classno); | |||
$("#OpenBank").val(item.depositbank); | |||
$("#OpenAccount").val(item.bankcard); | |||
//绑定值到下拉框 1 | |||
//$("#DeptNo").lrselectSet(item.deptno); | |||
//$("#MajorNo").lrselectSet(item.majorno); | |||
//$('#ClassNo').lrselectSet(item.bankcard); | |||
//$('#DepositBank').lrselectSet(item.depositbank); | |||
} | |||
}); | |||
} | |||
$('#SubsidizeType').lrDataItemSelect({ | |||
code: 'StateStipend', | |||
select: function (item) { | |||
if (item != null && item != undefined) { | |||
$("#FunderNationStandard").val(item.id); | |||
$("#FinalPayingAmount").val(item.id); | |||
$("#AmountPayable").val(item.id); | |||
} | |||
} | |||
}); | |||
//绑定值到下拉框 2 | |||
//$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
//$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
//$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
}, | |||
initData: function () { | |||
if (!!selectedRow) { | |||
$('#form').lrSetFormData(selectedRow); | |||
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]); | |||
console.log(1) | |||
} | |||
else { | |||
console.log(2) | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
@@ -26,8 +208,13 @@ var bootstrap = function ($, learun) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
var postData = $('body').lrGetFormData(); | |||
postData.State = 1; | |||
postData.Types = 1; | |||
var postDatas = { | |||
strEntity: JSON.stringify(postData) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/SaveForm?keyValue=' + keyValue, postDatas, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
@@ -1,24 +1,61 @@ | |||
@{ | |||
ViewBag.Title = "定制功能助学金"; | |||
ViewBag.Title = "助学金管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title">树形目录</div> | |||
<div id="tree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title">标题</div> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle"> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学号</div> | |||
<input id="StuNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">发放日期</div> | |||
<input id="ReleaseDate" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">身份证号</div> | |||
<input id="IdentityCardNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">资助等级</div> | |||
<div id="SubsidizeType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">开户行</div> | |||
<div id="OpenBank"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">开户行账户</div> | |||
<input id="OpenAccount" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
<div id="datesearch"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
@@ -26,8 +63,8 @@ | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
@@ -4,34 +4,65 @@ | |||
* 日 期:2023-03-13 10:37 | |||
* 描 述:定制功能助学金 | |||
*/ | |||
var selectedRow; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var logbegin = ''; | |||
var logend = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 查询 | |||
$('#btn_Search').on('click', function () { | |||
var keyword = $('#txt_Keyword').val(); | |||
page.search({ keyword: keyword }); | |||
$('#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, | |||
// 默认 | |||
selectfn: function (begin, end) { | |||
logbegin = begin; | |||
logend = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 400, 400); | |||
//下拉框绑定 | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#OpenBank').lrDataItemSelect({ code: 'DepositBank' }); | |||
$('#SubsidizeType').lrDataItemSelect({ code: 'StateStipend' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
selectedRow = null; | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/Form', | |||
width: 700, | |||
height: 400, | |||
width: 800, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
@@ -40,14 +71,13 @@ var bootstrap = function ($, learun) { | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/Form?keyValue=' + keyValue, | |||
width: 700, | |||
height: 400, | |||
width: 800, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
@@ -60,7 +90,8 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/DeleteForm', { keyValue: keyValue}, function () { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
@@ -71,36 +102,125 @@ var bootstrap = function ($, learun) { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/GetPageList', | |||
headData: [ | |||
{ label: 'ID', name: 'ID', width: 200, align: "left" }, | |||
{ label: '学号', name: 'StuNo', width: 200, align: "left" }, | |||
{ label: '姓名', name: 'StuName', width: 200, align: "left" }, | |||
{ label: '系部', name: 'DeptNo', width: 200, align: "left" }, | |||
{ label: '专业', name: 'MajorNo', width: 200, align: "left" }, | |||
{ label: '班级', name: 'ClassNo', width: 200, align: "left" }, | |||
{ label: '证件类型 默认身份证', name: 'IdCardType', width: 200, align: "left" }, | |||
{ label: '身份证号', name: 'IdentityCardNo', width: 200, align: "left" }, | |||
{ label: '开户银行', name: 'OpenBank', width: 200, align: "left" }, | |||
{ label: '开户卡账号', name: 'OpenAccount', width: 200, align: "left" }, | |||
{ label: '开户行号', name: 'OpenBankNo', width: 200, align: "left" }, | |||
{ label: '资助等级', name: 'SubsidizeType', width: 200, align: "left" }, | |||
{ label: 'FunderNationStandard', name: 'FunderNationStandard', width: 200, align: "left" }, | |||
{ label: 'AmountPayable', name: 'AmountPayable', width: 200, align: "left" }, | |||
{ label: '实发金额', name: 'FinalPayingAmount', width: 200, align: "left" }, | |||
{ label: '创建时间', name: 'CreateDate', width: 200, align: "left" }, | |||
{ label: '发放日期', name: 'ReleaseDate', width: 200, align: "left" }, | |||
{ label: '申请理由', name: 'ApplyReason', width: 200, align: "left" }, | |||
{ label: 'Remark', name: 'Remark', width: 200, align: "left" }, | |||
{ label: 'Files', name: 'Files', width: 200, align: "left" }, | |||
{ label: ' 0 草稿 2 二级学院 3 学工部 4 归档', name: 'State', width: 200, align: "left" }, | |||
{ label: '助学金类型', name: 'Types', width: 200, align: "left" }, | |||
{ label: '学号', name: 'StuNo', width: 120, align: "left" }, | |||
{ label: '姓名', name: 'StuName', width: 150, align: "left" }, | |||
{ | |||
label: "系所", name: "DeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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: '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: '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: 'CreateDate', width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||
} | |||
}, | |||
{ label: '发放日期', name: 'ReleaseDate', width: 200, align: "left" }, | |||
{ label: '申请理由', name: 'ApplyReason', width: 200, align: "left" }, | |||
{ label: '备注', name: 'Remark', width: 200, align: "left" }, | |||
{ | |||
label: '状态', name: 'State', width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 2) { | |||
return "<span class=\"label label-success\">二级学院</span>"; | |||
} else if (cellvalue == 3) { | |||
return "<span class=\"label label-danger\">学工部</span>"; | |||
} else if (cellvalue == 2) { | |||
return "<span class=\"label label-warning\">归档</span>"; | |||
} else if (cellvalue == 1) { | |||
return "<span class=\"label label-default\">草稿</span>"; | |||
} | |||
} | |||
}, | |||
], | |||
mainId:'ID', | |||
isPage: true | |||
mainId: 'ID', | |||
isPage: true, | |||
sidx: 'CreateDate', | |||
sord: 'ASC' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParam = " and Types = 1" | |||
param.StartTime = logbegin; | |||
param.EndTime = logend; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -87,7 +87,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("SUBSIDIZETYPE")] | |||
public string SubsidizeType { get; set; } | |||
/// <summary> | |||
/// FunderNationStandard | |||
/// 资助金额 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("FUNDERNATIONSTANDARD")] | |||
@@ -141,7 +141,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("FILES")] | |||
public string Files { get; set; } | |||
/// <summary> | |||
/// 0 草稿 2 二级学院 3 学工部 4 归档 | |||
/// 1 草稿 2 二级学院 3 学工部 4 归档 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("STATE")] | |||
@@ -17,40 +17,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
public class StuFellowshipService : RepositoryFactory | |||
{ | |||
#region 构造函数和属性 | |||
private string fieldSql; | |||
/// <summary> | |||
/// 构造方法 | |||
/// </summary> | |||
public StuFellowshipService() | |||
{ | |||
fieldSql=@" | |||
t.ID, | |||
t.StuNo, | |||
t.StuName, | |||
t.DeptNo, | |||
t.MajorNo, | |||
t.ClassNo, | |||
t.IdCardType, | |||
t.IdentityCardNo, | |||
t.OpenBank, | |||
t.OpenAccount, | |||
t.OpenBankNo, | |||
t.SubsidizeType, | |||
t.FunderNationStandard, | |||
t.AmountPayable, | |||
t.FinalPayingAmount, | |||
t.CreateDate, | |||
t.ReleaseDate, | |||
t.ApplyReason, | |||
t.Remark, | |||
t.Files, | |||
t.State, | |||
t.Types | |||
"; | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -59,7 +25,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
/// <param name="queryJson">条件参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<StuFellowshipEntity> GetList( string queryJson ) | |||
public IEnumerable<StuFellowshipEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
@@ -69,10 +35,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
//var dp = new DynamicParameters(new { }); | |||
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(fieldSql); | |||
strSql.Append("SELECT t.*"); | |||
strSql.Append(" FROM StuFellowship t "); | |||
return this.BaseRepository("CollegeMIS").FindList<StuFellowshipEntity>(strSql.ToString()); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMIS").FindList<StuFellowshipEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -98,10 +66,79 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(fieldSql); | |||
strSql.Append("SELECT t.*"); | |||
strSql.Append(" FROM StuFellowship t "); | |||
return this.BaseRepository("CollegeMIS").FindList<StuFellowshipEntity>(strSql.ToString(), pagination); | |||
strSql.Append(" where 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["SqlParam"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParam"].ToString()); | |||
} | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", "%"+queryParam["StuNo"].ToString()+ "%", DbType.String); | |||
strSql.Append(" AND t.StuNo Like @StuNo "); | |||
} | |||
if (!queryParam["IdentityCardNo"].IsEmpty()) | |||
{ | |||
dp.Add("IdentityCardNo", "%" + queryParam["IdentityCardNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.IdentityCardNo like @IdentityCardNo "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo=@DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo=@MajorNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ClassNo=@ClassNo "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
{ | |||
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Grade=@Grade "); | |||
} | |||
if (!queryParam["SubsidizeType"].IsEmpty()) | |||
{ | |||
dp.Add("SubsidizeType", "" + queryParam["SubsidizeType"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.SubsidizeType=@SubsidizeType "); | |||
} | |||
if (!queryParam["OpenAccount"].IsEmpty()) | |||
{ | |||
dp.Add("OpenAccount", "" + queryParam["OpenAccount"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.OpenAccount=@OpenAccount "); | |||
} | |||
if (!queryParam["OpenBank"].IsEmpty()) | |||
{ | |||
dp.Add("OpenBank", "" + queryParam["OpenBank"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.OpenBank=@OpenBank "); | |||
} | |||
if (!queryParam["ReleaseDate"].IsEmpty()) | |||
{ | |||
dp.Add("ReleaseDate", "%" + queryParam["ReleaseDate"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ReleaseDate Like @ReleaseDate "); | |||
} | |||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
strSql.Append(" AND ( CreateDate >= @startTime AND CreateDate <= @endTime ) "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<StuFellowshipEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -152,7 +189,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<StuFellowshipEntity>(t=>t.ID == keyValue); | |||
this.BaseRepository("CollegeMIS").Delete<StuFellowshipEntity>(t => t.ID == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||