In versamento se si versa una pedana già versata l'app crasha
permettere il versamento di un articolo non compatibile con gli ordini aperti dopo richiesta conferma precompilare input risorse da allocare in input qta mantenere fissa la qtaCnf in entrambe le direzioni di calcolo togliere popup di notifica versamento completato
This commit is contained in:
parent
08d332e2c6
commit
0dd662518e
@ -45,6 +45,7 @@ public class DBSettingsModel {
|
||||
private boolean flagPrintPackingListOnOrderClose;
|
||||
private boolean flagPrintEtichetteOnOrderClose;
|
||||
private int onNumCnfInputChanged = 1;
|
||||
private int onQtaTotInputChanged = 1;
|
||||
private boolean flagAccettazioneUseQtaOrd = false;
|
||||
private boolean flagPickLiberoAllowEmptyDest = false;
|
||||
|
||||
@ -309,6 +310,15 @@ public class DBSettingsModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getOnQtaTotInputChanged() {
|
||||
return onQtaTotInputChanged;
|
||||
}
|
||||
|
||||
public DBSettingsModel setOnQtaTotInputChanged(int onQtaTotInputChanged) {
|
||||
this.onQtaTotInputChanged = onQtaTotInputChanged;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getNotePerditaDocInterni() {
|
||||
return notePerditaDocInterni;
|
||||
}
|
||||
|
||||
@ -278,6 +278,10 @@ public class SettingsManager {
|
||||
.setGestName("PICKING")
|
||||
.setSection("SETUP")
|
||||
.setKeySection("ON_NUM_CNF_INPUT_CHANGED"));
|
||||
stbGestSetupList.add(new StbGestSetup()
|
||||
.setGestName("PICKING")
|
||||
.setSection("SETUP")
|
||||
.setKeySection("ON_QTA_TOT_INPUT_CHANGED"));
|
||||
stbGestSetupList.add(new StbGestSetup()
|
||||
.setGestName("PVM")
|
||||
.setSection("DOC_INTERNI")
|
||||
@ -339,6 +343,11 @@ public class SettingsManager {
|
||||
if (onNumCnfInputChanged != null) {
|
||||
dbSettingsModelIstance.setOnNumCnfInputChanged(onNumCnfInputChanged);
|
||||
}
|
||||
|
||||
Integer onQtaTotInputChanged = getValueFromList(list, "SETUP", "ON_QTA_TOT_INPUT_CHANGED", Integer.class);
|
||||
if (onQtaTotInputChanged != null) {
|
||||
dbSettingsModelIstance.setOnQtaTotInputChanged(onQtaTotInputChanged);
|
||||
}
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_PACKING_LIST_ON_CLOSE", codMdep, (value) -> {
|
||||
dbSettingsModelIstance.setFlagPrintPackingListOnOrderClose(value);
|
||||
|
||||
@ -28,6 +28,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||
import it.integry.integrywmsnative.databinding.ActivityProdDettaglioLineaBinding;
|
||||
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs.BottomSheetLineAction;
|
||||
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs.DialogStartProduction;
|
||||
@ -141,11 +142,28 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onSettingsRequest(ProdLineStatusDTO lineaProd) {
|
||||
BottomSheetLineAction.newInstance(lineaProd, this::requestResources, this::requestOrderChange, this::requestProductionStop, this::requestMaterialRecover, BarcodeManager::enable).show(getSupportFragmentManager(), "BottomSheetLineAction");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void confirmInconsistentDeposit(Runnable onConfirm) {
|
||||
this.runOnUiThread(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(
|
||||
Html.fromHtml("L'articolo che si vuole versare non è compatibile con nessun ordine presente sulla linea!"
|
||||
+ "<br /> <br/>" +
|
||||
"Vuoi versarlo comunque?"),
|
||||
null,
|
||||
onConfirm,
|
||||
() -> {
|
||||
onLoadingEnded();
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
).show(getSupportFragmentManager(), "confirmOrderClose");
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestQtaVersamento(MtbColr mtbColr,
|
||||
RunnableArgs<PickedQuantityDTO> onComplete) {
|
||||
@ -218,7 +236,7 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
||||
BarcodeManager.disable();
|
||||
this.runOnUiThread(() -> {
|
||||
|
||||
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il numero di risorse da allocare", qta -> {
|
||||
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il numero di risorse da allocare", this.hrNum.get(), "n. risorse", qta -> {
|
||||
this.onLoadingStarted();
|
||||
try {
|
||||
Integer hrNum = Integer.parseInt(qta);
|
||||
@ -279,6 +297,14 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showToast(String message, Runnable onComplete) {
|
||||
this.runOnUiThread(() -> {
|
||||
UtilityToast.showToast(message);
|
||||
onComplete.run();
|
||||
});
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
|
||||
@ -63,11 +63,10 @@ public class ProdDettaglioLineaViewModel {
|
||||
} else {
|
||||
if (mtbColt.getMtbColr().size() <= 0) {
|
||||
this.sendError(new Exception("E' stata scansionata una UL già vuota"));
|
||||
}
|
||||
onComplete.run();
|
||||
} else {
|
||||
this.sendOnLUSelected(mtbColt);
|
||||
}
|
||||
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
@ -92,7 +91,7 @@ public class ProdDettaglioLineaViewModel {
|
||||
this.colliMagazzinoRESTConsumer.createColloScaricoDaCarico(mtbColt, posizione,
|
||||
generatedMtbColt -> {
|
||||
this.sendOnLoadingEnded();
|
||||
this.mListener.successDialog("Versamento completato!", BarcodeManager::enable);
|
||||
this.mListener.showToast("Versamento completato!", BarcodeManager::enable);
|
||||
}, this::sendError);
|
||||
});
|
||||
});
|
||||
@ -103,7 +102,7 @@ public class ProdDettaglioLineaViewModel {
|
||||
if (ordini != null && ordini.size() > 0) {
|
||||
onComplete.run();
|
||||
} else {
|
||||
this.sendError(new Exception("Nessun ordine compatibile disponibile sulla linea selezionata"));
|
||||
this.mListener.confirmInconsistentDeposit(onComplete);
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
@ -219,10 +218,14 @@ public class ProdDettaglioLineaViewModel {
|
||||
|
||||
void successDialog(String message, Runnable onComplete);
|
||||
|
||||
void showToast(String message, Runnable onComplete);
|
||||
|
||||
void requestQtaVersamento(MtbColr mtbColr, RunnableArgs<PickedQuantityDTO> onComplete);
|
||||
|
||||
void onSettingsRequest(ProdLineStatusDTO lineaProd);
|
||||
|
||||
void confirmInconsistentDeposit(Runnable onConfirm);
|
||||
|
||||
void onLineStop();
|
||||
|
||||
void askForLUBarcode();
|
||||
|
||||
@ -112,7 +112,7 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
||||
BarcodeManager.disable();
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
|
||||
DialogSimpleInputHelper.makeInputDialog(requireContext(), "Inserisci il numero di risorse da allocare", qta -> {
|
||||
DialogSimpleInputHelper.makeInputDialog(requireContext(), "Inserisci il numero di risorse da allocare", prodLine.getQtaAllocate().toString(), "n. risorse", qta -> {
|
||||
this.onLoadingStarted();
|
||||
try {
|
||||
Integer hrNum = Integer.parseInt(qta);
|
||||
|
||||
@ -89,7 +89,6 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
private boolean mObservablesInitated = false;
|
||||
|
||||
private int mBarcodeScannerIstanceID;
|
||||
private boolean mFirstStart = true;
|
||||
private boolean mAbort = true;
|
||||
|
||||
|
||||
@ -185,9 +184,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
||||
this.onLoadingEnded();
|
||||
});
|
||||
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||
};
|
||||
|
||||
public void save() {
|
||||
@ -217,15 +214,13 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
||||
// if(!mFirstStart) {
|
||||
this.init();
|
||||
// mFirstStart = false;
|
||||
// }
|
||||
|
||||
int onNumCnfInputChanged = SettingsManager.iDB().getOnNumCnfInputChanged();
|
||||
int onQtaTotInputChanged = SettingsManager.iDB().getOnQtaTotInputChanged();
|
||||
|
||||
this.mViewModel.setListener(this);
|
||||
this.mViewModel.init(onNumCnfInputChanged);
|
||||
this.mViewModel.init(onNumCnfInputChanged, onQtaTotInputChanged);
|
||||
}
|
||||
|
||||
private void initViewObservables() {
|
||||
|
||||
@ -70,6 +70,7 @@ public class DialogInputQuantityV2ViewModel {
|
||||
private boolean canOverflowOrderQuantity;
|
||||
private boolean canPartitaMagBeChanged;
|
||||
private int onNumCnfInputChanged;
|
||||
private int onQtaTotInputChanged;
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
@ -80,8 +81,9 @@ public class DialogInputQuantityV2ViewModel {
|
||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||
}
|
||||
|
||||
public void init(int onNumCnfInputChanged) {
|
||||
public void init(int onNumCnfInputChanged, int onQtaTotInputChanged) {
|
||||
this.onNumCnfInputChanged = onNumCnfInputChanged;
|
||||
this.onQtaTotInputChanged = onQtaTotInputChanged;
|
||||
|
||||
if (this.initialNumCnf != null && this.initialQtaTot != null && this.initialQtaCnf != null) {
|
||||
this.internalNumCnf = this.initialNumCnf;
|
||||
@ -379,10 +381,22 @@ public class DialogInputQuantityV2ViewModel {
|
||||
}
|
||||
|
||||
|
||||
switch (onNumCnfInputChanged) {
|
||||
case UPDATE_QTA_CNF:
|
||||
if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalNumCnf != null)
|
||||
this.internalQtaCnf = UtilityBigDecimal.divide(newValue, internalNumCnf);
|
||||
else if (!this.blockedNumCnf.get() && this.internalQtaCnf != null)
|
||||
this.internalNumCnf = UtilityBigDecimal.divide(newValue, internalQtaCnf);
|
||||
break;
|
||||
|
||||
case UPDATE_QTA_TOT:
|
||||
if (!this.blockedNumCnf.get() && this.internalQtaCnf != null)
|
||||
this.internalNumCnf = UtilityBigDecimal.divide(newValue, internalQtaCnf);
|
||||
else if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalNumCnf != null)
|
||||
this.internalQtaCnf = UtilityBigDecimal.divide(newValue, internalNumCnf);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
this.mListener.onDataChanged();
|
||||
}
|
||||
|
||||
@ -624,7 +624,6 @@
|
||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||
android:enabled="@{view.enabledQtaTot}"
|
||||
android:focusableInTouchMode="false"
|
||||
android:imeOptions="actionDone"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
@ -636,6 +635,7 @@
|
||||
android:hint="@string/tot_qty"
|
||||
android:inputType="number"
|
||||
android:selectAllOnFocus="true"
|
||||
android:imeOptions="actionDone"
|
||||
app:binding="@{view.currentQtaTot}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user