Update x gestione ODL
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
<button class="btn btn-warning w-100" @onclick="toggleFixOdl"><i class="fa fa-check"></i> @txtBtnFixOdl</button>
|
||||
@if (forceOdl)
|
||||
@if (showFixOdl)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -11,7 +11,22 @@
|
||||
...tabella...
|
||||
</div>
|
||||
<div class="col-8">
|
||||
cerca/selezione ODL (miei/tutti)
|
||||
<div class="input-group input-group-lg">
|
||||
<input type="text" class="form-control w-25" placeholder="Cerca" aria-label="Cerca">
|
||||
<select class="form-select w-50" @bind="IdxOdlSel">
|
||||
@* <option disabled>Selezionare P.ODL</option> *@
|
||||
@foreach (var item in ListODL)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
</select>
|
||||
<div class="input-group-text">
|
||||
<input class="form-check-input mt-0 me-1" id="chk_all" type="checkbox" @bind="ShowAll">
|
||||
<label class="form-check-label" for="" chk_all">
|
||||
Tutti
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button calss="btn btn-lg btn-warning"><i class="fa-solid fa-plus"></i> Imposta ODL</button>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB_SERV.Components
|
||||
{
|
||||
@@ -8,29 +9,92 @@ namespace MP_TAB_SERV.Components
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public MappaStatoExpl? RecMSE { get; set; } = null;
|
||||
public string IdxMaccPar { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected string txtBtnFixOdl { get => forceOdl ? "Fix ODL" : "Nascondi Fix"; }
|
||||
protected List<vSelOdlModel> ListODL { get; set; } = new List<vSelOdlModel>();
|
||||
|
||||
protected bool ShowAll
|
||||
{
|
||||
get => showAll;
|
||||
set
|
||||
{
|
||||
if (showAll != value)
|
||||
{
|
||||
showAll = value;
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
await ReloadData();
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TabDServ { get; set; } = null!;
|
||||
|
||||
protected string txtBtnFixOdl { get => showFixOdl ? "Nascondi Fix" : "Fix ODL"; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected void toggleFixOdl()
|
||||
{
|
||||
forceOdl = !forceOdl;
|
||||
showFixOdl = !showFixOdl;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private bool forceOdl = false;
|
||||
private bool showAll = false;
|
||||
private bool showFixOdl = true;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private int numDayOdl { get; set; } = 30;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(IdxMaccPar))
|
||||
{
|
||||
ListODL = await TabDServ.VSOdlGetUnused(IdxMaccPar, ShowAll, numDayOdl);
|
||||
}
|
||||
}
|
||||
protected int IdxOdlSel
|
||||
{
|
||||
get => idxOdlSel;
|
||||
set
|
||||
{
|
||||
if (idxOdlSel != value)
|
||||
{
|
||||
idxOdlSel = value;
|
||||
//var pUpd = Task.Run(async () =>
|
||||
//{
|
||||
// await ReloadData(true);
|
||||
//});
|
||||
//pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int idxOdlSel { get; set; } = 0;
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -12,87 +12,91 @@
|
||||
@if (!odlOk)
|
||||
{
|
||||
<div class="col-12">
|
||||
<FixOdl RecMSE="RecMSE"></FixOdl>
|
||||
<FixOdl IdxMaccPar="@IdxMaccParent"></FixOdl>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<div class="col-12">
|
||||
Slave machine man
|
||||
</div>
|
||||
<div class="col-12">
|
||||
Check articolo in revisione
|
||||
</div>
|
||||
@if (cancelSetupEnabled)
|
||||
else
|
||||
{
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-danger w-100">Annulla Setup ODL <i class="fa-solid fa-ban me-1"></i></button>
|
||||
<div class="col-12">
|
||||
Slave machine man
|
||||
</div>
|
||||
}
|
||||
<div class="col-12">
|
||||
Check articolo in revisione
|
||||
</div>
|
||||
@if (cancelSetupEnabled)
|
||||
{
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-danger w-100">Annulla Setup ODL <i class="fa-solid fa-ban me-1"></i></button>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
<div class="d-flex justify-content-between flex-wrap">
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<div class="input-group input-group-lg">
|
||||
<input type="text" class="form-control w-25" placeholder="Cerca" aria-label="Cerca">
|
||||
<select class="form-select w-50">
|
||||
<option disabled>Selezionare P.ODL</option>
|
||||
@foreach (var item in ListODL)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
</select>
|
||||
<div class="input-group-text">
|
||||
<input class="form-check-input mt-0 me-1" id="chk_all" type="checkbox" @bind="ShowAll">
|
||||
<label class="form-check-label" for="" chk_all">
|
||||
Tutti
|
||||
</label>
|
||||
<div class="d-flex justify-content-between flex-wrap">
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<div class="input-group input-group-lg">
|
||||
<input type="text" class="form-control w-25" placeholder="Cerca" aria-label="Cerca">
|
||||
<select class="form-select w-50" @bind="IdxOdlSel">
|
||||
<option disabled>Selezionare P.ODL</option>
|
||||
@foreach (var item in ListODL)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
</select>
|
||||
<div class="input-group-text">
|
||||
<input class="form-check-input mt-0 me-1" id="chk_all" type="checkbox" @bind="ShowAll">
|
||||
<label class="form-check-label" for="" chk_all">
|
||||
Tutti
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-outline-warning w-100" disabled="@isInAttr" @onclick="togOdlDetail"><i class="fa-solid fa-star me-1"></i> Dettaglio ODL</button>
|
||||
@if (podlOk)
|
||||
{
|
||||
<button class="btn btn-lg btn-primary w-100"><i class="fa-solid fa-check me-1"></i> INIZIO Attrezzaggio</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@if (showOdlDetail)
|
||||
{
|
||||
<p>...dettaglio ODL...</p>
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div class="d-flex justify-content-between flex-wrap">
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-warning w-100" disabled="@needConfProd"><i class="fa-solid fa-check me-1"></i> FINE Attr / INIZIO Prod.</button>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-primary w-100" disabled="@needConfProd"><i class="fa-solid fa-ban me-1"></i>FINE Produzione</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex justify-content-between flex-wrap">
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-info w-100" disabled="@needConfProd"><i class="fa-solid fa-triangle-exclamation me-1"></i> Mostra Riattrezzaggio</button>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<div class="form-check form-switch fs-3">
|
||||
<input class="form-check-input" type="checkbox" @bind="@forceCloseOdl">
|
||||
<label class="form-check-label">@Traduci("ForceCloseODL")</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-outline-warning w-100" disabled="@isInAttr" @onclick="togOdlDetail"><i class="fa-solid fa-star me-1"></i> Dettaglio ODL</button>
|
||||
@if (podlOk)
|
||||
{
|
||||
<button class="btn btn-lg btn-primary w-100"><i class="fa-solid fa-check me-1"></i> INIZIO Attrezzaggio</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@if (showOdlDetail)
|
||||
{
|
||||
<p>...dettaglio ODL...</p>
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div class="d-flex justify-content-between flex-wrap">
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-warning w-100" disabled="@needConfProd"><i class="fa-solid fa-check me-1"></i> FINE Attr / INIZIO Prod.</button>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-primary w-100" disabled="@needConfProd"><i class="fa-solid fa-ban me-1"></i>FINE Produzione</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex justify-content-between flex-wrap">
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-info w-100" disabled="@needConfProd"><i class="fa-solid fa-triangle-exclamation me-1"></i> Mostra Riattrezzaggio</button>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<div class="form-check form-switch fs-3">
|
||||
<input class="form-check-input" type="checkbox" @bind="@forceCloseOdl">
|
||||
<label class="form-check-label">@Traduci("ForceCloseODL")</label>
|
||||
<div class="d-flex justify-content-between flex-wrap">
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-success w-100" disabled="@needConfProd"><i class="fa-solid fa-wrench me-1"></i> Fix Chiusura Arttrezzaggio (PLC)</button>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-danger w-100" disabled="@needConfProd"><i class="fa-solid fa-circle-exclamation me-1"></i> Creazione ODL Provvisorio</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex justify-content-between flex-wrap">
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-success w-100" disabled="@needConfProd"><i class="fa-solid fa-wrench me-1"></i> Fix Chiusura Arttrezzaggio (PLC)</button>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-danger w-100" disabled="@needConfProd"><i class="fa-solid fa-circle-exclamation me-1"></i> Creazione ODL Provvisorio</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -24,34 +24,13 @@ namespace MP_TAB_SERV.Components
|
||||
|
||||
protected bool forceCloseOdl = true;
|
||||
|
||||
protected PzProdModel? prodMacchina = null;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce il codice IdxMacchina dell'impianto PARENT (se multi) altrimenti la stessa macchina...
|
||||
/// </summary>
|
||||
protected string idxMaccParent
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
// se è multi controllo
|
||||
if (isMulti)
|
||||
{
|
||||
// verifico se SIA una tavola (ha char "#")
|
||||
int iSharp = IdxMaccSel.IndexOf('#');
|
||||
if (iSharp > 0)
|
||||
{
|
||||
// sistemo nome
|
||||
answ = IdxMaccSel.Substring(0, iSharp);
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected List<vSelOdlModel> ListODL { get; set; } = new();
|
||||
protected List<vSelOdlModel> ListODL { get; set; } = new List<vSelOdlModel>();
|
||||
|
||||
[Inject]
|
||||
protected SharedMemService MServ { get; set; } = null!;
|
||||
@@ -103,6 +82,26 @@ namespace MP_TAB_SERV.Components
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce il codice IdxMacchina dell'impianto PARENT (se multi) altrimenti la stessa macchina...
|
||||
/// </summary>
|
||||
protected string getIdxMaccParent()
|
||||
{
|
||||
string answ = IdxMaccSel;
|
||||
// se è multi controllo
|
||||
if (isMulti)
|
||||
{
|
||||
// verifico se SIA una tavola (ha char "#")
|
||||
int iSharp = IdxMaccSel.IndexOf('#');
|
||||
if (iSharp > 0)
|
||||
{
|
||||
// sistemo nome
|
||||
answ = IdxMaccSel.Substring(0, iSharp);
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
baseLang = SMServ.GetConf("baseLang");
|
||||
@@ -110,13 +109,12 @@ namespace MP_TAB_SERV.Components
|
||||
if (RecMSE != null)
|
||||
{
|
||||
IdxMaccSel = RecMSE.IdxMacchina;
|
||||
IdxMaccParent = getIdxMaccParent();
|
||||
await ReloadData(true);
|
||||
}
|
||||
checkAll();
|
||||
}
|
||||
|
||||
protected PzProdModel? prodMacchina = null;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
isMulti = MServ.DictMacchMulti[RecMSE?.IdxMacchina] == 1;
|
||||
@@ -147,24 +145,58 @@ namespace MP_TAB_SERV.Components
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private string baseLang = "IT";
|
||||
|
||||
private bool cancelSetupEnabled = false;
|
||||
|
||||
private string IdxMaccSel = "";
|
||||
|
||||
private bool isInAttr = false;
|
||||
|
||||
private bool isInProd = false;
|
||||
|
||||
private bool isMulti = false;
|
||||
private bool isSlave = false;
|
||||
|
||||
private bool isProcessing = false;
|
||||
|
||||
private bool isSlave = false;
|
||||
|
||||
private int numDayOdl = 5;
|
||||
|
||||
private bool podlOk = false;
|
||||
|
||||
private bool showAll = false;
|
||||
|
||||
private bool showOdlDetail = false;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Variabile idxMacc parent x selezione ODL
|
||||
/// </summary>
|
||||
private string IdxMaccParent { get; set; } = "";
|
||||
|
||||
protected int IdxOdlSel
|
||||
{
|
||||
get => idxOdlSel;
|
||||
set
|
||||
{
|
||||
if(idxOdlSel != value) {
|
||||
idxOdlSel = value;
|
||||
//var pUpd = Task.Run(async () =>
|
||||
//{
|
||||
// await ReloadData(true);
|
||||
//});
|
||||
//pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int idxOdlSel { get; set; } = 0;
|
||||
private int IdxOdl
|
||||
{
|
||||
get => RecMSE != null ? RecMSE.IdxOdl ?? 0 : 0;
|
||||
@@ -213,9 +245,9 @@ namespace MP_TAB_SERV.Components
|
||||
/// </summary>
|
||||
private void checkConfProd()
|
||||
{
|
||||
#if false
|
||||
// verifica se sia necessario confermare produzione
|
||||
int pz2conf = 0;
|
||||
#if false
|
||||
DS_ProdTempi.stp_PzProd_getByMacchinaRow rigaProd;
|
||||
try
|
||||
{
|
||||
@@ -250,7 +282,6 @@ namespace MP_TAB_SERV.Components
|
||||
mod_ODL1.isEnabled = !needConfProd;
|
||||
#endif
|
||||
}
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private async Task ReloadData(bool forceReload)
|
||||
{
|
||||
@@ -263,7 +294,7 @@ namespace MP_TAB_SERV.Components
|
||||
}
|
||||
if (!string.IsNullOrEmpty(IdxMaccSel))
|
||||
{
|
||||
ListODL = await TabDServ.VSOdlGetUnused(idxMaccParent, ShowAll, numDayOdl);
|
||||
ListODL = await TabDServ.VSOdlGetUnused(IdxMaccParent, ShowAll, numDayOdl);
|
||||
Log.Trace($"found {ListODL.Count} rec");
|
||||
if (forceReload)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>6.16.2311.615</Version>
|
||||
<Version>6.16.2311.616</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB_SERV</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2311.615</h4>
|
||||
<h4>Versione: 6.16.2311.616</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2311.615
|
||||
6.16.2311.616
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2311.615</version>
|
||||
<version>6.16.2311.616</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user