From 243c451beff6e44c2d0de2d528cf38a9b4df1bac Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 19 Dec 2022 10:14:27 +0100 Subject: [PATCH] Dettaglio lotti scansionati: - aggiunta (preliminare) visualizzazione --- MP.INVE/Components/InveSessionList.razor | 5 +- MP.INVE/Components/ListScan.razor.cs | 59 ++++++++------- MP.INVE/Components/ListTotLotto.razor | 87 ++++++++++++++--------- MP.INVE/Components/ListTotLotto.razor.cs | 34 +++++++++ MP.INVE/Components/LotScanDetail.razor | 48 +++++++++++++ MP.INVE/Components/LotScanDetail.razor.cs | 26 +++++++ MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Pages/Index.razor.cs | 15 +--- MP.INVE/Pages/InveSession.razor | 2 +- MP.INVE/Pages/Invio.razor | 2 +- MP.INVE/Pages/Invio.razor.cs | 15 ++++ MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 14 files changed, 219 insertions(+), 82 deletions(-) create mode 100644 MP.INVE/Components/LotScanDetail.razor create mode 100644 MP.INVE/Components/LotScanDetail.razor.cs diff --git a/MP.INVE/Components/InveSessionList.razor b/MP.INVE/Components/InveSessionList.razor index f777e5c3..eb6f4e03 100644 --- a/MP.INVE/Components/InveSessionList.razor +++ b/MP.INVE/Components/InveSessionList.razor @@ -70,10 +70,7 @@ - @if (inCorso) - { - - } + diff --git a/MP.INVE/Components/ListScan.razor.cs b/MP.INVE/Components/ListScan.razor.cs index 8ffdd6e3..40456e7d 100644 --- a/MP.INVE/Components/ListScan.razor.cs +++ b/MP.INVE/Components/ListScan.razor.cs @@ -1,19 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Components; -using System.Net.Http; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Components.Authorization; -using Microsoft.AspNetCore.Components.Forms; -using Microsoft.AspNetCore.Components.Routing; -using Microsoft.AspNetCore.Components.Web; -using Microsoft.AspNetCore.Components.Web.Virtualization; using Microsoft.JSInterop; -using MP.INVE; -using MP.INVE.Shared; -using MP.INVE.Components; using MP.Data.DatabaseModels; using MP.INVE.Data; @@ -21,26 +7,51 @@ namespace MP.INVE.Components { public partial class ListScan { - [Inject] - MiDataService MIService { get; set; } = null!; - [Inject] - IJSRuntime JSRuntime { get; set; } = null!; + #region Public Properties + [Parameter] public string lastScan { get; set; } = ""; - [Parameter] - public string userScan { get; set; } = null!; - [Parameter] - public int sessID { get; set; } = 0; + [Parameter] public string magID { get; set; } = ""; + + [Parameter] + public int sessID { get; set; } = 0; + + [Parameter] + public string userScan { get; set; } = null!; + + #endregion Public Properties + + #region Protected Properties + protected string rawScan { get; set; } = null!; - List? elencoSCAN; + #endregion Protected Properties + + #region Protected Methods + protected override async Task OnParametersSetAsync() { await Task.Delay(1); - } + #endregion Protected Methods + + #region Private Fields + + private List? elencoSCAN; + + #endregion Private Fields + + #region Private Properties + + [Inject] + private IJSRuntime JSRuntime { get; set; } = null!; + + [Inject] + private MiDataService MIService { get; set; } = null!; + + #endregion Private Properties } } \ No newline at end of file diff --git a/MP.INVE/Components/ListTotLotto.razor b/MP.INVE/Components/ListTotLotto.razor index 863a00a7..7439738a 100644 --- a/MP.INVE/Components/ListTotLotto.razor +++ b/MP.INVE/Components/ListTotLotto.razor @@ -1,36 +1,55 @@ -
QRApri ID sessione Magazzino Operatore
- - - - - - - - - - - @if (elencoTotLotto != null) - { - @foreach (var item in elencoTotLotto) - { +
+
+
LottoCod.Art.Descrizione Articolo# ColliQty Tot
+ - - - - - + + + + + + - } - } - -
- @item.Lotto - - @item.CodArticolo - - @item.DescrArt - - @item.NumColli - - @($"{item.TotLotto:N2}") - + @if (currRecord != null) + { + + } + LottoCod.Art.Descrizione Articolo# ColliQty Tot
+ + + @if (elencoTotLotto != null) + { + @foreach (var item in elencoTotLotto) + { + + + + + + @item.Lotto + + + @item.CodArticolo + + + @item.DescrArt + + + @item.NumColli + + + @($"{item.TotLotto:N2}") + + + } + } + + + + @if (currRecord != null) + { +
+ +
+ } + \ No newline at end of file diff --git a/MP.INVE/Components/ListTotLotto.razor.cs b/MP.INVE/Components/ListTotLotto.razor.cs index 7a3eb14b..ffd122f5 100644 --- a/MP.INVE/Components/ListTotLotto.razor.cs +++ b/MP.INVE/Components/ListTotLotto.razor.cs @@ -105,6 +105,40 @@ namespace MP.INVE.Components } } + + protected async Task selRecord(InveSessTotLotModel selRecord) + { + currRecord = selRecord; + await Task.Delay(1); + } + + protected async Task resetSel() + { + currRecord = null; + await Task.Delay(1); + } + public string checkSelect(InveSessTotLotModel thisRecord) + { + string answ = ""; + if (currRecord != null) + { + try + { + answ = (currRecord.Lotto == thisRecord.Lotto && currRecord.CodArticolo==thisRecord.CodArticolo) ? "table-info" : ""; + } + catch + { } + } + return answ; + } + + public string mainCss + { + get => currRecord != null ? "col-9" : "col-12"; + } + + protected InveSessTotLotModel? currRecord { get; set; } = null; + #endregion Private Properties #region Private Methods diff --git a/MP.INVE/Components/LotScanDetail.razor b/MP.INVE/Components/LotScanDetail.razor new file mode 100644 index 00000000..50c73f98 --- /dev/null +++ b/MP.INVE/Components/LotScanDetail.razor @@ -0,0 +1,48 @@ +

