Fix pzPallet reload + ODL/PODL

This commit is contained in:
Samuele Locatelli
2024-01-04 16:59:34 +01:00
parent 62e0687cbf
commit 430b60fc1f
6 changed files with 107 additions and 31 deletions
+72 -23
View File
@@ -106,21 +106,44 @@
<div>
<h4>@titleOdlDetail</h4>
</div>
<div>
@if (idxPOdlSel == 0 && !inAttr)
{
<button class="btn btn-dark w-100" @onclick="ToggleOdlDetail"><i class="fa-solid fa-chevron-up"></i> @txtBtnOdlDetail</button>
}
</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">
P.ODL:
@if (!showPOdlData)
{
<b>ODL:</b>
}
else
{
<b>P.ODL:</b>
}
</div>
<div class="px-0 text-end fw-bold">
@currPodl.IdxPromessa
@if (currOdl != null && !showPOdlData)
{
@currOdl.IdxOdl
}
else
{
@currPodl.IdxPromessa
}
</div>
</div>
<div class="col d-flex justify-content-between">
@@ -164,7 +187,7 @@
TCiclo:
</div>
<div class="px-0 text-end fw-bold">
@if (currOdl != null && currOdl.Tcassegnato > 0)
@if (currOdl != null && currOdl.Tcassegnato > 0 && !showPOdlData)
{
@currOdl.Tcassegnato.ToString("N2")
}
@@ -179,7 +202,14 @@
Pz/pallet:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.PzPallet
@if (currOdl != null && !showPOdlData)
{
@currOdl.PzPallet
}
else
{
@currPodl.PzPallet
}
</div>
</div>
</div>
@@ -187,23 +217,42 @@
<div class="card-footer">
<div class="row">
<div class="col text-start fw-bold">
@currPodl.Nome
@if (currOdl != null && !showPOdlData)
{
@currOdl.Nome
}
else
{
@currPodl.Nome
}
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Priorita:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.Priorita
</div>
@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">
<div class="px-0 small">
Data:
</div>
<div class="px-0 text-end fw-bold">
@($"{currPodl.DueDate:yyyy.MM.dd}")
</div>
@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>
+31 -4
View File
@@ -965,14 +965,19 @@ namespace MP_TAB3.Components
{
showSplitOdlRiattr = !showSplitOdlRiattr;
await ReloadXDL(true);
#if false
if (tcRichAttr == 0)
{
tcRichAttr = currPodl.Tcassegnato;
}
if (string.IsNullOrEmpty(noteAttr))
{
noteAttr = currOdl.Note;
}
PzPallet = currOdl.PzPallet;
#endif
}
protected async Task SplitOdl()
@@ -1120,8 +1125,8 @@ namespace MP_TAB3.Components
private bool showChkCloseOdlVal = false;
private bool showOdlDetail = false;
private bool showOdlProvv = false;
private bool showPOdlData = true;
private bool showReopenOdlTav = false;
private bool showSplitOdlOnTav = false;
private bool showSplitOdlRiattr = false;
@@ -1144,6 +1149,10 @@ namespace MP_TAB3.Components
{
get => IdxPOdlSel > 0 ? "bg-info text-light" : "bg-warning";
}
private string txtShowXDL
{
get => showPOdlData ? "PODL" : "ODL";
}
private ODLExpModel currOdl { get; set; } = new ODLExpModel();
private PODLExpModel currPodl { get; set; } = new PODLExpModel();
@@ -1326,12 +1335,12 @@ namespace MP_TAB3.Components
private string titleOdlDetail
{
get => IdxPOdlSel > 0 ? "Verifica parametri attrezzaggio NUOVO PODL" : inAttr ? "Parametri PODL in Attrezzaggio" : "Parametri ODL Corrente";
get => IdxPOdlSel > 0 ? "Verifica parametri attrezzaggio NUOVO PODL" : inAttr ? "Parametri PODL in Attrezzaggio" : "Parametri PODL Corrente";
}
private string txtBtnOdlDetail
{
get => showOdlDetail ? "Nascondi Dettaglio ODL" : "MOSTRA Dettaglio ODL Corrente";
get => showOdlDetail ? "Nascondi Dettaglio PODL" : "MOSTRA Dettaglio ODL Corrente";
}
private string txtForceCloseOdl
@@ -1564,11 +1573,13 @@ namespace MP_TAB3.Components
{
tcRichAttr = currPodl.Tcassegnato;
noteAttr = currPodl.Note;
PzPallet = currPodl.PzPallet;
}
else
{
tcRichAttr = currOdl.TCRichAttr;
noteAttr = currOdl.Note;
PzPallet = currOdl.PzPallet;
}
}
}
@@ -1579,12 +1590,13 @@ namespace MP_TAB3.Components
if (IdxPOdlSel > 0)
{
await ReloadXDL(false);
// controllo se cambiato PODL
// controllo se sia cambiato PODL
if (IdxPOdlSel != lastIdxPOdl)
{
lastIdxPOdl = IdxPOdlSel;
tcRichAttr = currPodl.Tcassegnato;
noteAttr = currPodl.Note;
PzPallet = currPodl.PzPallet;
}
}
}
@@ -1622,6 +1634,8 @@ namespace MP_TAB3.Components
currOdl = await TabDServ.OdlByIdx(currPodl.IdxOdl, false);
}
await updateIdxOdl();
// sistemo TCiclo, note, pzPallet..
fixTcNotePzPallet();
}
private async Task updateIdxOdl()
@@ -1636,6 +1650,19 @@ namespace MP_TAB3.Components
}
}
private void fixTcNotePzPallet()
{
if (tcRichAttr == 0)
{
tcRichAttr = IdxPOdlSel == 0 ? currOdl.Tcassegnato : currPodl.Tcassegnato;
}
if (string.IsNullOrEmpty(noteAttr))
{
noteAttr = IdxPOdlSel == 0 ? currOdl.Note : currPodl.Note;
}
PzPallet = IdxPOdlSel == 0 ? currOdl.PzPallet : currPodl.PzPallet;
}
#endregion Private Methods
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2401.415</Version>
<Version>6.16.2401.416</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.2401.415</h4>
<h4>Versione: 6.16.2401.416</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2401.415
6.16.2401.416
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2401.415</version>
<version>6.16.2401.416</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>