diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs index 7dc28ac73..8fbc5129e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs @@ -207,6 +207,8 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers { return View(); } + + #endregion #region 获取数据 @@ -244,7 +246,27 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers var data = accommodationIBLL.GetBedListByRoomId(RoomId).OrderBy(x => x.DNo); return Success(data); } - + /// + /// 获取分类数据 + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetClassifyList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = accommodationIBLL.GetClassifyList(paginationobj,queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// /// 获取宿舍楼数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js index 0837a154c..402a3152c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js @@ -247,7 +247,7 @@ var bootstrap = function ($, learun) { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { if (keyValue.indexOf(',') != -1) { - learun.alert.warning("只能选择一条记录进行编辑!"); + learun.alert.warning("只能选择一条记录!"); return false; } learun.layerForm({ @@ -264,7 +264,21 @@ var bootstrap = function ($, learun) { }); - + + //分类管理 + $("#lr_Classify").on("click", function () { + learun.layerForm({ + id: 'indexBed', + title: '分类管理', + url: top.$.rootUrl + '/LogisticsManagement/Accommodation/IndexClassify', + width: 1200, + height: 780, + btn:null, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); }, //初始化左侧树 initTree: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index eb5218731..369f542c8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1300,6 +1300,7 @@ + @@ -1311,6 +1312,7 @@ + @@ -7588,6 +7590,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs index 6e64aeadc..fcff22718 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs @@ -402,6 +402,34 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } + public List GetClassifyTree() + { + try + { + List list = accommodationService.GetClassifyTree(); + List treeList = new List(); + foreach (Acc_DormitoryBuildEntity item in list) + { + TreeModel node = new TreeModel + { + id = item.ID.ToString(), + text = item.Name.ToString(), + value = item.ID.ToString(), + showcheck = false, + checkstate = 0, + isexpand = false, + parentId = item.ParentID == null ? "" : item.ParentID, + title =string.IsNullOrEmpty(item.BuildType)?"":(Convert.ToInt32(item.BuildType)+1).ToString() , + + }; + + + treeList.Add(node); + + + } + + public List GetClassifyTree() { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs index 106eadc10..d24c3b099 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs @@ -170,7 +170,7 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName strSql.Append(" AND t.CheckInStu>0 "); } } - + if (!queryParam["SqlParameter"].IsEmpty()) { strSql.Append(queryParam["SqlParameter"].ToString());