diff --git a/MP-TAB3/Components/OdlMan.razor b/MP-TAB3/Components/OdlMan.razor index 6f9ae2a4..98fee4f9 100644 --- a/MP-TAB3/Components/OdlMan.razor +++ b/MP-TAB3/Components/OdlMan.razor @@ -211,7 +211,7 @@ } - @if (!inAttr) + @if (!inAttr && !showSplitOdlRiattr) {
@if (idxPOdlSel > 0) @@ -242,7 +242,7 @@
} - @if (idxPOdlSel > 0 || inAttr) + @if (idxPOdlSel > 0 || inAttr || showSplitOdlRiattr) {
@@ -274,7 +274,7 @@ } else { - if (odlOk && showChkCloseOdlVal) + if (odlOk && showChkCloseOdlVal && !showSplitOdlRiattr) {
@@ -284,42 +284,34 @@
} } + @if (enableRiattrezzaggio) + { +
+ @if (showSplitOdlRiattr) + { + + } + else + { + + } +
+ } @if (!inAttr && enableFixSetup) {
} - @if (enableRiattrezzaggio) - { + @* @if (showOdlProvv) + { -
- -
- } - @if (showOdlProvv) - { - -
- -
- } - @*
-
-
-
-
- <%: lblCreaOdl %> +
+
-
-
-
- -
-
-
*@ + } *@
- @lblOut + @((MarkupString)lblOut)
} } diff --git a/MP-TAB3/Components/OdlMan.razor.cs b/MP-TAB3/Components/OdlMan.razor.cs index 01000171..30af706d 100644 --- a/MP-TAB3/Components/OdlMan.razor.cs +++ b/MP-TAB3/Components/OdlMan.razor.cs @@ -465,7 +465,6 @@ namespace MP_TAB3.Components // reset vari IdxPOdlSel = 0; inAttr = false; - IdxPOdlSel = 0; RecMSE = null; // faccio refresh e riporto await RefreshData(); @@ -474,8 +473,6 @@ namespace MP_TAB3.Components // chiudo update... isProcessing = false; await InvokeAsync(StateHasChanged); - // qui rimando a pag principale... - //NavMan.NavigateTo("status-map", true); } /// @@ -676,7 +673,6 @@ namespace MP_TAB3.Components // refresh finale var tmpTCR = tcRichAttr; - checkBtnStatus(); // faccio refresh e riporto await TabDServ.FlushOdlCache(); IdxPOdlSel = 0; @@ -916,6 +912,82 @@ namespace MP_TAB3.Components } } + protected async Task ShowRiattrezzaggio() + { + showSplitOdlRiattr = !showSplitOdlRiattr; + await ReloadXDL(true); + if (tcRichAttr == 0) + { + tcRichAttr = currPodl.Tcassegnato; + } + if(string.IsNullOrEmpty(noteAttr)) + { + noteAttr = currOdl.Note; + } + } + + protected async Task SplitOdl() + { + if (!await JSRuntime.InvokeAsync("confirm", $"Confermi richiesta riattrezzaggio ODL, con conseguente chiusura ODL corrente + split nuovo ODL con TC {tcRichAttr:N3}?")) + return; + + // preparo gestione progress display + MaxVal = 9; + int currStep = 0; + await advStep(currStep); + isProcessing = true; + + // se vedesse TCRich a zero lo reimposta a quello assegnato... + if (tcRichAttr == 0) + { + tcRichAttr = currPodl.Tcassegnato; + } + // leggo idxOdl da ultimo odl attivo x macchina + var currOdl = await TabDServ.OdlCurrByMacc(IdxMaccSel, false); + int idxODLSplit = currOdl.IdxOdl; + int idxEvento = 1; // !!!HARD CODED + await advStep(currStep++); + + // confermo prod vecchio ODL + await confermaProdOdl(false); + await advStep(currStep++); + + // effettuo split su nuovo ODL + await TabDServ.OdlSplit(idxODLSplit, MatrOpr, IdxMaccSel, tcRichAttr, PzPallet, noteAttr, true, 0); + await advStep(currStep++); + // se c'è gestione SchedaTecnica --> chiamo procedura update x lotti + if (enableSchedaTecnica) + { + await TabDServ.ElencoLottiUpsertByOdl(idxODLSplit, true); + } + await advStep(currStep++); + + + // invio email! + await advStep(currStep++); + // processo chiusura setup + string evText = "Registrato Riattrezzaggio ODL (old :{0})"; + StringBuilder sb = new StringBuilder(); + sb.AppendLine(String.Format(evText, idxODLSplit)); + await processaEvento(IdxMaccSel, idxEvento, sb.ToString(), idxODLSplit); + await advStep(currStep++); + // update buttons... + checkAll(); + // reset vari + IdxPOdlSel = 0; + inAttr = false; + RecMSE = null; + await advStep(currStep++); + // faccio refresh e riporto + await RefreshData(); + await CheckAttr(); + await advStep(currStep++); + // chiudo update... + isProcessing = false; + await InvokeAsync(StateHasChanged); + } + + protected async Task SendWarnTcChangeReq(int idxOdl, decimal tcAss, decimal tcRich) { // carico altri parametri email... @@ -1050,6 +1122,7 @@ namespace MP_TAB3.Components private bool showOdlProvv = false; private bool showReopenOdlTav = false; private bool showSplitOdlOnTav = false; + private bool showSplitOdlRiattr = false; #endregion Private Fields @@ -1295,133 +1368,6 @@ namespace MP_TAB3.Components } } - /// - /// controlla stato bottoni abilitato - /// - private void checkBtnStatus() - { -#if false - // di default rendo abilitato / disabilitato tutto in base al valore "isEnabled" - lbtShowSplitODL.Enabled = isEnabled && enableRiattrezzaggio; - lbtSplitODL.Enabled = isEnabled; - - fixWCtrStatus(lbtShowSplitODL); - fixWCtrStatus(lbtSplitODL); - - // condizioni booleane - bool inAttr = false; - bool currHasOdl = false; - // controllo se la macchina è in attrezzaggio... - DS_applicazione.StatoMacchineRow rigaStato = null; - try - { - // se è multi controllo parent... - if (isMulti) - { - rigaStato = selData.mng.rigaStato(idxMaccParent); - inAttr = (rigaStato.IdxStato == 2 && tavHasOdl); - } - else - { - rigaStato = selData.mng.rigaStato(idxMacchinaFix); - if (rigaStato != null) - { - inAttr = (rigaStato.IdxStato == 2); - } - } - } - catch (Exception exc) - { - logger.lg.scriviLog(string.Format("Eccezione in recupero dati rigaStato! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); - } - - try - { - currHasOdl = DataLayerObj.taODL.getByMacchina(idxMacchinaFix)[0].IdxODL != 0; - } - catch (Exception exc) - { - logger.lg.scriviLog(string.Format("Eccezione in recupero dati currHasOdl! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); - } - // deve controllare abbia ODL o PROMESSE odl... - bool hasNewOdl = DataLayerObj.taSelOdlFree.getUnused(idxMacchinaFix, cmp_selPODL.checkAll, numDaySelOdl).Rows.Count > 1; - // sistemo buttons! - lbtStartAttr.Enabled = (isEnabled && (!inAttr && hasNewOdl)); - lbtEndProd.Enabled = (isEnabled && (!inAttr && currHasOdl)); - - // verifico condizioni annullamento setup - lbtAnnullaSetup.Visible = false; - if (isEnabled && enableAnnullaSetup && inAttr && enableSchedaTecnica) - { - // verifico condizione pz da confermare - var tabProd = DataLayerObj.taStatoProd.GetData(idxMacchinaSel, DateTime.Now); - if (tabProd != null && tabProd.Rows.Count > 0) - { - var rigaProd = tabProd[0]; - lbtAnnullaSetup.Visible = rigaProd.PzTotODL == 0; - } - } - - // controllo se ci sia da verificare scheda tecnica - if (enableSchedaTecnica) - { - var tabRichieste = DataLayerObj.taSTAR.getPendingByOdl(idxOdl); - bool okCheckST = tabRichieste.Count == 0; - if (okCheckST) - { - hlNeedStar.Visible = false; - lbtStartProd.Enabled = (isEnabled && inAttr); - } - else - { - hlNeedStar.Visible = (isEnabled && inAttr); - lbtStartProd.Enabled = false; - } - } - else - { - lbtStartProd.Enabled = (isEnabled && inAttr); - } - cmp_selPODL.Enabled = (isEnabled && (!inAttr && hasNewOdl)); - // sistemo anche come css.. - fixWCtrStatus(lbtStartAttr); - fixWCtrStatus(lbtStartProd); - fixWCtrStatus(lbtEndProd); - // sistemo show tempo/note attrezzaggio.. - if (inAttr) - { - showNoteTC(true); - int idxOdl = 0; - try - { - idxOdl = DataLayerObj.taODL.getByMacchina(idxMacchinaFix)[0].IdxODL; - updateTempoTc(idxOdl, inAttr); - updateNoteTC(idxOdl); - } - catch (Exception exc) - { - logger.lg.scriviLog(string.Format("Eccezione in recupero dati ODL! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); - } - } - - // verifico se l'articolo corrente sia in revisione x mostrare conferma modifica revisione... - if (CodArtSel != "") - { - bool showWarn = false; - try - { - showWarn = DataLayerObj.taAnagArt.getByCod(CodArtSel)[0].FlagIsNew; - } - catch (Exception exc) - { - logger.lg.scriviLog(string.Format("Eccezione in recupero dati showWarn! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); - } - divWarningArt.Visible = showWarn; - } -#endif - } - - /// /// verifica se sia necessario confermare la prod dell'ODL precedente prima di chiudere e lo /// fa in automatico... @@ -1554,7 +1500,6 @@ namespace MP_TAB3.Components lblOut = userMsg; // loggo USR MSG Log.Info(userMsg); - checkBtnStatus(); } private async Task ReloadData(bool forceReload) diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index e7711e4b..6d799a5f 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2312.2117 + 6.16.2312.2210 enable MP_TAB3 diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index 78418854..6b2e597d 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2312.2117

+

Versione: 6.16.2312.2210


Note di rilascio:
  • diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt index b7299495..4069099c 100644 --- a/MP-TAB3/Resources/VersNum.txt +++ b/MP-TAB3/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2312.2117 +6.16.2312.2210 diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml index 8adb6d92..2e54a70d 100644 --- a/MP-TAB3/Resources/manifest.xml +++ b/MP-TAB3/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2312.2117 + 6.16.2312.2210 https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html false