@@ -99,6 +99,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetList(string queryJson) | |||||
{ | |||||
var data = scholarshipIBLL.GetList(queryJson); | |||||
return Success(data); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -15,7 +15,12 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#SchoolType').lrDataSourceSelect({ code: 'Isjxj',value: 'id',text: 'itemname' }); | |||||
$('#SchoolType').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 0, IsValid: 0 }), | |||||
value: "Id", | |||||
text: "ItemName" | |||||
}); | |||||
$('#LrPeople')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | $('#LrPeople')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | ||||
$('#LrPeople').val(learun.clientdata.get(['userinfo']).realName); | $('#LrPeople').val(learun.clientdata.get(['userinfo']).realName); | ||||
$('#LrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd')); | $('#LrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd')); | ||||
@@ -21,7 +21,12 @@ var bootstrap = function ($, learun) { | |||||
value: "value" | value: "value" | ||||
}) | }) | ||||
$('#AttachmentName').lrUploader(); | $('#AttachmentName').lrUploader(); | ||||
$('#SchoolType').lrDataSourceSelect({ code: 'Iszxj',value: 'id',text: 'itemname' }); | |||||
$('#SchoolType').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }), | |||||
value: "Id", | |||||
text: "ItemName" | |||||
}); | |||||
$('#StuName').lrGirdSelect({ | $('#StuName').lrGirdSelect({ | ||||
// 字段 | // 字段 | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | ||||
@@ -16,11 +16,16 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#State').lrselect({ | $('#State').lrselect({ | ||||
data: [{ text: "待审核", value: "0" }, { text: "同意", value: "1" },{ text: "不同意", value: "2" }], | |||||
data: [{ text: "待审核", value: "0" }, { text: "审核通过", value: "1" }, { text: "不通过", value: "2" }], | |||||
text: "text", | text: "text", | ||||
value: "value" | value: "value" | ||||
}) | }) | ||||
$('#SchoolType').lrDataSourceSelect({ code: 'Iszxj',value: 'id',text: 'itemname' }); | |||||
$('#SchoolType').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }), | |||||
value: "Id", | |||||
text: "ItemName" | |||||
}); | |||||
$('#LrPeople')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | $('#LrPeople')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | ||||
$('#LrPeople').val(learun.clientdata.get(['userinfo']).realName); | $('#LrPeople').val(learun.clientdata.get(['userinfo']).realName); | ||||
$('#LrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd')); | $('#LrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd')); | ||||
@@ -20,8 +20,12 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#SchoolType').lrDataSourceSelect({ code: 'Isjxj',value: 'id',text: 'itemname' }); | |||||
$('#SchoolType').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 0, IsValid: 0 }), | |||||
value: "Id", | |||||
text: "ItemName" | |||||
}); | |||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
learun.layerForm({ | learun.layerForm({ | ||||
@@ -118,11 +122,11 @@ var bootstrap = function ($, learun) { | |||||
label: "奖学金类型", name: "SchoolType", width: 200, align: "left", | label: "奖学金类型", name: "SchoolType", width: 200, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Isjxj', | |||||
url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 0, IsValid: 0 }), | |||||
key: value, | key: value, | ||||
keyId: 'id', | |||||
keyId: 'Id', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data['itemname']); | |||||
callback(_data['ItemName']); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -20,9 +20,14 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#SchoolType').lrDataSourceSelect({ code: 'Iszxj', value: 'id', text: 'itemname' }); | |||||
$('#SchoolType').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }), | |||||
value: "Id", | |||||
text: "ItemName" | |||||
}); | |||||
$('#State').lrselect({ | $('#State').lrselect({ | ||||
data: [{ text: "待审核", value: "0" }, { text: "同意", value: "1" }, { text: "不同意", value: "2" }], | |||||
data: [{ text: "待审核", value: "0" }, { text: "审核通过", value: "1" }, { text: "不通过", value: "2" }], | |||||
text: "text", | text: "text", | ||||
value: "value" | value: "value" | ||||
}) | }) | ||||
@@ -83,11 +88,11 @@ var bootstrap = function ($, learun) { | |||||
label: "助学金类型", name: "SchoolType", width: 200, align: "left", | label: "助学金类型", name: "SchoolType", width: 200, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Iszxj', | |||||
url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }), | |||||
key: value, | key: value, | ||||
keyId: 'id', | |||||
keyId: 'Id', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data['itemname']); | |||||
callback(_data['ItemName']); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -20,9 +20,14 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#SchoolType').lrDataSourceSelect({ code: 'Iszxj',value: 'id',text: 'itemname' }); | |||||
$('#SchoolType').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid :0}), | |||||
value: "Id", | |||||
text: "ItemName" | |||||
}); | |||||
$('#State').lrselect({ | $('#State').lrselect({ | ||||
data: [{ text: "待审核", value: "0" }, { text: "同意", value: "1" }, { text: "不同意", value: "2" }], | |||||
data: [{ text: "待审核", value: "0" }, { text: "审核通过", value: "1" }, { text: "不通过", value: "2" }], | |||||
text: "text", | text: "text", | ||||
value: "value" | value: "value" | ||||
}) | }) | ||||
@@ -132,11 +137,11 @@ var bootstrap = function ($, learun) { | |||||
label: "助学金类型", name: "SchoolType", width: 200, align: "left", | label: "助学金类型", name: "SchoolType", width: 200, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Iszxj', | |||||
url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }), | |||||
key: value, | key: value, | ||||
keyId: 'id', | |||||
keyId: 'Id', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data['itemname']); | |||||
callback(_data['ItemName']); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -67,6 +67,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ScholarshipEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return scholarshipService.GetList(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -35,6 +35,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <returns></returns> | /// <returns></returns> | ||||
ScholarshipEntity NameOrCode(string ItemName, string ItemCode, int? IsType); | ScholarshipEntity NameOrCode(string ItemName, string ItemCode, int? IsType); | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<ScholarshipEntity> GetList(string queryJson); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -101,6 +101,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ScholarshipEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" * "); | |||||
strSql.Append(" FROM Scholarship t "); | |||||
strSql.Append(" WHERE 1=1 and IsDel ='0' "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["IsValid"].IsEmpty()) | |||||
{ | |||||
dp.Add("IsValid", queryParam["IsValid"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsValid = @IsValid "); | |||||
} | |||||
if (!queryParam["IsType"].IsEmpty()) | |||||
{ | |||||
dp.Add("IsType", queryParam["IsType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsType = @IsType "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<ScholarshipEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||