TAB3:
Update display conferma prod x 4 sec (configurabile)
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@if (confProdActive)
|
||||
{
|
||||
<div class="cardBg bg-dark bg-gradient p-2 mt-2 border border-success border-2">
|
||||
@@ -210,6 +209,50 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (showConfirmResult)
|
||||
{
|
||||
<div class="border border-info border-2 rounded-3 my-2 p-2">
|
||||
<b>Conferma Produzione</b> effettuata alle @($"{lastConfProd:HH:mm:ss}")
|
||||
<div class="d-flex justify-content-between lh-sm text-success">
|
||||
@if (lastPzBuoni > 0)
|
||||
{
|
||||
<span>Pz Buoni</span>
|
||||
<span class="fw-bold">@lastPzBuoni</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-secondary">Pz Buoni</span>
|
||||
<span class="text-secondary">@lastPzBuoni</span>
|
||||
}
|
||||
</div>
|
||||
<div class="d-flex justify-content-between lh-sm text-danger">
|
||||
@if (lastPzScarto > 0)
|
||||
{
|
||||
<span>Pz scarto</span>
|
||||
<span>@lastPzScarto</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-secondary">Pz scarto</span>
|
||||
<span class="text-secondary">@lastPzScarto</span>
|
||||
}
|
||||
</div>
|
||||
<div class="d-flex justify-content-between lh-sm text-info">
|
||||
@if (lastPzRilav > 0)
|
||||
{
|
||||
<span>Cicli Rilav.</span>
|
||||
<span>@lastPzRilav</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-secondary">Cicli Rilav.</span>
|
||||
<span class="text-secondary">@lastPzRilav</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!confProdActive)
|
||||
{
|
||||
<div class="col-12">
|
||||
@@ -244,7 +287,9 @@ else
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<ShowProcessing IsProcessing="@isProcessing"></ShowProcessing>
|
||||
|
||||
@if (!confProdActive)
|
||||
{
|
||||
<div style="font-size: 1.1rem;">
|
||||
|
||||
@@ -234,6 +234,24 @@ namespace MP_TAB3.Components
|
||||
confRett = SMServ.GetConfBool("confRett");
|
||||
enableMagPrint = SMServ.GetConfBool("enableMagPrint");
|
||||
modoConfProd = SMServ.GetConfInt("modoConfProd");
|
||||
int tOutConfProd = SMServ.GetConfInt("TAB_TimeOutConfProd");
|
||||
confTimer = new System.Timers.Timer(tOutConfProd);
|
||||
confTimer.Elapsed += ConfTimer_Elapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Timer visualizzazione esito conferma pezzi: deve nascondere...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void ConfTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
showConfirmResult = false;
|
||||
// resetto
|
||||
lastPzBuoni = 0;
|
||||
lastPzRilav = 0;
|
||||
lastPzScarto = 0;
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
@@ -273,6 +291,7 @@ namespace MP_TAB3.Components
|
||||
protected async Task SalvaConfPz()
|
||||
{
|
||||
isProcessing = true;
|
||||
|
||||
// effettua conferma con conf da DB del tipo (giorni / turni / periodo
|
||||
bool fatto = effettuaConfermaProd();
|
||||
await TabDServ.FlushCache("StatoProd");
|
||||
@@ -289,6 +308,12 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
// mostro output
|
||||
lblOut = $"Confermata produzione {numPzConfermati - numPzLasciati} pezzi (+{numPzLasciati} pz lasciati, +{numPzScarto2Rec} pz scarto) |{dtReqUpdate:HH:mm:ss} | {dtReqUpdate:ddd yyyy.MM.dd}";
|
||||
// salvo ultimi valori conferma...
|
||||
lastPzBuoni = numPzConfermati - numPzLasciati;
|
||||
lastPzRilav = numPzRilav2Rec;
|
||||
lastPzScarto = numPzScarto2Rec;
|
||||
lastConfProd = DateTime.Now;
|
||||
|
||||
// cambio button conferma...
|
||||
confProdActive = false;
|
||||
numPzLasciati = 0;
|
||||
@@ -299,8 +324,17 @@ namespace MP_TAB3.Components
|
||||
await RefreshData();
|
||||
TabDServ.NotifyDataInvalidated(IdxMaccSel);
|
||||
isProcessing = false;
|
||||
// imposto visualizzazione conferma effettuata
|
||||
showConfirmResult = true;
|
||||
// avvio timer x nascondere...
|
||||
confTimer.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Timer 3 sec x mostrare conferma
|
||||
/// </summary>
|
||||
private System.Timers.Timer confTimer = new System.Timers.Timer(3000);
|
||||
|
||||
protected void setConfirmBtn(bool newVal)
|
||||
{
|
||||
showConfirm = newVal;
|
||||
@@ -380,6 +414,13 @@ namespace MP_TAB3.Components
|
||||
|
||||
private bool showConfirm { get; set; } = true;
|
||||
|
||||
private bool showConfirmResult = false;
|
||||
|
||||
private int lastPzBuoni = 0;
|
||||
private int lastPzRilav = 0;
|
||||
private int lastPzScarto = 0;
|
||||
private DateTime lastConfProd = DateTime.Now;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>6.16.2503.2512</Version>
|
||||
<Version>6.16.2503.2717</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB3</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2503.2512</h4>
|
||||
<h4>Versione: 6.16.2503.2717</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2503.2512
|
||||
6.16.2503.2717
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2503.2512</version>
|
||||
<version>6.16.2503.2717</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user