Fix display anche x PODL
This commit is contained in:
@@ -55,8 +55,31 @@ else
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<div class="small"><b>ODL</b> @($"{record.IdxOdl:000000}")</div>
|
||||
<div class="small"><b>PODL</b> @($"{getPodl(record.IdxOdl):000000}")</div>
|
||||
<div class="small" style="width:7rem;">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
<b>ODL</b>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
@($"{record.IdxOdl.ToString(padCodXdl)}")
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
<b>PODL</b>
|
||||
</div>
|
||||
@if (getPodl(record.IdxOdl) > 0)
|
||||
{
|
||||
<div class="px-0">
|
||||
@($"{getPodl(record.IdxOdl).ToString(padCodXdl)}")
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>------</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
@record.CodArticolo
|
||||
|
||||
@@ -14,6 +14,9 @@ namespace MP.SPEC.Components
|
||||
[Parameter]
|
||||
public SelectOdlParams currFilter { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string padCodXdl { get; set; } = "0000";
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> PagerResetReq { get; set; }
|
||||
|
||||
@@ -122,6 +125,17 @@ namespace MP.SPEC.Components
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
protected int getPodl(int idxOdl)
|
||||
{
|
||||
int answ = 0;
|
||||
var pOdlData = MDService.PODL_getByOdl(idxOdl);
|
||||
if (pOdlData != null)
|
||||
{
|
||||
answ = pOdlData.IdxPromessa;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
@@ -253,17 +267,6 @@ namespace MP.SPEC.Components
|
||||
}
|
||||
}
|
||||
|
||||
protected int getPodl(int idxOdl)
|
||||
{
|
||||
int answ = 0;
|
||||
var pOdlData = MDService.PODL_getByOdl(idxOdl);
|
||||
if (pOdlData != null)
|
||||
{
|
||||
answ = pOdlData.IdxPromessa;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private bool hideSpenta { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -4,6 +4,7 @@ using MP.Data.DatabaseModels;
|
||||
using MP.SPEC.Data;
|
||||
using MP.SPEC.Services;
|
||||
using NLog;
|
||||
using StackExchange.Redis;
|
||||
|
||||
namespace MP.SPEC.Components
|
||||
{
|
||||
@@ -198,11 +199,19 @@ namespace MP.SPEC.Components
|
||||
await Task.Delay(1);
|
||||
await callSyncDb(selRec.IdxMacchina);
|
||||
await Task.Delay(1);
|
||||
|
||||
// svuoto memorie pagina...
|
||||
await MDService.FlushRedisCache();
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
currRecord = null;
|
||||
|
||||
@@ -527,6 +527,7 @@ namespace MP.SPEC.Data
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Elenco ultimi n record flux log dato macchina e flusso (ordinato x data registrazione)
|
||||
/// </summary>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ListODL PagerResetReq="pgResetReq" updateRecordCount="UpdateTotCount" currFilter="@currFilter"></ListODL>
|
||||
<ListODL PagerResetReq="pgResetReq" updateRecordCount="UpdateTotCount" currFilter="@currFilter" padCodXdl="@padCodXdl"></ListODL>
|
||||
</div>
|
||||
<div class="card-footer py-1">
|
||||
<DataPager @ref="pagerODL" PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace MP.SPEC.Pages
|
||||
{
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
ListMacchine = await MDService.MacchineWithFlux(currFilter.DtStart, currFilter.DtEnd);
|
||||
padCodXdl = await MDService.tryGetConfig("padCodXdl");
|
||||
}
|
||||
|
||||
protected async Task pgResetReq(bool doReset)
|
||||
@@ -112,6 +113,8 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private string padCodXdl { get; set; } = "00000";
|
||||
|
||||
protected void setDtMax()
|
||||
{
|
||||
// copio il filtro
|
||||
|
||||
+27
-23
@@ -80,7 +80,7 @@ namespace MP.SPEC.Pages
|
||||
if (currRec != null)
|
||||
{
|
||||
currAzienda = currRec.Valore;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
currAzienda = await MDService.tryGetConfig("AZIENDA");
|
||||
padCodXdl = await MDService.tryGetConfig("padCodXdl");
|
||||
@@ -96,7 +96,6 @@ namespace MP.SPEC.Pages
|
||||
pagerODL.resetCurrPage();
|
||||
}
|
||||
}
|
||||
private List<PODLModel>? SearchRecords;
|
||||
|
||||
/// <summary>
|
||||
/// Crea nuovo record e va in editing...
|
||||
@@ -154,6 +153,12 @@ namespace MP.SPEC.Pages
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected async Task toggleClosed()
|
||||
{
|
||||
hasOdl = !hasOdl;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected async Task update(PODLModel selRec)
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler salvare le modifiche?"))
|
||||
@@ -180,15 +185,20 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private PODLModel? _currRecord = null;
|
||||
private PODLModel? _currRecordControlli = null;
|
||||
private PODLModel currRecordControlli = new PODLModel();
|
||||
private List<AnagArticoli>? ListArticoli;
|
||||
private List<AnagGruppi>? ListAziende;
|
||||
private List<AnagGruppi>? ListGruppiFase;
|
||||
private List<Macchine>? ListMacchine;
|
||||
private List<ListValues>? ListStati;
|
||||
private List<PODLModel>? SearchRecords;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#if false
|
||||
private PODLModel? _currRecordControlli = null;
|
||||
#endif
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string _artSearch { get; set; } = "";
|
||||
@@ -216,24 +226,16 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task toggleClosed()
|
||||
{
|
||||
hasOdl = !hasOdl;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private string btnNewText
|
||||
{
|
||||
get => currArticolo == "" ? "Sel Articolo" : "Nuovo PODL";
|
||||
}
|
||||
|
||||
#if false
|
||||
private List<ConfigModel>? configData { get; set; } = null;
|
||||
private List<ConfigModel>? configData { get; set; } = null;
|
||||
#endif
|
||||
private string currArticolo { get; set; } = "";
|
||||
|
||||
private string padCodXdl { get; set; } = "00000";
|
||||
|
||||
private string currAzienda
|
||||
{
|
||||
get => _currAzienda;
|
||||
@@ -271,6 +273,17 @@ namespace MP.SPEC.Pages
|
||||
get => currFilter.CurrPage;
|
||||
set => currFilter.CurrPage = value;
|
||||
}
|
||||
|
||||
private PODLModel? currRecord
|
||||
{
|
||||
get => _currRecord;
|
||||
set
|
||||
{
|
||||
_currRecord = value;
|
||||
artSearch = value == null ? "" : value.CodArticolo;
|
||||
}
|
||||
}
|
||||
|
||||
private bool hasOdl
|
||||
{
|
||||
get => currFilter.hasOdl;
|
||||
@@ -281,18 +294,7 @@ namespace MP.SPEC.Pages
|
||||
currFilter.hasOdl = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private PODLModel? currRecord
|
||||
{
|
||||
get => _currRecord;
|
||||
set
|
||||
{
|
||||
_currRecord = value;
|
||||
artSearch = value == null ? "" : value.CodArticolo;
|
||||
}
|
||||
}
|
||||
private PODLModel currRecordControlli = new PODLModel();
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
@@ -302,6 +304,8 @@ namespace MP.SPEC.Pages
|
||||
set => currFilter.NumRec = value;
|
||||
}
|
||||
|
||||
private string padCodXdl { get; set; } = "00000";
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
get => currFilter.TotCount;
|
||||
|
||||
Reference in New Issue
Block a user