From 879e5151888e5ba42bea4c3b2aedcbf178f6cace Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Thu, 23 Apr 2026 10:58:33 +0200 Subject: [PATCH] Aggiornata pagina BuyOrder --- Lux.API/Lux.API.csproj | 2 +- Lux.All.sln | 4 +- .../Compo/Warehouse/BuyOrderDetail.razor | 5 +- .../Compo/Warehouse/BuyOrderDetail.razor.cs | 7 +++ .../Compo/Warehouse/BuyOrderList.razor | 14 ++++- .../Compo/Warehouse/BuyOrderList.razor.cs | 22 +++++++ .../Compo/Warehouse/MatReq2BuyOrder.razor | 25 ++++++++ .../Compo/Warehouse/MatReq2BuyOrder.razor.cs | 19 ++++++ .../Compo/Warehouse/MatReqGroup.razor | 22 +++++-- .../Compo/Warehouse/MatReqList.razor | 10 +++- .../Compo/Warehouse/MatReqList.razor.cs | 59 +++++++++++++++++-- Lux.UI/Components/Pages/BuyOrder.razor | 19 ++---- Lux.UI/Components/Pages/BuyOrder.razor.cs | 5 ++ Lux.UI/Components/Pages/Offers.razor | 29 ++++----- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 18 files changed, 201 insertions(+), 49 deletions(-) create mode 100644 Lux.UI/Components/Compo/Warehouse/MatReq2BuyOrder.razor create mode 100644 Lux.UI/Components/Compo/Warehouse/MatReq2BuyOrder.razor.cs diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 4fc42207..bf579d19 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2604.2210 + 1.1.2604.2310 diff --git a/Lux.All.sln b/Lux.All.sln index f229a8f8..fc7ebde9 100644 --- a/Lux.All.sln +++ b/Lux.All.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 18 -VisualStudioVersion = 18.1.11312.151 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.37216.2 d17.14 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwCoreLib.Lux.Core", "EgwCoreLib.Lux.Core\EgwCoreLib.Lux.Core.csproj", "{CCE87D58-1E6C-47B3-A28C-65BFCF5F1D0C}" EndProject diff --git a/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor b/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor index 77931987..f2e3b0de 100644 --- a/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor +++ b/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor @@ -9,7 +9,7 @@ else
- @CurrRec.BuyOrderCode | @CurrRec.Description + @CurrRec.BuyOrderCode | @CurrRec.BuyOrderRowNav.First().ClassCode | @CurrRec.Inserted @totalCount
@@ -27,7 +27,6 @@ else *@ Gruppo Articolo - @* Ord/Riga *@ Qty @@ -55,7 +54,7 @@ else
@item.OrderRowNav?.OrderRowCode
- *@ + *@ @item.TotQty.ToString("N1") } diff --git a/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor.cs b/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor.cs index 53585fe5..66d9fb50 100644 --- a/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor.cs +++ b/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor.cs @@ -43,6 +43,13 @@ namespace Lux.UI.Components.Compo.Warehouse get => showDetail ? "bi-chevron-down" : "bi-chevron-right"; } + private List OrderStateList + { + get => Enum.GetValues(typeof(Enums.BuyOrderStates)) + .Cast() + .ToList(); + } + #endregion Private Properties #region Private Methods diff --git a/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor b/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor index 4e225d85..0530bd8d 100644 --- a/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor +++ b/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor @@ -5,7 +5,19 @@ Ordini Fornitore
- filtro ??? +
+
+
+ + +
+
+
diff --git a/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor.cs b/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor.cs index eb490d4f..2eb3678a 100644 --- a/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor.cs +++ b/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor.cs @@ -1,4 +1,5 @@ using EgwCoreLib.Lux.Data.DbModel.Supplier; +using Microsoft.IdentityModel.Tokens; namespace Lux.UI.Components.Compo.Warehouse { @@ -33,7 +34,27 @@ namespace Lux.UI.Components.Compo.Warehouse private int totalCount = 0; #endregion Private Fields + private Enums.BuyOrderStates searchVal { get; set; } = Enums.BuyOrderStates.Created; + private Enums.BuyOrderStates SearchVal + { + get => searchVal; + set + { + if (searchVal != value) + { + searchVal = value; + UpdateTable(); + } + } + } + + private List OrderStateList + { + get => Enum.GetValues(typeof(Enums.BuyOrderStates)) + .Cast() + .ToList(); + } #region Private Methods @@ -53,6 +74,7 @@ namespace Lux.UI.Components.Compo.Warehouse { // fix paginazione ListRecords = AllRecords + .Where(x => x.OrderState.Equals(SearchVal)) .OrderBy(x => x.BuyOrderCode) .Skip(numRecord * (currPage - 1)) .Take(numRecord) diff --git a/Lux.UI/Components/Compo/Warehouse/MatReq2BuyOrder.razor b/Lux.UI/Components/Compo/Warehouse/MatReq2BuyOrder.razor new file mode 100644 index 00000000..840406cc --- /dev/null +++ b/Lux.UI/Components/Compo/Warehouse/MatReq2BuyOrder.razor @@ -0,0 +1,25 @@ +
+
+
+
+
+ Generare ordini +
+
+
+
+
+ @foreach (var item in CurrSelDict) + { + if (item.Value.Any()) + { + + } + } +
+
+
+
diff --git a/Lux.UI/Components/Compo/Warehouse/MatReq2BuyOrder.razor.cs b/Lux.UI/Components/Compo/Warehouse/MatReq2BuyOrder.razor.cs new file mode 100644 index 00000000..878e1ea9 --- /dev/null +++ b/Lux.UI/Components/Compo/Warehouse/MatReq2BuyOrder.razor.cs @@ -0,0 +1,19 @@ +using System.Security.Cryptography.Xml; +using static Lux.UI.Components.Compo.Warehouse.MatReqGroup; + +namespace Lux.UI.Components.Compo.Warehouse +{ + public partial class MatReq2BuyOrder + { + [Parameter] + public Dictionary> CurrSelDict { get; set; } = null!; + + [Parameter] + public EventCallback>> EC_CreateBuyOrder { get; set; } + + private Task CreateBuyOrder(KeyValuePair> ReqInfo) + { + return EC_CreateBuyOrder.InvokeAsync(ReqInfo); + } + } +} \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Warehouse/MatReqGroup.razor b/Lux.UI/Components/Compo/Warehouse/MatReqGroup.razor index bfdf6061..30fdf195 100644 --- a/Lux.UI/Components/Compo/Warehouse/MatReqGroup.razor +++ b/Lux.UI/Components/Compo/Warehouse/MatReqGroup.razor @@ -21,12 +21,12 @@ else -
+
- Gruppo - Articolo + @* Gruppo *@ + Articolo Ord/Riga Qty @@ -36,9 +36,21 @@ else { -
+
+ @* *@ + @if (ListSelected.Contains(item.MatReqID)) + { +
+ +
+ } + else + { + + } +
- @item.CodGroup + @* @item.CodGroup *@
@item.ItemCode
diff --git a/Lux.UI/Components/Compo/Warehouse/MatReqList.razor b/Lux.UI/Components/Compo/Warehouse/MatReqList.razor index e066ef78..9f5ef4ab 100644 --- a/Lux.UI/Components/Compo/Warehouse/MatReqList.razor +++ b/Lux.UI/Components/Compo/Warehouse/MatReqList.razor @@ -5,7 +5,15 @@ Fabbisogni Attivi
- filtro ordine/riga +
+
+
+ + + +
+
+
diff --git a/Lux.UI/Components/Compo/Warehouse/MatReqList.razor.cs b/Lux.UI/Components/Compo/Warehouse/MatReqList.razor.cs index 8f7aa226..f888fda8 100644 --- a/Lux.UI/Components/Compo/Warehouse/MatReqList.razor.cs +++ b/Lux.UI/Components/Compo/Warehouse/MatReqList.razor.cs @@ -32,6 +32,25 @@ namespace Lux.UI.Components.Compo.Warehouse #endregion Private Fields + private string searchVal { get; set; } = string.Empty; + + private string SearchVal + { + get => searchVal; + set + { + if (searchVal != value) + { + searchVal = value; + UpdateDetail(); + } + } + } + private string btnResetCss + { + get => string.IsNullOrEmpty(searchVal) ? "btn-outline-secondary" : "btn-primary"; + } + #region Private Methods private Task ReportUpdate(GrpSelect currData) @@ -39,7 +58,14 @@ namespace Lux.UI.Components.Compo.Warehouse // sistemo il dizionario selezioni if (SelectDict.ContainsKey(currData.GroupName)) { - SelectDict[currData.GroupName] = currData.ListItemIds; + if(currData.ListItemIds.Count > 0) + { + SelectDict[currData.GroupName] = currData.ListItemIds; + } + else + { + SelectDict.Remove(currData.GroupName); + } } else { @@ -50,10 +76,33 @@ namespace Lux.UI.Components.Compo.Warehouse private void UpdateDetail() { - // calcolo dati derivati - GroupDict = AllRecords - .GroupBy(x => x.CodGroup) - .ToDictionary(g => g.Key, g => g.ToList()); + if (string.IsNullOrEmpty(SearchVal)) + { + // calcolo dati derivati + GroupDict = AllRecords + .GroupBy(x => x.CodGroup) + .ToDictionary(g => g.Key, g => g.ToList()); + } + else if(SearchVal.StartsWith("POR")) + { + // calcolo dati derivati + GroupDict = AllRecords + .Where(x => x.OrderRowNav!.OrderRowCode.Equals(SearchVal, StringComparison.InvariantCultureIgnoreCase)) + .GroupBy(x => x.CodGroup) + .ToDictionary(g => g.Key, g => g.ToList()); + } + else if (SearchVal.StartsWith("PO")) + { + // calcolo dati derivati + GroupDict = AllRecords + .Where(x => x.OrderNav!.OrderCode.Equals(SearchVal, StringComparison.InvariantCultureIgnoreCase)) + .GroupBy(x => x.CodGroup) + .ToDictionary(g => g.Key, g => g.ToList()); + } + } + private void ResetSearch() + { + SearchVal = ""; } #endregion Private Methods diff --git a/Lux.UI/Components/Pages/BuyOrder.razor b/Lux.UI/Components/Pages/BuyOrder.razor index 50e2c391..87a4e516 100644 --- a/Lux.UI/Components/Pages/BuyOrder.razor +++ b/Lux.UI/Components/Pages/BuyOrder.razor @@ -16,7 +16,7 @@
-
+
@if (isProcessing) { @@ -26,24 +26,17 @@ }
-
- @if (CurrSelDict.Count > 0) - { - foreach (var item in CurrSelDict) - { - if (item.Value.Any()) - { - - } - } - } + @if (CurrSelDict.Count > 0) + { + + } +
@if (isProcessing) { } else { - }
diff --git a/Lux.UI/Components/Pages/BuyOrder.razor.cs b/Lux.UI/Components/Pages/BuyOrder.razor.cs index 307444be..c777e465 100644 --- a/Lux.UI/Components/Pages/BuyOrder.razor.cs +++ b/Lux.UI/Components/Pages/BuyOrder.razor.cs @@ -74,6 +74,11 @@ namespace Lux.UI.Components.Pages isProcessing = false; } + private string DimensionColCss() + { + return CurrSelDict.Count > 0 ? "col-5" : "col-6"; + } + #endregion Private Methods } } \ No newline at end of file diff --git a/Lux.UI/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor index 47369fe2..aaa3fb91 100644 --- a/Lux.UI/Components/Pages/Offers.razor +++ b/Lux.UI/Components/Pages/Offers.razor @@ -106,28 +106,29 @@ else Offerte
-
-
+
+
@* Stato *@ -
-
- - -
-
- - +
+ +
-
- +
+
+
+ +
+
+ +
-
- +
+
@if (isLoading) { diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 3fb92ed7..d4e71e43 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 1.1.2604.2210 + 1.1.2604.2310 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 84255234..21945449 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 1.1.2604.2214

+

Versione: 1.1.2604.2310


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 4218622b..d0f208bd 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2604.2214 +1.1.2604.2310 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index f50b6fb3..a15f0302 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2604.2214 + 1.1.2604.2310 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false