@LottoSel

+ + + + + + + + + + + + + + + @*@if (elencoTotLotto != null) + { + @foreach (var item in elencoTotLotto) + { + + + + + + + + + } + }*@ + +
+ @*@if (currRecord != null) + { + + }*@ + LottoCod.Art.Descrizione Articolo# ColliQty Tot
+ + + @item.Lotto + + @item.CodArticolo + + @item.DescrArt + + @item.NumColli + + @($"{item.TotLotto:N2}") +
\ No newline at end of file diff --git a/MP.INVE/Components/LotScanDetail.razor.cs b/MP.INVE/Components/LotScanDetail.razor.cs new file mode 100644 index 00000000..753aa186 --- /dev/null +++ b/MP.INVE/Components/LotScanDetail.razor.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using MP.INVE; +using MP.INVE.Shared; +using MP.INVE.Components; + +namespace MP.INVE.Components +{ + public partial class LotScanDetail + { + + [Parameter] + public string LottoSel { get; set; } = ""; + } +} \ No newline at end of file diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index e78c35e8..74efc817 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1709 + 6.16.2212.1910 diff --git a/MP.INVE/Pages/Index.razor.cs b/MP.INVE/Pages/Index.razor.cs index 5f7b5a65..8b106951 100644 --- a/MP.INVE/Pages/Index.razor.cs +++ b/MP.INVE/Pages/Index.razor.cs @@ -1,19 +1,11 @@ -using Blazored.LocalStorage; -using Microsoft.AspNetCore.Components; using MP.Data.DatabaseModels; -using MP.Data.DTO; -using MP.INVE.Data; namespace MP.INVE.Pages { public partial class Index { - #region Public Properties - //public List? ElencoLink { get; set; } - #endregion Public Properties - #region Protected Methods protected override async Task OnInitializedAsync() @@ -34,14 +26,9 @@ namespace MP.INVE.Pages //await getId(); await Task.Delay(1); } + #endregion Protected Methods - #region Private Fields - - private string currAzienda = ""; - - #endregion Private Fields - #region Private Properties private List? configData { get; set; } = null; diff --git a/MP.INVE/Pages/InveSession.razor b/MP.INVE/Pages/InveSession.razor index 84685ce3..26103cd0 100644 --- a/MP.INVE/Pages/InveSession.razor +++ b/MP.INVE/Pages/InveSession.razor @@ -32,7 +32,7 @@ } else { - + } diff --git a/MP.INVE/Pages/Invio.razor b/MP.INVE/Pages/Invio.razor index c6893f43..323c0c15 100644 --- a/MP.INVE/Pages/Invio.razor +++ b/MP.INVE/Pages/Invio.razor @@ -16,7 +16,7 @@ else Invio
- TORNA A SESSIONI +
diff --git a/MP.INVE/Pages/Invio.razor.cs b/MP.INVE/Pages/Invio.razor.cs index eb5f7b54..c305f1fe 100644 --- a/MP.INVE/Pages/Invio.razor.cs +++ b/MP.INVE/Pages/Invio.razor.cs @@ -56,6 +56,7 @@ namespace MP.INVE.Pages protected async void apriSessione(int sessID) { var open = await MIService.CloseOpenSessione(sessID, false); + await resetCacheSessInv(); if (open) { NavManager.NavigateTo(NavManager.Uri, true); @@ -65,6 +66,7 @@ namespace MP.INVE.Pages protected async void chiudiSessione(int sessID) { var closed = await MIService.CloseOpenSessione(sessID, true); + await resetCacheSessInv(); if (closed) { NavManager.NavigateTo(NavManager.Uri, true); @@ -129,6 +131,7 @@ namespace MP.INVE.Pages protected async void trasfSessione(int sessID) { var trasf = await MIService.TransferSessione(sessID); + await resetCacheSessInv(); if (trasf) { NavManager.NavigateTo(NavManager.Uri, true); @@ -212,6 +215,18 @@ namespace MP.INVE.Pages } } + protected async Task returnToSessions() + { + await resetCacheSessInv(); + // ritorno pagina... + NavManager.NavigateTo("InveSession", true); + } + + private async Task resetCacheSessInv() + { + await MIService.FlushSessInvCache(); + } + #endregion Private Properties #region Private Methods diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 754fa71c..7758f8a0 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

Versione: 6.16.2212.1709

+

Versione: 6.16.2212.1910


Note di rilascio:
  • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index db30bbbc..c76fe32d 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1709 +6.16.2212.1910 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index a53693b8..043551f1 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1709 + 6.16.2212.1910 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false