Pagina BuyOrder: elenco Fabbisogni suddivisi per gruppo
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>1.1.2604.2112</Version>
|
||||
<Version>1.1.2604.2114</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,35 +6,46 @@
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-start">Gruppo</th>
|
||||
<th class="text-start">Articolo</th>
|
||||
<th>Ord</th>
|
||||
<th>Riga</th>
|
||||
<th>Qty</th>
|
||||
<th class="text-start" style="width: 20%">Gruppo</th>
|
||||
<th class="text-start" style="width: 35%">Articolo</th>
|
||||
<th class="text-start" style="width: 20%">Ord</th>
|
||||
<th class="text-start" style="width: 20%">Riga</th>
|
||||
<th class="text-end" style="width: 5%">Qty</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in ListRecords)
|
||||
@foreach (var gruppo in AllRecordsByGroup)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.CodGroup</td>
|
||||
<td>
|
||||
<div>@item.ItemCode</div>
|
||||
<div class="small">
|
||||
@if (item.ItemNav != null)
|
||||
{
|
||||
<span>@item.ItemNav.Description</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@item.ItemCode</span>
|
||||
}
|
||||
</div>
|
||||
@* Riga Intestazione Gruppo *@
|
||||
<tr @onclick="() => ToggleGruppo(gruppo.Key)" style="cursor: pointer;" class="table-primary">
|
||||
<td colspan="5">
|
||||
<i class="bi @(GruppiEspansi.Contains(gruppo.Key) ? "bi-chevron-down" : "bi-chevron-right")"></i>
|
||||
<strong>@gruppo.Key</strong>
|
||||
<span class="badge rounded-pill bg-dark ms-2">@gruppo.Count()</span>
|
||||
</td>
|
||||
<td>@item.OrderNav?.OrderCode</td>
|
||||
<td>@item.OrderRowNav?.OrderRowCode</td>
|
||||
<td>@item.TotQty.ToString("N1")</td>
|
||||
</tr>
|
||||
|
||||
if (GruppiEspansi.Contains(gruppo.Key))
|
||||
{
|
||||
foreach (var item in gruppo)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.CodGroup</td>
|
||||
<td>
|
||||
<div>@item.ItemCode</div>
|
||||
<div class="small">
|
||||
@if (item.ItemNav != null)
|
||||
{
|
||||
<span>@item.ItemNav.Description</span>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
<td>@item.OrderNav?.OrderCode</td>
|
||||
<td>@item.OrderRowNav?.OrderRowCode</td>
|
||||
<td class="text-end">@item.TotQty.ToString("N1")</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using EgwCoreLib.Lux.Data.DbModel.Warehouse;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Lux.UI.Components.Compo.Warehouse
|
||||
{
|
||||
@@ -17,6 +20,9 @@ namespace Lux.UI.Components.Compo.Warehouse
|
||||
|
||||
#region Private Fields
|
||||
|
||||
// Memorizza i nomi dei gruppi attualmente visibili
|
||||
private List<string> GruppiEspansi = new List<string>();
|
||||
|
||||
private List<MatReqModel> AllRecords = new List<MatReqModel>();
|
||||
|
||||
private int currPage = 1;
|
||||
@@ -36,10 +42,26 @@ namespace Lux.UI.Components.Compo.Warehouse
|
||||
[Inject]
|
||||
private IMatReqService MRService { get; set; } = null!;
|
||||
|
||||
// Questa proprietà restituirà i dati raggruppati
|
||||
private IEnumerable<IGrouping<string, MatReqModel>> AllRecordsByGroup =>
|
||||
AllRecords.GroupBy(x => x.CodGroup);
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void ToggleGruppo(string nomeGruppo)
|
||||
{
|
||||
if (GruppiEspansi.Contains(nomeGruppo))
|
||||
{
|
||||
GruppiEspansi.Remove(nomeGruppo);
|
||||
}
|
||||
else
|
||||
{
|
||||
GruppiEspansi.Add(nomeGruppo);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ReloadDataAsync()
|
||||
{
|
||||
AllRecords = await MRService.GetUnprocAsync();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
|
||||
<Version>1.1.2604.2112</Version>
|
||||
<Version>1.1.2604.2114</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>LUX - Web Windows MES</i>
|
||||
<h4>Versione: 1.1.2604.2112</h4>
|
||||
<h4>Versione: 1.1.2604.2114</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2604.2112
|
||||
1.1.2604.2114
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2604.2112</version>
|
||||
<version>1.1.2604.2114</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user