diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs index 6a10a7f9c..01eaf5090 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs @@ -99,6 +99,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = scholarshipIBLL.GetList(queryJson); + + return Success(data); + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.js index 064b42e43..d095baf10 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.js @@ -15,7 +15,12 @@ var bootstrap = function ($, learun) { page.initData(); }, 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').val(learun.clientdata.get(['userinfo']).realName); $('#LrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/FormAudit.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/FormAudit.js index 3916ce03b..003be95c1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/FormAudit.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/FormAudit.js @@ -21,7 +21,12 @@ var bootstrap = function ($, learun) { value: "value" }) $('#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({ // 字段 url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Formzxj.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Formzxj.js index 4881f6b94..e969a3e3e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Formzxj.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Formzxj.js @@ -16,11 +16,16 @@ var bootstrap = function ($, learun) { }, bind: function () { $('#State').lrselect({ - data: [{ text: "待审核", value: "0" }, { text: "同意", value: "1" },{ text: "不同意", value: "2" }], + data: [{ text: "待审核", value: "0" }, { text: "审核通过", value: "1" }, { text: "不通过", value: "2" }], text: "text", 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').val(learun.clientdata.get(['userinfo']).realName); $('#LrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.js index 02f3218ba..ab80190b7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.js @@ -20,8 +20,12 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 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 () { learun.layerForm({ @@ -118,11 +122,11 @@ var bootstrap = function ($, learun) { label: "奖学金类型", name: "SchoolType", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Isjxj', + url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 0, IsValid: 0 }), key: value, - keyId: 'id', + keyId: 'Id', callback: function (_data) { - callback(_data['itemname']); + callback(_data['ItemName']); } }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexAudit.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexAudit.js index a83f8ff55..b76372aea 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexAudit.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexAudit.js @@ -20,9 +20,14 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 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({ - data: [{ text: "待审核", value: "0" }, { text: "同意", value: "1" }, { text: "不同意", value: "2" }], + data: [{ text: "待审核", value: "0" }, { text: "审核通过", value: "1" }, { text: "不通过", value: "2" }], text: "text", value: "value" }) @@ -83,11 +88,11 @@ var bootstrap = function ($, learun) { label: "助学金类型", name: "SchoolType", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Iszxj', + url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }), key: value, - keyId: 'id', + keyId: 'Id', callback: function (_data) { - callback(_data['itemname']); + callback(_data['ItemName']); } }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js index bfbc1353a..0e96d3370 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js @@ -20,9 +20,14 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 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({ - data: [{ text: "待审核", value: "0" }, { text: "同意", value: "1" }, { text: "不同意", value: "2" }], + data: [{ text: "待审核", value: "0" }, { text: "审核通过", value: "1" }, { text: "不通过", value: "2" }], text: "text", value: "value" }) @@ -132,11 +137,11 @@ var bootstrap = function ($, learun) { label: "助学金类型", name: "SchoolType", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Iszxj', + url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }), key: value, - keyId: 'id', + keyId: 'Id', callback: function (_data) { - callback(_data['itemname']); + callback(_data['ItemName']); } }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipBLL.cs index eb30a496d..c7ac51ae9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipBLL.cs @@ -67,6 +67,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return scholarshipService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipIBLL.cs index 3076589b0..cdfc28d52 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipIBLL.cs @@ -35,6 +35,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// ScholarshipEntity NameOrCode(string ItemName, string ItemCode, int? IsType); + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + IEnumerable GetList(string queryJson); #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs index 9f3661c51..773ef9520 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs @@ -101,6 +101,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable 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(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion #region 提交数据