Ok pagina OEE, da estendere...
This commit is contained in:
@@ -74,7 +74,7 @@ namespace MP.Stats.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
MessageService.ShowSearch = true;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace MP.Stats.Pages
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
numRecord = 10;
|
||||
MessageService.ShowSearch = true;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
+43
-50
@@ -12,63 +12,56 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body py-0">
|
||||
@if (currRecord != null)
|
||||
{
|
||||
@*<BasketEditor Basket="@currBasket" DataReset="ResetData" DataUpdated="UpdateData"></BasketEditor>*@
|
||||
}
|
||||
@if (totalCount == 0 || ListRecords == null || ListRecords.Count() == 0)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12 text-center py-3">
|
||||
<h3>loading data</h3>
|
||||
<i class="fas fa-spinner fa-spin fa-5x"></i>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12 table-secondary">
|
||||
<SelectionFilter SelFilter="currFilter" filterChanged="DoFilter"></SelectionFilter>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@*<th></th>*@
|
||||
<th>Data</th>
|
||||
<th>Turno</th>
|
||||
<th>Macchina</th>
|
||||
<th>Articolo</th>
|
||||
<th class="text-right">Durata</th>
|
||||
<th class="text-right">Pezzi</th>
|
||||
<th class="text-right">OEE %</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecords)
|
||||
@if (totalCount == 0 || ListRecords == null || ListRecords.Count() == 0)
|
||||
{
|
||||
<div class="col-12 text-center py-3">
|
||||
<h3>loading data</h3>
|
||||
<i class="fas fa-spinner fa-spin fa-5x"></i>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-12">
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@*<th></th>*@
|
||||
<th>Data</th>
|
||||
<th>Turno</th>
|
||||
<th>Macchina</th>
|
||||
<th>Articolo</th>
|
||||
<th class="text-right">Durata</th>
|
||||
<th class="text-right">Pezzi</th>
|
||||
<th class="text-right">OEE %</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr class="@checkSelect(record.DataRif, record.Turno, @record.IdxMacchina)">
|
||||
@*<td><button class="btn btn-sm btn-info" @onclick="() => Edit(record)"><span class="oi oi-pencil"></span></button> <button class="btn btn-sm btn-success" @onclick="() => ShowDocs(record)" title="Vai ai documenti"><span class="oi oi-document"></span></button></td>*@
|
||||
<td>
|
||||
<div>@record.DataRif.ToString("yyyy.MM.dd")</div>
|
||||
</td>
|
||||
<td>@record.Turno</td>
|
||||
<td>
|
||||
<div>@record.CodMacchina</div>
|
||||
<div class="small">@record.IdxMacchina</div>
|
||||
</td>
|
||||
<td>@record.CodArticolo</td>
|
||||
<td class="text-right">@record.TotPeriodo.ToString("N2")</td>
|
||||
<td class="text-right">@record.TotPz</td>
|
||||
<td class="text-right">@record.OEE.ToString("P2")</td>
|
||||
</tr>
|
||||
<tr class="@checkSelect(record.DataRif, record.Turno, @record.IdxMacchina)">
|
||||
<td>
|
||||
<div>@record.DataRif.ToString("yyyy.MM.dd")</div>
|
||||
</td>
|
||||
<td>@record.Turno</td>
|
||||
<td>
|
||||
<div>@record.CodMacchina</div>
|
||||
<div class="small">@record.IdxMacchina</div>
|
||||
</td>
|
||||
<td>@record.CodArticolo</td>
|
||||
<td class="text-right">@record.TotPeriodo.ToString("N2")</td>
|
||||
<td class="text-right">@record.TotPz</td>
|
||||
<td class="text-right">@record.OEE.ToString("P2")</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="card-footer py-1">
|
||||
<DataPager PageSize="@numRecord" currPage="@currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="@totalCount" />
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace MP.Stats.Pages
|
||||
|
||||
private MP.Data.DatabaseModels.TurniOee currRecord = null;
|
||||
|
||||
private MP.Data.DatabaseModels.TurniOee[] ListRecords;
|
||||
private List<MP.Data.DatabaseModels.TurniOee> ListRecords;
|
||||
|
||||
private List<MP.Data.DatabaseModels.TurniOee> SearchRecords;
|
||||
|
||||
@@ -61,9 +61,10 @@ namespace MP.Stats.Pages
|
||||
|
||||
private async Task reloadData()
|
||||
{
|
||||
SearchRecords = null;
|
||||
ListRecords = null;
|
||||
SearchRecords = await StatService.StatTurniOeeGetAllCached(currFilter, MessageService.SearchVal);
|
||||
//SearchRecords = await StatService.StatTurniOeeGetAll(currFilter.DateStart, currFilter.DateEnd, currFilter.IdxMacchina, currFilter.IdxOdl, currFilter.KeyRichiesta, currFilter.CodArticolo, MessageService.SearchVal);
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToArray();
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
@@ -92,7 +93,7 @@ namespace MP.Stats.Pages
|
||||
{
|
||||
numRecord = 10;
|
||||
currFilter = SelectData.Init(5, 7);
|
||||
MessageService.ShowSearch = true;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace MP.Stats.Pages
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
numRecord = 10;
|
||||
MessageService.ShowSearch = true;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace MP.Stats.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
MessageService.ShowSearch = true;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace MP.Stats.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
MessageService.ShowSearch = true;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user