Avanzamento gestione ODL

This commit is contained in:
Samuele Locatelli
2023-10-31 11:38:04 +01:00
parent 55e3400898
commit c1a1945d41
8 changed files with 84 additions and 29 deletions
+1 -2
View File
@@ -71,9 +71,8 @@ namespace MP_TAB_SERV.Components
var pUpd = Task.Run(async () =>
{
aTimer.Interval = fastRefreshMs;
//await RefreshData();
//Log.Trace("MseSampler Timer elapsed");
await InvokeAsync(RefreshData);
//Log.Trace("MseSampler Timer elapsed");
});
pUpd.Wait();
}
+28 -6
View File
@@ -7,7 +7,7 @@
{
<div class="col-12 text-danger">
<div class="fs-3">@lblWarnHead</div>
<div class="small">@lblWarnBody <b>@numPz2Conf</b></div>
<div class="small">@lblWarnBody <b>@numPz2Conf</b> pz NC</div>
</div>
@if (!odlOk)
{
@@ -19,10 +19,32 @@
<div class="col-12">
Slave machine man
</div>
@if (!needConfProd)
{
<div class="col-12">
ODL setup (full)
<div class="col-6">
selettore PODL
</div>
<div class="col-6">
<button class="btn btn-lg btn-outline-warning w-100" disabled="@needConfProd">Dettaglio ODL</button>
</div>
<div class="col-6">
<button class="btn btn-lg btn-warning w-100" disabled="@needConfProd">FINE Attr / INIZIO Prod</button>
</div>
<div class="col-6">
<button class="btn btn-lg btn-primary w-100" disabled="@needConfProd">FINE Produzione</button>
</div>
<div class="col-6">
<button class="btn btn-lg btn-info w-100" disabled="@needConfProd">Mostra Riattrezzaggio</button>
</div>
<div class="col-6">
<div class="form-check form-switch fs-3">
<input class="form-check-input" type="checkbox" @bind="@forceCloseOdl">
<label class="form-check-label">@Traduci("ForceCloseODL")</label>
</div>
}
<button class="btn btn-lg btn-light w-100" disabled="@needConfProd">Chiudi ODL Inevaso (check) </button>
</div>
<div class="col-12">
<button class="btn btn-lg btn-success w-100" disabled="@needConfProd">Fix Chiusura Arttrezzaggio (PLC)</button>
</div>
<div class="col-12">
<button class="btn btn-lg btn-primary w-100" disabled="@needConfProd">Creazione ODL Provvisorio</button>
</div>
</div>
+49 -15
View File
@@ -1,5 +1,6 @@
using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
namespace MP_TAB_SERV.Components
{
@@ -13,19 +14,26 @@ namespace MP_TAB_SERV.Components
[Parameter]
public EventCallback<List<MappaStatoExpl>> E_Updated { get; set; }
/// <summary>
/// Verifica ODL OK (ovvero caricato x macchina...)
/// </summary>
public bool odlOk
{
get => (RecMSE != null && RecMSE.IdxOdl > 0);
}
[Parameter]
public MappaStatoExpl? RecMSE { get; set; } = null;
#endregion Public Properties
#region Protected Properties
/// <summary>
/// Verifica ODL OK (ovvero caricato x macchina...)
/// </summary>
protected bool odlOk
{
get => (RecMSE != null && RecMSE.IdxOdl > 0);
}
[Inject]
protected SharedMemService SMServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
/// <summary>
@@ -40,6 +48,11 @@ namespace MP_TAB_SERV.Components
await Task.Delay(1);
}
protected override void OnInitialized()
{
baseLang = SMServ.GetConf("baseLang");
}
protected override async Task OnParametersSetAsync()
{
await Task.Delay(1);
@@ -56,16 +69,16 @@ namespace MP_TAB_SERV.Components
await Task.Delay(10);
}
protected string Traduci(string lemma)
{
return SMServ.Traduci($"{baseLang}_{lemma}".ToUpper());
}
#endregion Protected Methods
#region Private Fields
private string lblWarnBody = "Pezzi da confermare: ";
private string lblWarnHead = "Attenzione";
private int numPz2Conf = 0;
private string baseLang = "IT";
#endregion Private Fields
@@ -80,6 +93,28 @@ namespace MP_TAB_SERV.Components
private bool isProcessing { get; set; } = false;
private string lblWarnBody
{
get => odlOk ? Traduci("ConfProdBeforeContinueBody") : Traduci("setOdlBeforeContinueBody");
}
private string lblWarnHead
{
get => odlOk ? Traduci("ConfProdBeforeContinueHead") : Traduci("setOdlBeforeContinueHead");
}
private bool needConfProd
{
get => (RecMSE != null && RecMSE.PezziProd > RecMSE.PezziConf);
}
private int numPz2Conf
{
get => RecMSE != null ? RecMSE.PezziProd - RecMSE.PezziConf : 0;
}
protected bool forceCloseOdl = true;
#endregion Private Properties
#region Private Methods
@@ -89,7 +124,6 @@ namespace MP_TAB_SERV.Components
checkConfProd();
}
private bool needConfProd = true;
/// <summary>
/// verifica se sia necessario confermare la produzione PRIMA di operare sull'ODL
/// </summary>
@@ -91,12 +91,12 @@ namespace MP_TAB_SERV.Components
protected override void OnInitialized()
{
imgBasePath = Environment.CurrentDirectory;
baseLang = SMServ.GetConf("baseLang");
enableForceParamSchedaTecnica = SMServ.GetConfBool("enableForceParamSchedaTecnica");
}
protected override void OnParametersSet()
{
enableForceParamSchedaTecnica = SMServ.GetConfBool("enableForceParamSchedaTecnica");
baseLang = SMServ.GetConf("baseLang");
if (CurrRec != null)
{
hasDeroga = false;
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2310.3110</Version>
<Version>6.16.2310.3111</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB_SERV</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2310.3110</h4>
<h4>Versione: 6.16.2310.3111</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2310.3110
6.16.2310.3111
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2310.3110</version>
<version>6.16.2310.3111</version>
<url>https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>