Merge branch 'develop' of https://gitlab.steamware.net/steamware/mapo-core into develop
This commit is contained in:
@@ -81,9 +81,6 @@ else
|
||||
}
|
||||
|
||||
<!-- FINE: MODIFICA FLUSSO -->
|
||||
|
||||
|
||||
|
||||
<!-- INIZIO: NUOVO DOSSIER -->
|
||||
@if (currRecordClone != null)
|
||||
{
|
||||
@@ -92,50 +89,70 @@ else
|
||||
<div class="card mb-5">
|
||||
<div class="card-header bg-primary text-light d-flex justify-content-between">
|
||||
<div>
|
||||
Modifica Parametro
|
||||
</div>
|
||||
<div>
|
||||
@if (isEditing)
|
||||
{
|
||||
<span class="text-light">PENDING CHANGES...</span>
|
||||
}
|
||||
Nuovo Dossier
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!--INIZIO PRIMA RIGA-->
|
||||
<div class="row">
|
||||
<div class="col-3 pe-0">
|
||||
<div class="col-4 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">ARTICOLO</span>
|
||||
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="currRecordClone.CodArticolo " @onclick="()=> enableEditing()">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">FASE</span>
|
||||
<select class="form-select">
|
||||
@*<option value="@tradFase(currRecordClone.OdlNav.KeyRichiesta)"></option>*@
|
||||
@if (ListGruppiFase != null)
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">MACCHINA</span>
|
||||
<select @bind="@currRecordClone.IdxMacchina" class="form-select" id="macchina" title="Selezionare la macchina" @onclick="()=> enableEditing()">
|
||||
@if (ListMacchine != null)
|
||||
{
|
||||
foreach (var item in ListGruppiFase)
|
||||
foreach (var item in ListMacchine)
|
||||
{
|
||||
<option value="@item.CodGruppo">@item.CodGruppo | @item.DescrGruppo</option>
|
||||
@if (item.IdxMacchina == currRecordClone.IdxMacchina)
|
||||
{
|
||||
|
||||
<option value="@item.IdxMacchina" selected>@item.IdxMacchina | @item.Descrizione</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@item.IdxMacchina">@item.IdxMacchina | @item.Descrizione</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 pe-0">
|
||||
<div class="col-4 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">MACCHINA</span>
|
||||
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="currRecordClone.IdxMacchina ">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">FASE</span>
|
||||
<select class="form-select" @bind="@currRecordClone.KeyRichiesta" @onclick="()=> enableEditing()" title="Selezionare la fase">
|
||||
<option value="@tradFase(@currRecordClone.KeyRichiesta)" selected>@tradFase(@currRecordClone.KeyRichiesta)</option>
|
||||
@if (ListStati != null)
|
||||
{
|
||||
foreach (var item in ListStati)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
|
||||
<div class="col-4 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">DATA</span>
|
||||
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="currRecordClone.DtRif">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm" @onclick="()=> enableEditing()">ARTICOLI</span>
|
||||
|
||||
<select @bind="@currRecordClone.CodArticolo" class="form-select" id="macchina" title="Selezionare l'articolo">
|
||||
@if (ListArticoli != null)
|
||||
{
|
||||
foreach (var item in ListArticoli)
|
||||
{
|
||||
@if (item.CodArticolo == currRecordClone.CodArticolo)
|
||||
{
|
||||
<option value="@item.CodArticolo" selected>@item.CodArticolo | @item.DescArticolo</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@item.CodArticolo">@item.CodArticolo | @item.DescArticolo</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -179,7 +196,14 @@ else
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<button @onclick="() => closeTableFlux()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
||||
<div class="text-nowrap">
|
||||
|
||||
@if (currRecord != null)
|
||||
{
|
||||
<button @onclick="() => closeTableFlux()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
||||
<button @onclick="()=> cloneRecord(currRecord)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>
|
||||
}
|
||||
</div>
|
||||
</th>
|
||||
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
||||
<th><i class="fa-solid fa-screwdriver-wrench"></i> Fase</th>
|
||||
@@ -199,7 +223,7 @@ else
|
||||
<!--SEL RECORD PER VISUALIZZAZIONE FLUSSI-->
|
||||
<button class="btn btn-primary btn-sm" @onclick="() => selRecord(record)"><i class="fa-solid fa-magnifying-glass"></i></button>
|
||||
<!--SEL RECORD PER CLONA DOSSIER-->
|
||||
<button @onclick="()=> cloneRecord(record)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>
|
||||
@*<button @onclick="()=> cloneRecord(record)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>*@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -215,7 +239,7 @@ else
|
||||
</td>
|
||||
<td>
|
||||
@record.IdxMacchina
|
||||
<div class="small textConsensed text-secondary">@record.MachineNav.Descrizione</div>
|
||||
@*<div class="small textConsensed text-secondary">@record.MachineNav.Descrizione</div>*@
|
||||
</td>
|
||||
<td>
|
||||
@record.DtRif
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.EntityFrameworkCore.Query.Internal;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.DTO;
|
||||
@@ -41,7 +42,30 @@ namespace MP.SPEC.Components
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
private bool selectFirst(string idxMacchina)
|
||||
{
|
||||
//string firstMacchina = "";
|
||||
bool answ = false;
|
||||
if (ListMacchine != null)
|
||||
{
|
||||
if (idxMacchina == idxMacchina)
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = false;
|
||||
}
|
||||
|
||||
//var rawData = ListMacchine.Select(x => x.IdxMacchina).FirstOrDefault();
|
||||
//firstMacchina = rawData != null ? rawData : "";
|
||||
}
|
||||
//if (firstMacchina == idxMacchina)
|
||||
//{
|
||||
// answ = true;
|
||||
//}
|
||||
return answ;
|
||||
}
|
||||
public string checkSelPar(FluxLogDTO recordSel)
|
||||
{
|
||||
string answ = "";
|
||||
@@ -112,8 +136,9 @@ namespace MP.SPEC.Components
|
||||
// creo record duplicato...
|
||||
DossierModel newRec = new DossierModel()
|
||||
{
|
||||
IdxDossier = 0,
|
||||
//IdxDossier = 0,
|
||||
DataType = selRec.DataType,
|
||||
KeyRichiesta = selRec.KeyRichiesta,
|
||||
DtRif = DateTime.Now,
|
||||
IdxMacchina = selRec.IdxMacchina,
|
||||
CodArticolo = selRec.CodArticolo,
|
||||
@@ -158,17 +183,43 @@ namespace MP.SPEC.Components
|
||||
if (currRecordClone != null)
|
||||
{
|
||||
// serializzo valore x flux log...
|
||||
|
||||
DossierFluxLogDTO? valoreDeserializzato = JsonConvert.DeserializeObject<DossierFluxLogDTO>(selRec.Valore);
|
||||
if (valoreDeserializzato != null)
|
||||
{
|
||||
|
||||
listaFlux = valoreDeserializzato
|
||||
.ODL
|
||||
.OrderBy(x => x.CodFlux)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
if (listaFlux != null)
|
||||
{
|
||||
foreach (var item in listaFlux)
|
||||
{
|
||||
item.IdxMacchina = selRec.IdxMacchina;
|
||||
item.Valore = "0";
|
||||
item.dtEvento = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
DossierFluxLogDTO updatedResult = new DossierFluxLogDTO() { ODL = listaFlux };
|
||||
string newVal = JsonConvert.SerializeObject(updatedResult);
|
||||
// preparo x insert
|
||||
currRecordClone.DtRif = DateTime.Now;
|
||||
currRecordClone.IdxMacchina = selRec.IdxMacchina;
|
||||
currRecordClone.CodArticolo = selRec.CodArticolo;
|
||||
currRecordClone.KeyRichiesta = selRec.KeyRichiesta;
|
||||
currRecordClone.Valore = newVal;
|
||||
// METODO PER UPDATE FLUX
|
||||
await MDService.DossiersInsert(currRecordClone);
|
||||
//await reloadData(true);
|
||||
currRecordClone = null;
|
||||
isEditing = false;
|
||||
await Task.Delay(1);
|
||||
StateHasChanged();
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -177,7 +228,7 @@ namespace MP.SPEC.Components
|
||||
currRecordClone = null;
|
||||
await Task.Delay(1);
|
||||
// TOGLIERE!!!!!
|
||||
await JSRuntime.InvokeAsync<bool>("location.reload");
|
||||
NavManager.NavigateTo("DOSS", true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,6 +236,8 @@ namespace MP.SPEC.Components
|
||||
{
|
||||
ListGruppiFase = await MDService.ElencoGruppiFase();
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
ListArticoli = await MDService.ArticoliGetSearch(100000, "BAGLIETTO", "");
|
||||
ListMacchine = await MDService.MacchineGetAll();
|
||||
await reloadData(true);
|
||||
}
|
||||
|
||||
@@ -271,6 +324,10 @@ namespace MP.SPEC.Components
|
||||
|
||||
private List<DossierModel>? SearchRecords;
|
||||
|
||||
private List<Macchine>? ListMacchine;
|
||||
|
||||
private List<AnagArticoli>? ListArticoli;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
@@ -350,6 +407,7 @@ namespace MP.SPEC.Components
|
||||
{
|
||||
currFluxLogDto = null;
|
||||
currRecord = null;
|
||||
currRecordClone = null;
|
||||
visualizzaFlux = true;
|
||||
isEditing = false;
|
||||
await RecordSelFlux.InvokeAsync(currFluxLogDto);
|
||||
|
||||
Reference in New Issue
Block a user