Fix PODL
- paginazione - cambio num rec - sel fase
This commit is contained in:
@@ -10,6 +10,9 @@ namespace MP.SPEC.Components
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public SelectPOdlParams actFilter { get; set; } = new SelectPOdlParams();
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> PagerResetReq { get; set; }
|
||||
|
||||
@@ -38,7 +41,6 @@ namespace MP.SPEC.Components
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
@@ -52,13 +54,13 @@ namespace MP.SPEC.Components
|
||||
[Inject]
|
||||
protected IOApiService MpIoApiCall { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#if false
|
||||
[Inject]
|
||||
protected MessageService MsgService { get; set; } = null!;
|
||||
protected MessageService MsgService { get; set; } = null!;
|
||||
#endif
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task cloneRecord(PODLModel selRec)
|
||||
@@ -109,9 +111,9 @@ namespace MP.SPEC.Components
|
||||
#if false
|
||||
MsgService.EA_PageUpdated += MessageService_EA_PageUpdated;
|
||||
MsgService.EA_SearchUpdated += OnSeachUpdated;
|
||||
MsgService.EA_StatoSearch += MsgService_EA_StatoSearch;
|
||||
MsgService.EA_StatoSearch += MsgService_EA_StatoSearch;
|
||||
#endif
|
||||
//await FilterChanged.InvokeAsync(currFilter);
|
||||
//await FilterChanged.InvokeAsync(actFilter);
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
}
|
||||
|
||||
@@ -211,37 +213,38 @@ namespace MP.SPEC.Components
|
||||
private List<ListValues>? ListStati;
|
||||
|
||||
private List<PODLModel>? SearchRecords;
|
||||
private SelectPOdlParams currFilter { get; set; } = new SelectPOdlParams();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private int _totalCount { get; set; } = 0;
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => currFilter.CurrPage;
|
||||
set => currFilter.CurrPage = value;
|
||||
get => actFilter.CurrPage;
|
||||
set => actFilter.CurrPage = value;
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => currFilter.NumRec;
|
||||
set => currFilter.NumRec = value;
|
||||
get => actFilter.NumRec;
|
||||
set => actFilter.NumRec = value;
|
||||
}
|
||||
|
||||
private string SearchVal
|
||||
{
|
||||
get => string.IsNullOrEmpty(currFilter.SearchVal) ? "*" : currFilter.SearchVal;
|
||||
get => string.IsNullOrEmpty(actFilter.SearchVal) ? "*" : actFilter.SearchVal;
|
||||
}
|
||||
|
||||
private string StatoSel
|
||||
{
|
||||
get => currFilter.CodStato;
|
||||
set => currFilter.CodStato = value;
|
||||
get => actFilter.CodFase;
|
||||
set => actFilter.CodFase = value;
|
||||
}
|
||||
|
||||
private int _totalCount { get; set; } = 0;
|
||||
private int totalCount
|
||||
{
|
||||
get => _totalCount;
|
||||
@@ -327,22 +330,12 @@ namespace MP.SPEC.Components
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
private async void MessageService_EA_PageUpdated()
|
||||
{
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
//private async void MsgService_EA_StatoSearch()
|
||||
//{
|
||||
// await InvokeAsync(() =>
|
||||
// {
|
||||
// PagerResetReq.InvokeAsync(true);
|
||||
// //currPage = 1;
|
||||
// Task task = UpdateData();
|
||||
// StateHasChanged();
|
||||
// });
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// processa evento richiesto
|
||||
/// </summary>
|
||||
@@ -402,7 +395,7 @@ namespace MP.SPEC.Components
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -686,12 +686,8 @@ namespace MP.SPEC.Data
|
||||
else
|
||||
{
|
||||
dbResult = dbController.OdlGetCurrentByMacc(idxMacchina);
|
||||
//if (dbResult != null)
|
||||
//{
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(dbResult);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(3));
|
||||
//}
|
||||
rawData = JsonConvert.SerializeObject(dbResult);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(3));
|
||||
}
|
||||
if (dbResult == null)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace MP.SPEC.Data
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string CodStato { get; set; } = "*";
|
||||
public string CodFase { get; set; } = "*";
|
||||
public string IdxMacchina { get; set; } = "*";
|
||||
public int CurrPage { get; set; } = 1;
|
||||
public int NumRec { get; set; } = 10;
|
||||
@@ -36,7 +36,7 @@ namespace MP.SPEC.Data
|
||||
if (IsActive != item.IsActive)
|
||||
return false;
|
||||
|
||||
if (CodStato != item.CodStato)
|
||||
if (CodFase != item.CodStato)
|
||||
return false;
|
||||
|
||||
if (IdxMacchina != item.IdxMacchina)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2210.1815</Version>
|
||||
<Version>6.16.2210.1816</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="card mb-5">
|
||||
<div class="card-header table-primary">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="col-6">
|
||||
<div class="col-6 col-lg-8">
|
||||
<div class="d-flex">
|
||||
<div class="px-2">
|
||||
<h3><b>P</b>romesse <b>ODL</b></h3>
|
||||
@@ -17,9 +17,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="col-6 col-lg-4">
|
||||
<div class="input-group input-group-sm">
|
||||
<label class="input-group-text" for="maxRecord" title="Selezionare l'azienda da visualizzare"><i class="fa-solid fa-industry"></i></label>
|
||||
@*<label class="input-group-text" for="maxRecord" title="Selezionare l'azienda da visualizzare"><i class="fa-solid fa-industry"></i></label>
|
||||
<select @bind="@currAzienda" class="form-select" title="Selezionare l'azienda da visualizzare">
|
||||
@if (ListAziende != null)
|
||||
{
|
||||
@@ -28,9 +28,9 @@
|
||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</select>*@
|
||||
<label class="input-group-text" for="maxRecord" title="Selezionare la fase da visualizzare"><i class="fa-solid fa-screwdriver-wrench"></i></label>
|
||||
<select @bind="@selStato" class="form-select" title="Selezionare la fase da visualizzare">
|
||||
<select @bind="@currFase" class="form-select" title="Selezionare la fase da visualizzare">
|
||||
<option value="*">--- Tutti ---</option>
|
||||
@if (ListStati != null)
|
||||
{
|
||||
@@ -222,7 +222,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<ListPODL PagerResetReq="pgResetReq" RecordSel="@selRecord" updateRecordCount="UpdateTotCount"></ListPODL>
|
||||
<ListPODL PagerResetReq="pgResetReq" RecordSel="@selRecord" updateRecordCount="UpdateTotCount" actFilter="@currFilter"></ListPODL>
|
||||
}
|
||||
</div>
|
||||
<div class="card-footer py-1">
|
||||
|
||||
+19
-38
@@ -14,7 +14,6 @@ namespace MP.SPEC.Pages
|
||||
protected DataPager pagerODL;
|
||||
|
||||
protected bool reqNew = false;
|
||||
private SelectPOdlParams currFilter { get; set; } = new SelectPOdlParams();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
@@ -28,12 +27,7 @@ namespace MP.SPEC.Pages
|
||||
|
||||
[Inject]
|
||||
protected IOApiService MpIoApiCall { get; set; } = null!;
|
||||
#if false
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgService { get; set; } = null!;
|
||||
|
||||
#endif
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
@@ -109,7 +103,7 @@ namespace MP.SPEC.Pages
|
||||
var firstArt = ListArticoli.FirstOrDefault();
|
||||
currArticolo = firstArt != null ? firstArt.CodArticolo : "";
|
||||
}
|
||||
string codExt = $"{selStato}";
|
||||
string codExt = $"{currFase}";
|
||||
string codGruppo = "";
|
||||
if (ListGruppiFase != null && ListGruppiFase.Count > 0)
|
||||
{
|
||||
@@ -159,6 +153,11 @@ namespace MP.SPEC.Pages
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected void updateTotal(int newTotCount)
|
||||
{
|
||||
totalCount = newTotCount;
|
||||
}
|
||||
|
||||
protected void UpdateTotCount(int newTotCount)
|
||||
{
|
||||
totalCount = newTotCount;
|
||||
@@ -169,15 +168,10 @@ namespace MP.SPEC.Pages
|
||||
#region Private Fields
|
||||
|
||||
private PODLModel? _currRecord = null;
|
||||
|
||||
private List<AnagArticoli>? ListArticoli;
|
||||
|
||||
private List<AnagGruppi>? ListAziende;
|
||||
|
||||
private List<AnagGruppi>? ListGruppiFase;
|
||||
|
||||
private List<Macchine>? ListMacchine;
|
||||
|
||||
private List<ListValues>? ListStati;
|
||||
|
||||
#endregion Private Fields
|
||||
@@ -185,12 +179,11 @@ namespace MP.SPEC.Pages
|
||||
#region Private Properties
|
||||
|
||||
private string _artSearch { get; set; } = "";
|
||||
|
||||
private string _currAzienda { get; set; } = "*";
|
||||
|
||||
private bool addEnabled
|
||||
{
|
||||
get => selStato != "*";
|
||||
get => currFase != "*";
|
||||
}
|
||||
|
||||
private string artSearch
|
||||
@@ -216,7 +209,6 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
|
||||
private List<ConfigModel>? configData { get; set; } = null;
|
||||
|
||||
private string currArticolo { get; set; } = "";
|
||||
|
||||
private string currAzienda
|
||||
@@ -236,6 +228,8 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private SelectPOdlParams currFilter { get; set; } = new SelectPOdlParams();
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => currFilter.CurrPage;
|
||||
@@ -260,10 +254,17 @@ namespace MP.SPEC.Pages
|
||||
set => currFilter.NumRec = value;
|
||||
}
|
||||
|
||||
private string selStato
|
||||
private string currFase
|
||||
{
|
||||
get => currFilter.CodStato;
|
||||
set => currFilter.CodStato = value;
|
||||
get => currFilter.CodFase;
|
||||
set
|
||||
{
|
||||
if (!currFilter.CodFase.Equals(value))
|
||||
{
|
||||
currFilter.CodFase = value;
|
||||
currPage = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int totalCount
|
||||
@@ -272,11 +273,6 @@ namespace MP.SPEC.Pages
|
||||
set => currFilter.TotCount = value;
|
||||
}
|
||||
|
||||
protected void updateTotal(int newTotCount)
|
||||
{
|
||||
totalCount = newTotCount;
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
@@ -309,21 +305,6 @@ namespace MP.SPEC.Pages
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private async Task updateFilter(SelectPOdlParams newParams)
|
||||
{
|
||||
isLoading = true;
|
||||
await Task.Delay(1);
|
||||
currPage = 1;
|
||||
if (newParams.CurrPage == 0)
|
||||
{
|
||||
newParams.CurrPage = 1;
|
||||
}
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
currFilter = newParams;
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2210.1815</h4>
|
||||
<h4>Versione: 6.16.2210.1816</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2210.1815
|
||||
6.16.2210.1816
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2210.1815</version>
|
||||
<version>6.16.2210.1816</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user