From 63eb85a30f0205d0c0a9589474a1fba369c5c9e0 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 25 Jul 2025 08:40:02 +0800 Subject: [PATCH] 1 --- HJGL_DS/BLL/API/APIBaseServices.cs | 2 +- .../BLL/WeldMat/BaseInfo/UnitStoreService.cs | 22 +++++++++++++++++++ .../WeldMat/UsingPlan/UsingPlanEdit.aspx.cs | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/HJGL_DS/BLL/API/APIBaseServices.cs b/HJGL_DS/BLL/API/APIBaseServices.cs index 11e08fc..6fcd840 100644 --- a/HJGL_DS/BLL/API/APIBaseServices.cs +++ b/HJGL_DS/BLL/API/APIBaseServices.cs @@ -360,7 +360,7 @@ namespace BLL.API var q = from x in Funs.DB.Weld_UnitStore join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId orderby y.UnitName, x.UnitStoreCode - select new { x.UnitStoreId, UnitStoreName = (y.UnitName + "(" + x.UnitStoreName + ")"), y.UnitName, x.UnitId }; + select new { x.UnitStoreId, UnitStoreName = x.UnitStoreName, y.UnitName, x.UnitId }; List res = new List(); foreach (var p in q) { diff --git a/HJGL_DS/BLL/WeldMat/BaseInfo/UnitStoreService.cs b/HJGL_DS/BLL/WeldMat/BaseInfo/UnitStoreService.cs index 1dd926f..c74a795 100644 --- a/HJGL_DS/BLL/WeldMat/BaseInfo/UnitStoreService.cs +++ b/HJGL_DS/BLL/WeldMat/BaseInfo/UnitStoreService.cs @@ -114,6 +114,28 @@ namespace BLL } } + public static void InitUnitStoreDropDownList2(FineUIPro.DropDownList dropName, string unitId, bool isShowPlease) + { + var store = from x in Funs.DB.Weld_UnitStore + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + orderby y.UnitName, x.UnitStoreCode + select new { x.UnitStoreId, UnitStoreName = x.UnitStoreName, y.UnitName, x.UnitId }; + if (!string.IsNullOrEmpty(unitId)) + { + store = store.Where(x => x.UnitId == unitId); + } + + dropName.DataValueField = "UnitStoreId"; + dropName.DataTextField = "UnitStoreName"; + dropName.DataGroupField = "UnitName"; + dropName.DataSource = store.ToList(); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + /// /// 根据主键获取单位仓库 /// diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs index 70dc8ef..69d189f 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs @@ -44,7 +44,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan this.drpProjectId.DataBind(); Funs.FineUIPleaseSelect(this.drpProjectId); - BLL.UnitStoreService.InitUnitStoreDropDownList(drpUnitStore, null, true); + BLL.UnitStoreService.InitUnitStoreDropDownList2(drpUnitStore, null, true); this.drpOrderTime.DataTextField = "Text"; this.drpOrderTime.DataValueField = "Value";