Update TAB3: display PODL/ODL detail sempre

This commit is contained in:
Samuele Locatelli
2024-12-23 10:12:14 +01:00
parent fb012082f4
commit 24b8def4ee
12 changed files with 280 additions and 198 deletions
+161
View File
@@ -0,0 +1,161 @@
<div class="col-12 my-1">
<div class="card">
<div class="card-header @cssDetailOdl d-flex justify-content-between">
<div>
<h4>@titleOdlDetail</h4>
</div>
@if (IdxPOdlSel == 0)
{
<div class="d-flex text-end">
<div class="form-check form-switch px-2">
<label class="form-check-label">@txtShowXDL</label>
<input class="form-check-input" type="checkbox" @bind="@showPOdlData">
</div>
@if (!InAttr)
{
<div>
<button class="btn btn-dark w-100" @onclick="ToggleOdlDetail"><i class="fa-solid fa-chevron-up"></i> @txtBtnOdlDetail</button>
</div>
}
</div>
}
</div>
<div class="card-body">
<div class="row">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
@if (!showPOdlData)
{
<b>ODL:</b>
}
else
{
<b>P.ODL:</b>
}
</div>
<div class="px-0 text-end fw-bold">
@if (CurrOdl != null && !showPOdlData)
{
@CurrOdl.IdxOdl
}
else
{
@CurrPodl.IdxPromessa
}
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Rif:
</div>
<div class="px-0 text-end fw-bold">
@CurrPodl.KeyRichiesta
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Cod:
</div>
<div class="px-0 text-end fw-bold">
@CurrPodl.CodArticolo
</div>
</div>
</div>
<div class="row border-top border-bottom border-secondary">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Articolo:
</div>
<div class="px-0 text-end fw-bold">
@CurrPodl.DescArticolo
</div>
</div>
</div>
<div class="row">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Pezzi:
</div>
<div class="px-0 text-end fw-bold">
@CurrPodl.NumPezzi.ToString("N0")
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
TCiclo:
</div>
<div class="px-0 text-end fw-bold">
@if (CurrOdl != null && CurrOdl.Tcassegnato > 0 && !showPOdlData)
{
@CurrOdl.Tcassegnato.ToString("N2")
}
else
{
@CurrPodl.Tcassegnato.ToString("N2")
}
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Pz/pallet:
</div>
<div class="px-0 text-end fw-bold">
@if (CurrOdl != null && !showPOdlData)
{
@CurrOdl.PzPallet
}
else
{
@CurrPodl.PzPallet
}
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col text-start fw-bold">
@if (CurrOdl != null && !showPOdlData)
{
@CurrOdl.Nome
}
else
{
@CurrPodl.Nome
}
</div>
<div class="col d-flex justify-content-between">
@if (!showPOdlData)
{
}
else
{
<div class="px-0 small">
Priorita:
</div>
<div class="px-0 text-end fw-bold">
@CurrPodl.Priorita
</div>
}
</div>
<div class="col d-flex justify-content-between">
@if (!showPOdlData)
{
}
else
{
<div class="px-0 small">
Data:
</div>
<div class="px-0 text-end fw-bold">
@($"{CurrPodl.DueDate:yyyy.MM.dd}")
</div>
}
</div>
</div>
</div>
</div>
</div>
+93
View File
@@ -0,0 +1,93 @@
using Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using System;
namespace MP_TAB3.Components
{
public partial class CurrOdlDetail
{
#region Public Properties
[Parameter]
public ODLExpModel CurrOdl { get; set; } = null!;
[Parameter]
public PODLExpModel CurrPodl { get; set; } = null!;
[Parameter]
public EventCallback<bool> EC_ToggleOdlDetail { get; set; }
[Parameter]
public EventCallback<bool> EC_TogglePOdl { get; set; }
[Parameter]
public bool ForceCloseOdl { get; set; }
[Parameter]
public int IdxPOdlSel { get; set; }
[Parameter]
public bool InAttr { get; set; }
[Parameter]
public bool ShowOdlDetail { get; set; }
#endregion Public Properties
#region Protected Properties
[Inject]
protected MessageService MsgServ { get; set; } = null!;
[Inject]
protected SharedMemService SMServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected async Task ToggleOdlDetail()
{
await EC_ToggleOdlDetail.InvokeAsync(true);
}
protected string Traduci(string lemma)
{
return SMServ.Traduci($"{baseLang}_{lemma}".ToUpper());
}
#endregion Protected Methods
#region Private Properties
private string baseLang
{
get => MsgServ.UserPrefGet("Lang");
}
private string cssDetailOdl
{
get => IdxPOdlSel > 0 ? "bg-info text-light" : "bg-warning";
}
private bool showPOdlData { get; set; } = true;
private string titleOdlDetail
{
get => IdxPOdlSel > 0 ? "Verifica parametri attrezzaggio NUOVO PODL" : InAttr ? "Parametri PODL in Attrezzaggio" : "Parametri PODL Corrente";
}
private string txtBtnOdlDetail
{
get => ShowOdlDetail ? "Nascondi Dettaglio PODL" : "MOSTRA Dettaglio ODL Corrente";
}
private string txtShowXDL
{
get => showPOdlData ? "PODL" : "ODL";
}
#endregion Private Properties
}
}
+13 -158
View File
@@ -65,6 +65,18 @@
<FixOdl IdxMaccCurr="@IdxMaccSel" E_RefreshData="refreshAfterFixOdl"></FixOdl>
</div>
}
@if (!inAttr && !showOdlDetail)
{
<div class="col-12 my-1">
<button class="btn btn-lg btn-warning w-100" disabled="@inAttr" @onclick="ToggleOdlDetail"><i class="fa-solid fa-chevron-down"></i> @txtBtnOdlDetail</button>
</div>
}
if (showOdlDetail)
{
<CurrOdlDetail CurrOdl="@currOdl" CurrPodl="@currPodl" IdxPOdlSel="@IdxPOdlSel" ShowOdlDetail="@showOdlDetail" ForceCloseOdl="@forceCloseOdl" InAttr="@inAttr" EC_ToggleOdlDetail="ToggleOdlDetail"></CurrOdlDetail>
}
}
else
{
@@ -104,164 +116,7 @@
@if (showOdlDetail || inAttr)
{
<div class="col-12 my-1">
<div class="card">
<div class="card-header @cssDetailOdl d-flex justify-content-between">
<div>
<h4>@titleOdlDetail</h4>
</div>
@if (idxPOdlSel == 0)
{
<div class="d-flex text-end">
<div class="form-check form-switch px-2">
<label class="form-check-label">@txtShowXDL</label>
<input class="form-check-input" type="checkbox" @bind="@showPOdlData">
</div>
@if (!inAttr)
{
<div>
<button class="btn btn-dark w-100" @onclick="ToggleOdlDetail"><i class="fa-solid fa-chevron-up"></i> @txtBtnOdlDetail</button>
</div>
}
</div>
}
</div>
<div class="card-body">
<div class="row">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
@if (!showPOdlData)
{
<b>ODL:</b>
}
else
{
<b>P.ODL:</b>
}
</div>
<div class="px-0 text-end fw-bold">
@if (currOdl != null && !showPOdlData)
{
@currOdl.IdxOdl
}
else
{
@currPodl.IdxPromessa
}
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Rif:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.KeyRichiesta
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Cod:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.CodArticolo
</div>
</div>
</div>
<div class="row border-top border-bottom border-secondary">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Articolo:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.DescArticolo
</div>
</div>
</div>
<div class="row">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Pezzi:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.NumPezzi.ToString("N0")
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
TCiclo:
</div>
<div class="px-0 text-end fw-bold">
@if (currOdl != null && currOdl.Tcassegnato > 0 && !showPOdlData)
{
@currOdl.Tcassegnato.ToString("N2")
}
else
{
@currPodl.Tcassegnato.ToString("N2")
}
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Pz/pallet:
</div>
<div class="px-0 text-end fw-bold">
@if (currOdl != null && !showPOdlData)
{
@currOdl.PzPallet
}
else
{
@currPodl.PzPallet
}
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col text-start fw-bold">
@if (currOdl != null && !showPOdlData)
{
@currOdl.Nome
}
else
{
@currPodl.Nome
}
</div>
<div class="col d-flex justify-content-between">
@if (!showPOdlData)
{
}
else
{
<div class="px-0 small">
Priorita:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.Priorita
</div>
}
</div>
<div class="col d-flex justify-content-between">
@if (!showPOdlData)
{
}
else
{
<div class="px-0 small">
Data:
</div>
<div class="px-0 text-end fw-bold">
@($"{currPodl.DueDate:yyyy.MM.dd}")
</div>
}
</div>
</div>
</div>
</div>
</div>
<CurrOdlDetail CurrOdl="@currOdl" CurrPodl="@currPodl" IdxPOdlSel="@IdxPOdlSel" ShowOdlDetail="@showOdlDetail" ForceCloseOdl="@forceCloseOdl" InAttr="@inAttr" EC_ToggleOdlDetail="ToggleOdlDetail"></CurrOdlDetail>
}
@if (!inAttr && !showSplitOdlRiattr)
+4 -31
View File
@@ -429,7 +429,6 @@ namespace MP_TAB3.Components
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"PODL: {currPodl.IdxPromessa}{Environment.NewLine}Art: [{currPodl.CodArticolo}] {currPodl.DescArticolo}{Environment.NewLine}Pezzi: {currPodl.NumPezzi} * TCiclo: {tcRichAttr:N3}min{Environment.NewLine}Tempo stimato: {stima}{Environment.NewLine}{Environment.NewLine}Confermi la chiusura della fase di attrezzaggio?"))
return;
// prima di tutto svuoto dati prod
SDService.MachProdStRem(IdxMaccSel);
@@ -791,7 +790,7 @@ namespace MP_TAB3.Components
}
IdxMaccParent = getIdxMaccParent();
checkAll();
// verifica stato inAttr
// verifica stato InAttr
await CheckAttr();
//salvo lastRec...
lastRecMSE = RecMSE;
@@ -1259,15 +1258,10 @@ namespace MP_TAB3.Components
private bool cancelSetupEnabled
{
//get => inAttr && enableSchedaTecnica && enableAnnullaSetup;
//get => InAttr && enableSchedaTecnica && enableAnnullaSetup;
get => inAttr && enableAnnullaSetup;
}
private string cssDetailOdl
{
get => IdxPOdlSel > 0 ? "bg-info text-light" : "bg-warning";
}
private ODLExpModel currOdl { get; set; } = new ODLExpModel();
private PODLExpModel currPodl { get; set; } = new PODLExpModel();
@@ -1446,11 +1440,6 @@ namespace MP_TAB3.Components
private decimal tcRichAttr { get; set; } = 0;
private string titleOdlDetail
{
get => IdxPOdlSel > 0 ? "Verifica parametri attrezzaggio NUOVO PODL" : inAttr ? "Parametri PODL in Attrezzaggio" : "Parametri PODL Corrente";
}
private string txtBtnOdlDetail
{
get => showOdlDetail ? "Nascondi Dettaglio PODL" : "MOSTRA Dettaglio ODL Corrente";
@@ -1461,11 +1450,6 @@ namespace MP_TAB3.Components
get => forceCloseOdl ? Traduci("ForceCloseODL") : Traduci("SplitCurrODL");
}
private string txtShowXDL
{
get => showPOdlData ? "PODL" : "ODL";
}
#endregion Private Properties
#region Private Methods
@@ -1527,14 +1511,9 @@ namespace MP_TAB3.Components
{
// recupero pz da confermare
datiProdAct = await TabDServ.StatoProdMacchina(IdxMaccSel, adesso);
#if false
var rawData = await TabDServ.PezziProdMacchina(IdxMaccSel);
prodMacchina = rawData.FirstOrDefault() ?? new PzProdModel();
#endif
checkConfProd();
#if false
if (prodMacchina.pezziNonConfermati > 0)
#endif
if (datiProdAct.Pz2RecTot > 0)
{
// confermo produzione ZERO pezzi (in setup)
@@ -1542,16 +1521,10 @@ namespace MP_TAB3.Components
{
// confermo al netto dei pezzi lasciati...
fatto = TabDServ.ConfermaProdMacchinaFull(IdxMaccSel, modoConfProd, datiProdAct.Pz2RecTot, 0, 0, adesso, MatrOpr);
#if false
fatto = TabDServ.ConfermaProdMacchinaFull(IdxMaccSel, modoConfProd, prodMacchina.pezziNonConfermati, 0, 0, adesso, MatrOpr);
#endif
}
else
{
fatto = TabDServ.ConfermaProdMacchina(IdxMaccSel, modoConfProd, datiProdAct.Pz2RecTot, 0, adesso, MatrOpr);
#if false
fatto = TabDServ.ConfermaProdMacchina(IdxMaccSel, modoConfProd, prodMacchina.pezziNonConfermati, 0, adesso, MatrOpr);
#endif
}
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2412.510</Version>
<Version>6.16.2412.2310</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2412.510</h4>
<h4>Versione: 6.16.2412.2310</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2412.510
6.16.2412.2310
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2412.510</version>
<version>6.16.2412.2310</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>