Aggiornata pagina BuyOrder
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>1.1.2604.2210</Version>
|
||||
<Version>1.1.2604.2310</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
@@ -9,7 +9,7 @@ else
|
||||
<div class="d-flex" @onclick="() => ToggleGruppo()" style="cursor: pointer;">
|
||||
<div class="px-0">
|
||||
<i class="bi @ToggleIcon"></i>
|
||||
<strong>@CurrRec.BuyOrderCode</strong> | @CurrRec.Description
|
||||
<strong>@CurrRec.BuyOrderCode</strong> | @CurrRec.BuyOrderRowNav.First().ClassCode | @CurrRec.Inserted
|
||||
<span class="badge rounded-pill bg-dark ms-2">@totalCount</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,7 +27,6 @@ else
|
||||
</td> *@
|
||||
<th class="col-2 text-start">Gruppo</th>
|
||||
<th class="col-5 text-start">Articolo</th>
|
||||
@* <th class="col-3 text-start">Ord/Riga</th> *@
|
||||
<th class="col-1 text-end">Qty</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -55,7 +54,7 @@ else
|
||||
<div class="small">
|
||||
@item.OrderRowNav?.OrderRowCode
|
||||
</div>
|
||||
</td> *@
|
||||
</td> *@
|
||||
<td class="text-end">@item.TotQty.ToString("N1")</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
@@ -43,6 +43,13 @@ namespace Lux.UI.Components.Compo.Warehouse
|
||||
get => showDetail ? "bi-chevron-down" : "bi-chevron-right";
|
||||
}
|
||||
|
||||
private List<Enums.BuyOrderStates> OrderStateList
|
||||
{
|
||||
get => Enum.GetValues(typeof(Enums.BuyOrderStates))
|
||||
.Cast<Enums.BuyOrderStates>()
|
||||
.ToList();
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
@@ -5,7 +5,19 @@
|
||||
Ordini Fornitore
|
||||
</div>
|
||||
<div class="px-0">
|
||||
filtro ???
|
||||
<div class="px-0 d-flex justify-content-between">
|
||||
<div class="px-1">
|
||||
<div class="input-group input-group-sm" title="ricerca">
|
||||
<span class="input-group-text"><i class="fas fa-search"></i></span>
|
||||
<select class="form-select" @bind="@SearchVal">
|
||||
@foreach (var item in OrderStateList)
|
||||
{
|
||||
<option value="@item.ToString()">@item.ToString()</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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<Enums.BuyOrderStates> OrderStateList
|
||||
{
|
||||
get => Enum.GetValues(typeof(Enums.BuyOrderStates))
|
||||
.Cast<Enums.BuyOrderStates>()
|
||||
.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)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<div class="col-2">
|
||||
<div class="card shadow">
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-0 fs-5" style="min-height:1.5em;">
|
||||
Generare ordini
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body ">
|
||||
<div class="row gy-2 px-1">
|
||||
@foreach (var item in CurrSelDict)
|
||||
{
|
||||
if (item.Value.Any())
|
||||
{
|
||||
<button class="btn bg-primary bg-gradient bg-opacity-50 w-100 d-flex justify-content-between align-items-center" @onclick="() => CreateBuyOrder(item)">
|
||||
<b class="fs-6">@item.Key</b>
|
||||
<span class="badge rounded-pill bg-dark">@item.Value.Count</span>
|
||||
</button>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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<string, List<int>> CurrSelDict { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<KeyValuePair<string, List<int>>> EC_CreateBuyOrder { get; set; }
|
||||
|
||||
private Task CreateBuyOrder(KeyValuePair<string, List<int>> ReqInfo)
|
||||
{
|
||||
return EC_CreateBuyOrder.InvokeAsync(ReqInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,12 +21,12 @@ else
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="col-1">
|
||||
<div class="form-check form-switch">
|
||||
<div class="d-flex justify-content-center form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" @onclick="ToggleAll" @bind="allSelected">
|
||||
</div>
|
||||
</td>
|
||||
<th class="col-2 text-start">Gruppo</th>
|
||||
<th class="col-5 text-start">Articolo</th>
|
||||
@* <th class="col-2 text-start">Gruppo</th> *@
|
||||
<th class="col-7 text-start">Articolo</th>
|
||||
<th class="col-3 text-start">Ord/Riga</th>
|
||||
<th class="col-1 text-end">Qty</th>
|
||||
</tr>
|
||||
@@ -36,9 +36,21 @@ else
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<div class="" @onclick="() => ToggleUid(item)"><i class="fa-solid fa-circle @IconCheckSel(item)"></i></div>
|
||||
<div class="d-flex justify-content-center" @onclick="() => ToggleUid(item)">
|
||||
@* <i class="fa-solid fa-circle @IconCheckSel(item)"></i> *@
|
||||
@if (ListSelected.Contains(item.MatReqID))
|
||||
{
|
||||
<div class="">
|
||||
<i class="fa-solid fa-square-check text-secondary opacity-50 fa-lg"></i>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa-solid fa-square text-secondary opacity-25"></i>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
<td>@item.CodGroup</td>
|
||||
@* <td>@item.CodGroup</td> *@
|
||||
<td>
|
||||
<div>@item.ItemCode</div>
|
||||
<div class="small">
|
||||
|
||||
@@ -5,7 +5,15 @@
|
||||
Fabbisogni Attivi
|
||||
</div>
|
||||
<div class="px-0">
|
||||
filtro ordine/riga
|
||||
<div class="px-0 d-flex justify-content-between">
|
||||
<div class="px-1">
|
||||
<div class="input-group input-group-sm" title="ricerca">
|
||||
<span class="input-group-text"><i class="fas fa-search"></i></span>
|
||||
<input type="text" class="form-control" placeholder="Num ordine/riga ordine" @bind="@SearchVal">
|
||||
<button class="btn @btnResetCss" @onclick="ResetSearch"><i class="fas fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="@DimensionColCss()">
|
||||
@if (isProcessing)
|
||||
{
|
||||
<LoadingData DisplayMode="LoadingData.SpinMode.BounceLine"></LoadingData>
|
||||
@@ -26,24 +26,17 @@
|
||||
<MatReqList AllRecords="@MatReqAllRecords" EC_Updated="RecordUpdate"></MatReqList>
|
||||
}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
@if (CurrSelDict.Count > 0)
|
||||
{
|
||||
foreach (var item in CurrSelDict)
|
||||
{
|
||||
if (item.Value.Any())
|
||||
{
|
||||
<button class="btn btn-lg btn-primary" @onclick="() => CreateBuyOrder(item)">@item.Key (@item.Value.Count)</button>
|
||||
}
|
||||
}
|
||||
}
|
||||
@if (CurrSelDict.Count > 0)
|
||||
{
|
||||
<MatReq2BuyOrder CurrSelDict="CurrSelDict" EC_CreateBuyOrder="CreateBuyOrder"></MatReq2BuyOrder>
|
||||
}
|
||||
<div class="@DimensionColCss()">
|
||||
@if (isProcessing)
|
||||
{
|
||||
<LoadingData DisplayMode="LoadingData.SpinMode.BounceLine"></LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<BuyOrderList AllRecords="@BuyOrdAllRecords"></BuyOrderList>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -106,28 +106,29 @@ else
|
||||
<b>Offerte</b> <button class="btn btn-success" @onclick="DoAdd"><i class="fa-solid fa-cart-plus"></i> Nuova</button>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
<div class="d-flex">
|
||||
<div class="px-1">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="px-2">
|
||||
<div class="input-group input-group-sm">
|
||||
@* <span class="input-group-text">Stato</span> *@
|
||||
<div class="form-control ">
|
||||
<div class="form-check form-switch align-content-center">
|
||||
<input class="form-check-input" type="checkbox" @bind="@AllStates">
|
||||
<label class="form-check-label">@txtState</label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="ctrl-/" accesskey="/">
|
||||
<button class="btn btn-outline-secondary" type="button"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
<div class="form-check form-switch align-items-center">
|
||||
<input class="form-check-input" type="checkbox" @bind="@AllStates">
|
||||
<label class="form-check-label">@txtState</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-1">
|
||||
<PeriodoSel E_PeriodoSel="SetPeriodo" CurrPeriodo="PeriodoSel"></PeriodoSel>
|
||||
</div>
|
||||
<div class="px-1">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" placeholder="ctrl-/" accesskey="/">
|
||||
<button class="btn btn-outline-secondary" type="button"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-1">
|
||||
<PeriodoSel E_PeriodoSel="SetPeriodo" CurrPeriodo="PeriodoSel"></PeriodoSel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (isLoading)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
|
||||
<Version>1.1.2604.2210</Version>
|
||||
<Version>1.1.2604.2310</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>LUX - Web Windows MES</i>
|
||||
<h4>Versione: 1.1.2604.2214</h4>
|
||||
<h4>Versione: 1.1.2604.2310</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2604.2214
|
||||
1.1.2604.2310
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2604.2214</version>
|
||||
<version>1.1.2604.2310</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