diff --git a/MP-TAB-SERV/Components/FixOdl.razor b/MP-TAB-SERV/Components/FixOdl.razor index 8856ac12..2b65f2eb 100644 --- a/MP-TAB-SERV/Components/FixOdl.razor +++ b/MP-TAB-SERV/Components/FixOdl.razor @@ -1,6 +1,6 @@  -@if (forceOdl) +@if (showFixOdl) {
@@ -11,7 +11,22 @@ ...tabella...
- cerca/selezione ODL (miei/tutti) +
+ + +
+ + +
+
diff --git a/MP-TAB-SERV/Components/FixOdl.razor.cs b/MP-TAB-SERV/Components/FixOdl.razor.cs index 727da193..a6830c20 100644 --- a/MP-TAB-SERV/Components/FixOdl.razor.cs +++ b/MP-TAB-SERV/Components/FixOdl.razor.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Components; using MP.Data.DatabaseModels; +using MP.Data.Services; namespace MP_TAB_SERV.Components { @@ -8,29 +9,92 @@ namespace MP_TAB_SERV.Components #region Public Properties [Parameter] - public MappaStatoExpl? RecMSE { get; set; } = null; + public string IdxMaccPar { get; set; } = ""; #endregion Public Properties #region Protected Properties - protected string txtBtnFixOdl { get => forceOdl ? "Fix ODL" : "Nascondi Fix"; } + protected List ListODL { get; set; } = new List(); + + protected bool ShowAll + { + get => showAll; + set + { + if (showAll != value) + { + showAll = value; + var pUpd = Task.Run(async () => + { + await ReloadData(); + }); + pUpd.Wait(); + } + } + } + + [Inject] + protected TabDataService TabDServ { get; set; } = null!; + + protected string txtBtnFixOdl { get => showFixOdl ? "Nascondi Fix" : "Fix ODL"; } #endregion Protected Properties #region Protected Methods + protected override async Task OnParametersSetAsync() + { + await ReloadData(); + } + protected void toggleFixOdl() { - forceOdl = !forceOdl; + showFixOdl = !showFixOdl; } #endregion Protected Methods #region Private Fields - private bool forceOdl = false; + private bool showAll = false; + private bool showFixOdl = true; #endregion Private Fields + + #region Private Properties + + private int numDayOdl { get; set; } = 30; + + #endregion Private Properties + + #region Private Methods + + private async Task ReloadData() + { + if (!string.IsNullOrEmpty(IdxMaccPar)) + { + ListODL = await TabDServ.VSOdlGetUnused(IdxMaccPar, ShowAll, numDayOdl); + } + } + protected int IdxOdlSel + { + get => idxOdlSel; + set + { + if (idxOdlSel != value) + { + idxOdlSel = value; + //var pUpd = Task.Run(async () => + //{ + // await ReloadData(true); + //}); + //pUpd.Wait(); + } + } + } + + private int idxOdlSel { get; set; } = 0; + #endregion Private Methods } } \ No newline at end of file diff --git a/MP-TAB-SERV/Components/OdlMan.razor b/MP-TAB-SERV/Components/OdlMan.razor index c5b7f09b..c881e3eb 100644 --- a/MP-TAB-SERV/Components/OdlMan.razor +++ b/MP-TAB-SERV/Components/OdlMan.razor @@ -12,87 +12,91 @@ @if (!odlOk) {
- +
} } -
- Slave machine man -
-
- Check articolo in revisione -
- @if (cancelSetupEnabled) + else { -
- +
+ Slave machine man
- } +
+ Check articolo in revisione +
+ @if (cancelSetupEnabled) + { +
+ +
+ } -
-
-
- - -
- - +
+
+
+ + +
+ + +
+
+
+
+ + @if (podlOk) + { + + } +
+
+ @if (showOdlDetail) + { +

...dettaglio ODL...

+ } + + + +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+
+ +
-
- - @if (podlOk) - { - - } -
-
- @if (showOdlDetail) - { -

...dettaglio ODL...

- } - -
-
- -
-
- -
-
- - -
-
- -
-
-
- - +
+
+ +
+
+
-
- -
-
- -
-
- -
-
+ }
\ No newline at end of file diff --git a/MP-TAB-SERV/Components/OdlMan.razor.cs b/MP-TAB-SERV/Components/OdlMan.razor.cs index 6c7395cf..ebd2793e 100644 --- a/MP-TAB-SERV/Components/OdlMan.razor.cs +++ b/MP-TAB-SERV/Components/OdlMan.razor.cs @@ -24,34 +24,13 @@ namespace MP_TAB_SERV.Components protected bool forceCloseOdl = true; + protected PzProdModel? prodMacchina = null; + #endregion Protected Fields #region Protected Properties - /// - /// Restituisce il codice IdxMacchina dell'impianto PARENT (se multi) altrimenti la stessa macchina... - /// - protected string idxMaccParent - { - get - { - string answ = ""; - // se è multi controllo - if (isMulti) - { - // verifico se SIA una tavola (ha char "#") - int iSharp = IdxMaccSel.IndexOf('#'); - if (iSharp > 0) - { - // sistemo nome - answ = IdxMaccSel.Substring(0, iSharp); - } - } - return answ; - } - } - - protected List ListODL { get; set; } = new(); + protected List ListODL { get; set; } = new List(); [Inject] protected SharedMemService MServ { get; set; } = null!; @@ -103,6 +82,26 @@ namespace MP_TAB_SERV.Components await Task.Delay(1); } + /// + /// Restituisce il codice IdxMacchina dell'impianto PARENT (se multi) altrimenti la stessa macchina... + /// + protected string getIdxMaccParent() + { + string answ = IdxMaccSel; + // se è multi controllo + if (isMulti) + { + // verifico se SIA una tavola (ha char "#") + int iSharp = IdxMaccSel.IndexOf('#'); + if (iSharp > 0) + { + // sistemo nome + answ = IdxMaccSel.Substring(0, iSharp); + } + } + return answ; + } + protected override async Task OnInitializedAsync() { baseLang = SMServ.GetConf("baseLang"); @@ -110,13 +109,12 @@ namespace MP_TAB_SERV.Components if (RecMSE != null) { IdxMaccSel = RecMSE.IdxMacchina; + IdxMaccParent = getIdxMaccParent(); await ReloadData(true); } checkAll(); } - protected PzProdModel? prodMacchina = null; - protected override async Task OnParametersSetAsync() { isMulti = MServ.DictMacchMulti[RecMSE?.IdxMacchina] == 1; @@ -147,24 +145,58 @@ namespace MP_TAB_SERV.Components #region Private Fields + private static Logger Log = LogManager.GetCurrentClassLogger(); + private string baseLang = "IT"; + private bool cancelSetupEnabled = false; + private string IdxMaccSel = ""; + private bool isInAttr = false; + private bool isInProd = false; + private bool isMulti = false; - private bool isSlave = false; + private bool isProcessing = false; + private bool isSlave = false; + private int numDayOdl = 5; + private bool podlOk = false; + private bool showAll = false; + private bool showOdlDetail = false; #endregion Private Fields #region Private Properties + /// + /// Variabile idxMacc parent x selezione ODL + /// + private string IdxMaccParent { get; set; } = ""; + + protected int IdxOdlSel + { + get => idxOdlSel; + set + { + if(idxOdlSel != value) { + idxOdlSel = value; + //var pUpd = Task.Run(async () => + //{ + // await ReloadData(true); + //}); + //pUpd.Wait(); + } + } + } + + private int idxOdlSel { get; set; } = 0; private int IdxOdl { get => RecMSE != null ? RecMSE.IdxOdl ?? 0 : 0; @@ -213,9 +245,9 @@ namespace MP_TAB_SERV.Components /// private void checkConfProd() { +#if false // verifica se sia necessario confermare produzione int pz2conf = 0; -#if false DS_ProdTempi.stp_PzProd_getByMacchinaRow rigaProd; try { @@ -250,7 +282,6 @@ namespace MP_TAB_SERV.Components mod_ODL1.isEnabled = !needConfProd; #endif } - private static Logger Log = LogManager.GetCurrentClassLogger(); private async Task ReloadData(bool forceReload) { @@ -263,7 +294,7 @@ namespace MP_TAB_SERV.Components } if (!string.IsNullOrEmpty(IdxMaccSel)) { - ListODL = await TabDServ.VSOdlGetUnused(idxMaccParent, ShowAll, numDayOdl); + ListODL = await TabDServ.VSOdlGetUnused(IdxMaccParent, ShowAll, numDayOdl); Log.Trace($"found {ListODL.Count} rec"); if (forceReload) { diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index 4a6049ae..26a117b6 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.2311.615 + 6.16.2311.616 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index 655ea41f..8ded14a8 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2311.615

+

Versione: 6.16.2311.616


Note di rilascio:
  • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index 93abea8d..846ec6ea 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2311.615 +6.16.2311.616 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index b6be4cc6..99e2e93d 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2311.615 + 6.16.2311.616 https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html false