Update ODL come PODL
This commit is contained in:
@@ -444,6 +444,8 @@ namespace MP.Data.Controllers
|
||||
.DbSetODL
|
||||
.Where(x => ((inCorso && x.DataFine == null) || (!inCorso && x.DataFine != null)) && (x.KeyRichiesta.Contains(keyRichPart) || keyRichPart == "*") && (codArt == "*" || x.CodArticolo.Contains(codArt)))
|
||||
.AsNoTracking()
|
||||
.Include(m => m.MachineNav)
|
||||
.Include(a => a.ArticoloNav)
|
||||
.OrderBy(x => x.IdxOdl)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -33,6 +33,17 @@ namespace MP.Data.DatabaseModels
|
||||
[MaxLength(50)]
|
||||
public string CodCli { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Navigazione oggetto Machine
|
||||
/// </summary>
|
||||
[ForeignKey("IdxMacchina")]
|
||||
public virtual Macchine MachineNav { get; set; } = null!;
|
||||
/// <summary>
|
||||
/// Navigazione oggetto Articolo
|
||||
/// </summary>
|
||||
[ForeignKey("CodArticolo")]
|
||||
public virtual AnagArticoli ArticoloNav { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -20,12 +20,13 @@ else
|
||||
@*<button @onclick="() => resetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>*@
|
||||
</th>
|
||||
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
||||
<th><i class="fa-solid fa-screwdriver-wrench"></i> Fase</th>
|
||||
<th><i class="fa-solid fa-hard-drive"></i> Macchina</th>
|
||||
<th># pz</th>
|
||||
<th><i class="fa-solid fa-clock"></i> T.Ciclo</th>
|
||||
<th><i class="fa-solid fa-play"></i> Inizio</th>
|
||||
<th><i class="fa-solid fa-pen-to-square"></i> Note</th>
|
||||
<th><i class="fa-solid fa-code-pull-request"></i> Richiesta</th>
|
||||
@*<th><i class="fa-solid fa-code-pull-request"></i> Richiesta</th>*@
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -38,9 +39,12 @@ else
|
||||
</td>
|
||||
<td>
|
||||
@record.CodArticolo
|
||||
<div class="small textConsensed text-secondary">@record.ArticoloNav.DescArticolo</div>
|
||||
</td>
|
||||
<td>@tradFase(record.KeyRichiesta)</td>
|
||||
<td>
|
||||
@record.IdxMacchina
|
||||
<div class="small textConsensed text-secondary">@record.MachineNav.Descrizione</div>
|
||||
</td>
|
||||
<td>
|
||||
@record.NumPezzi
|
||||
@@ -52,7 +56,7 @@ else
|
||||
<div>@record.DataInizio</div>
|
||||
</td>
|
||||
<td>@record.Note</td>
|
||||
<td>@record.KeyRichiesta</td>
|
||||
@*<td>@record.KeyRichiesta</td>*@
|
||||
<td>
|
||||
@*@if (ArticoloDelEnabled(record.CodArticolo))
|
||||
{
|
||||
|
||||
@@ -11,8 +11,6 @@ namespace MP.SPEC.Components
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> PagerResetReq { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<int> updateRecordCount { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string StatoSel
|
||||
@@ -27,6 +25,9 @@ namespace MP.SPEC.Components
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> updateRecordCount { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
@@ -69,8 +70,9 @@ namespace MP.SPEC.Components
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void OnInitialized()
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
MessageService.EA_PageUpdated += MessageService_EA_PageUpdated;
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
}
|
||||
@@ -102,11 +104,9 @@ namespace MP.SPEC.Components
|
||||
#region Private Fields
|
||||
|
||||
private string _statoSel = "*";
|
||||
|
||||
private ODLModel? currRecord = null;
|
||||
|
||||
private List<ODLModel>? ListRecords;
|
||||
|
||||
private List<ListValues>? ListStati;
|
||||
private List<ODLModel>? SearchRecords;
|
||||
|
||||
#endregion Private Fields
|
||||
@@ -155,6 +155,20 @@ namespace MP.SPEC.Components
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private string tradFase(string codFase)
|
||||
{
|
||||
string answ = codFase;
|
||||
if (ListStati != null && ListStati.Count > 0)
|
||||
{
|
||||
var recSel = ListStati.FirstOrDefault(x => x.value == codFase);
|
||||
if (recSel != null)
|
||||
{
|
||||
answ = recSel.label;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user