diff --git a/MP-TAB-SERV/Components/ScrapKitMan.razor b/MP-TAB-SERV/Components/ScrapKitMan.razor index aa8b9644..b7138a10 100644 --- a/MP-TAB-SERV/Components/ScrapKitMan.razor +++ b/MP-TAB-SERV/Components/ScrapKitMan.razor @@ -6,8 +6,13 @@ - @@ -36,12 +41,32 @@
+
+ @if (item.Qta <= 0) + { + + } + else + { + + } +
@item.Qta
×pz
+
+ @if (item.Qta >= item.QtaMax) + { + + } + else + { + + } +
diff --git a/MP-TAB-SERV/Components/ScrapKitMan.razor.cs b/MP-TAB-SERV/Components/ScrapKitMan.razor.cs index 3d1f352c..6d554b82 100644 --- a/MP-TAB-SERV/Components/ScrapKitMan.razor.cs +++ b/MP-TAB-SERV/Components/ScrapKitMan.razor.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Components; +using Microsoft.JSInterop; using MP.Data.DatabaseModels; using MP.Data.Services; using NLog; @@ -9,6 +10,9 @@ namespace MP_TAB_SERV.Components { #region Public Properties + [Parameter] + public EventCallback E_Updated { get; set; } + [Parameter] public RegistroScartiModel ParentKit { get; set; } = null!; @@ -16,6 +20,9 @@ namespace MP_TAB_SERV.Components #region Protected Properties + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; + protected List ListComplete { get; set; } = new List(); protected List ListPaged { get; set; } = new List(); @@ -27,6 +34,19 @@ namespace MP_TAB_SERV.Components #region Protected Methods + protected async Task DeleteKitSplit() + { + if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler eliminare il dettaglio del KIT scartato?")) + return; + + if (ParentKit != null) + { + await TabDServ.RegScartiKitDelete(ParentKit); + await ReloadData(); + await E_Updated.InvokeAsync(true); + } + } + protected override async Task OnParametersSetAsync() { await ReloadData(); @@ -44,6 +64,17 @@ namespace MP_TAB_SERV.Components ListPaged = ListComplete; } } + /// + /// Modifica qty del record + /// + /// + /// + /// + protected async Task modQty(RegistroScartiKitModel currItem, int delta) + { + currItem.Qta += delta; + await TabDServ.RegScartiKitUpdateQty(currItem); + } #endregion Protected Methods diff --git a/MP-TAB-SERV/Components/ScrapMan.razor b/MP-TAB-SERV/Components/ScrapMan.razor index c9045a34..ba4c722d 100644 --- a/MP-TAB-SERV/Components/ScrapMan.razor +++ b/MP-TAB-SERV/Components/ScrapMan.razor @@ -8,7 +8,7 @@ @if (enableScarti) {
- +
} else @@ -77,21 +77,23 @@ @item.Qta
- + @if (item.Tipo == "KIT") {
× - + } + else + { + + + }
} else @@ -127,7 +129,7 @@ {
} diff --git a/MP-TAB-SERV/Components/ScrapMan.razor.cs b/MP-TAB-SERV/Components/ScrapMan.razor.cs index 6d23dc6d..6128ee3c 100644 --- a/MP-TAB-SERV/Components/ScrapMan.razor.cs +++ b/MP-TAB-SERV/Components/ScrapMan.razor.cs @@ -21,7 +21,7 @@ namespace MP_TAB_SERV.Components /// Aggiorno valori produzione alla data richiesta... /// /// - public async Task doUpdate() + protected async Task ReloadData() { isProcessing = true; await Task.Delay(1); @@ -36,6 +36,15 @@ namespace MP_TAB_SERV.Components await Task.Delay(1); } + protected async Task ForceReload(bool DoClose) + { + if (DoClose) + { + selItem = null; + } + await ReloadData(); + } + #endregion Public Methods #region Protected Properties @@ -67,7 +76,7 @@ namespace MP_TAB_SERV.Components DateTime fine = DateTime.Today.AddDays(1); DateTime inizio = fine.AddDays(-8); CurrPeriodo = new Periodo(inizio, fine); - await doUpdate(); + await ReloadData(); } } @@ -93,7 +102,7 @@ namespace MP_TAB_SERV.Components isProcessing = true; await Task.Delay(1); IdxMaccSel = selIdxMacc; - await doUpdate(); + await ReloadData(); isProcessing = false; await Task.Delay(1); } @@ -103,7 +112,7 @@ namespace MP_TAB_SERV.Components isProcessing = true; await Task.Delay(1); IdxOdl = selIdxOdl; - await doUpdate(); + await ReloadData(); isProcessing = false; await Task.Delay(1); } @@ -111,11 +120,12 @@ namespace MP_TAB_SERV.Components protected async Task SetPeriodo(Periodo newPeriodo) { CurrPeriodo = newPeriodo; - await doUpdate(); + await ReloadData(); } protected async Task ShowKitDetail(RegistroScartiModel currItem) { + isProcessing = true; // deve essere != null in primis... if (currItem != null) { @@ -134,6 +144,8 @@ namespace MP_TAB_SERV.Components selItem = null; } } + await ReloadData(); + isProcessing = false; } protected void UpdateTable() diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index 9e717cc6..752a02b0 100644 --- a/MP-TAB-SERV/MP-TAB-SERV.csproj +++ b/MP-TAB-SERV/MP-TAB-SERV.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2312.1412 + 6.16.2312.1413 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index fe09f92f..a1d18744 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2312.1412

+

Versione: 6.16.2312.1413


Note di rilascio:
- Esplosione scarti KIT + +
+ Esplosione scarti KIT +
+
+ +
- +