@@ -5,6 +5,9 @@ using System.Web.Mvc; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using Learun.Util.Operat; | using Learun.Util.Operat; | ||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | using Learun.Application.TwoDevelopment.EducationalAdministration; | ||||
using System.Text.Json.Nodes; | |||||
using Newtonsoft.Json; | |||||
using System.Linq; | |||||
namespace Learun.Application.Web.Areas.StuPayManage.Controllers | namespace Learun.Application.Web.Areas.StuPayManage.Controllers | ||||
{ | { | ||||
@@ -28,7 +31,7 @@ namespace Learun.Application.Web.Areas.StuPayManage.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Index() | public ActionResult Index() | ||||
{ | { | ||||
return View(); | |||||
return View(); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 表单页 | /// 表单页 | ||||
@@ -37,7 +40,7 @@ namespace Learun.Application.Web.Areas.StuPayManage.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Form() | public ActionResult Form() | ||||
{ | { | ||||
return View(); | |||||
return View(); | |||||
} | } | ||||
#endregion | #endregion | ||||
@@ -73,7 +76,7 @@ namespace Learun.Application.Web.Areas.StuPayManage.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetFormData(string keyValue) | public ActionResult GetFormData(string keyValue) | ||||
{ | { | ||||
var SP_FeeItemData = sP_FeeItemIBLL.GetSP_FeeItemEntity( keyValue ); | |||||
var SP_FeeItemData = sP_FeeItemIBLL.GetSP_FeeItemEntity(keyValue); | |||||
var jsonData = new { | var jsonData = new { | ||||
SP_FeeItem = SP_FeeItemData, | SP_FeeItem = SP_FeeItemData, | ||||
}; | }; | ||||
@@ -92,13 +95,31 @@ namespace Learun.Application.Web.Areas.StuPayManage.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult DeleteForm(string keyValue) | public ActionResult DeleteForm(string keyValue) | ||||
{ | { | ||||
SP_FeeItemEntity entity =sP_FeeItemIBLL.GetSP_FeeItemEntity(keyValue); | |||||
SP_FeeItemEntity entity = sP_FeeItemIBLL.GetSP_FeeItemEntity(keyValue); | |||||
if (entity == null) throw new System.Exception("主键无效"); | if (entity == null) throw new System.Exception("主键无效"); | ||||
sP_FeeItemIBLL.DeleteEntity(keyValue); | sP_FeeItemIBLL.DeleteEntity(keyValue); | ||||
//return Success("删除成功!"); | //return Success("删除成功!"); | ||||
return Success_SP("删除成功!", "收费项目", OperationType.Delete, entity.F_Id, entity.ToJson()); | return Success_SP("删除成功!", "收费项目", OperationType.Delete, entity.F_Id, entity.ToJson()); | ||||
} | } | ||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForms(string keyValue) { | |||||
var jsonObj = new { | |||||
ids = string.Join(",", keyValue.Split(',').Select(x => $"'{x}'")) | |||||
}; | |||||
string queryJson = JsonConvert.SerializeObject(jsonObj); | |||||
IEnumerable<SP_FeeItemEntity> entitys = sP_FeeItemIBLL.GetList(queryJson); | |||||
if (entitys == null || entitys.Count()==0) throw new System.Exception("查无数据"); | |||||
sP_FeeItemIBLL.DeleteEntity(entitys); | |||||
//return Success("删除成功!"); | |||||
return Success_SP("删除成功!", "收费项目", OperationType.Delete, null, entitys.ToJson()); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// </summary> | /// </summary> | ||||
@@ -7,29 +7,33 @@ | |||||
<div class="lr-form-item-title">收费年度<font face="宋体">*</font></div> | <div class="lr-form-item-title">收费年度<font face="宋体">*</font></div> | ||||
<div id="YearNo"></div> | <div id="YearNo"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem" > | |||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem"> | |||||
<div class="lr-form-item-title">项目代码<font face="宋体">*</font></div> | <div class="lr-form-item-title">项目代码<font face="宋体">*</font></div> | ||||
<input id="ChargeItemCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="ChargeItemCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem" > | |||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem"> | |||||
<div class="lr-form-item-title">项目名称<font face="宋体">*</font></div> | <div class="lr-form-item-title">项目名称<font face="宋体">*</font></div> | ||||
<input id="ChargeItemName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="ChargeItemName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem" > | |||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem"> | |||||
<div class="lr-form-item-title">收费标准<font face="宋体">*</font></div> | <div class="lr-form-item-title">收费标准<font face="宋体">*</font></div> | ||||
<input id="Standard" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | <input id="Standard" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem" > | |||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem"> | |||||
<div class="lr-form-item-title">项目类型<font face="宋体">*</font></div> | <div class="lr-form-item-title">项目类型<font face="宋体">*</font></div> | ||||
<div id="ChargeItemType" isvalid="yes" checkexpession="NotNull" ></div> | |||||
<div id="ChargeItemType" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem" > | |||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | <div class="lr-form-item-title">专业<font face="宋体">*</font></div> | ||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull" ></div> | |||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem" > | |||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem"> | |||||
<div class="lr-form-item-title">备注</div> | <div class="lr-form-item-title">备注</div> | ||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="SP_FeeItem" style="display:none;"> | |||||
<div class="lr-form-item-title">审核状态</div> | |||||
<div id="F_Status"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/StuPayManage/Views/SP_FeeItem/Form.js") | @Html.AppendJsFile("/Areas/StuPayManage/Views/SP_FeeItem/Form.js") |
@@ -25,6 +25,8 @@ var bootstrap = function ($, learun) { | |||||
value: 'value', | value: 'value', | ||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
$('#F_Status').lrDataItemSelect({ code: 'SP_AppStatus' }); | |||||
$('#F_Status').lrselectSet("0"); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -12,6 +12,7 @@ | |||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-6 lr-form-item"> | <div class="col-xs-6 lr-form-item"> | ||||
<div class="lr-form-item-title">收费年度</div> | <div class="lr-form-item-title">收费年度</div> | ||||
<div id="YearNo"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item"> | <div class="col-xs-6 lr-form-item"> | ||||
<div class="lr-form-item-title">项目类型</div> | <div class="lr-form-item-title">项目类型</div> | ||||
@@ -29,6 +30,10 @@ | |||||
<div class="lr-form-item-title">专业</div> | <div class="lr-form-item-title">专业</div> | ||||
<div id="MajorNo"></div> | <div id="MajorNo"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">审核状态</div> | |||||
<div id="F_Status"></div> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -15,9 +15,18 @@ var bootstrap = function ($, learun) { | |||||
bind: function () { | bind: function () { | ||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | |||||
}, 250, 400); | |||||
//收费年度 | |||||
$('#YearNo').lrselect({ | |||||
placeholder: "请选择", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GenerateNearByYear', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#ChargeItemType').lrDataItemSelect({ code: 'ChargeItemType' }); | $('#ChargeItemType').lrDataItemSelect({ code: 'ChargeItemType' }); | ||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||||
$('#F_Status').lrDataItemSelect({ code: 'SP_AppStatus' }); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -57,7 +66,7 @@ var bootstrap = function ($, learun) { | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | learun.layerConfirm('是否确认删除该项!', function (res) { | ||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/StuPayManage/SP_FeeItem/DeleteForm', { keyValue: keyValue}, function () { | |||||
learun.deleteForm(top.$.rootUrl + '/StuPayManage/SP_FeeItem/DeleteForms', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | refreshGirdData(); | ||||
}); | }); | ||||
} | } | ||||
@@ -115,10 +124,24 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
}}, | }}, | ||||
{ label: "收费标准", name: "Standard", width: 100, align: "center"}, | { label: "收费标准", name: "Standard", width: 100, align: "center"}, | ||||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
{ label: "审核状态", name: "F_Status", width: 100, align: "center", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'SP_AppStatus', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
], | ], | ||||
mainId:'F_Id', | mainId:'F_Id', | ||||
isPage: true | |||||
isPage: true, | |||||
isMultiselect: true, | |||||
sord: 'desc', | |||||
sidx: 'F_CreateDate' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
@@ -18,6 +18,25 @@ namespace Learun.Application.TwoDevelopment.StuPayManage | |||||
#region 获取数据 | #region 获取数据 | ||||
public IEnumerable<SP_FeeItemEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return sP_FeeItemService.GetList(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -94,6 +113,25 @@ namespace Learun.Application.TwoDevelopment.StuPayManage | |||||
} | } | ||||
} | } | ||||
public void DeleteEntity(IEnumerable<SP_FeeItemEntity> entities) { | |||||
try | |||||
{ | |||||
sP_FeeItemService.DeleteEntity(entities); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// </summary> | /// </summary> | ||||
@@ -15,6 +15,13 @@ namespace Learun.Application.TwoDevelopment.StuPayManage | |||||
{ | { | ||||
#region 获取数据 | #region 获取数据 | ||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
IEnumerable<SP_FeeItemEntity> GetList(string queryJson); | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -36,6 +43,13 @@ namespace Learun.Application.TwoDevelopment.StuPayManage | |||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
void DeleteEntity(string keyValue); | void DeleteEntity(string keyValue); | ||||
/// <summary> | |||||
/// 批量删除实体数据 | |||||
/// </summary> | |||||
/// <param name="entities">实体数据列表</param> | |||||
void DeleteEntity(IEnumerable<SP_FeeItemEntity> entities); | |||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// </summary> | /// </summary> | ||||
@@ -19,6 +19,43 @@ namespace Learun.Application.TwoDevelopment.StuPayManage | |||||
{ | { | ||||
#region 获取数据 | #region 获取数据 | ||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
public IEnumerable<SP_FeeItemEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append(" SELECT t.*"); | |||||
strSql.Append(" FROM SP_FeeItem t "); | |||||
strSql.Append(" where 1=1 "); | |||||
//参数写法 | |||||
var queryParam=queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp=new DynamicParameters(new {}); | |||||
if (!queryParam["ids"].IsEmpty()) { | |||||
dp.Add("ids", $"{queryParam["ids"].ToString()}", DbType.String); | |||||
strSql.Append(" and t.F_Id in ( @ids ) "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<SP_FeeItemEntity>(strSql.ToString(),dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -32,14 +69,7 @@ namespace Learun.Application.TwoDevelopment.StuPayManage | |||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" | strSql.Append(@" | ||||
t.F_Id, | |||||
t.YearNo, | |||||
t.ChargeItemCode, | |||||
t.ChargeItemName, | |||||
t.MajorNo, | |||||
t.ChargeItemType, | |||||
t.Standard, | |||||
t.Remark | |||||
* | |||||
"); | "); | ||||
strSql.Append(" FROM SP_FeeItem t "); | strSql.Append(" FROM SP_FeeItem t "); | ||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
@@ -137,6 +167,30 @@ namespace Learun.Application.TwoDevelopment.StuPayManage | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 批量删除实体数据 | |||||
/// </summary> | |||||
/// <param name="entities">实体数据列表</param> | |||||
public void DeleteEntity(IEnumerable<SP_FeeItemEntity> entities) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").Delete<IEnumerable<SP_FeeItemEntity>>(entities); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// </summary> | /// </summary> | ||||