Finish v1.28.0(294)
This commit is contained in:
commit
4dd2ccdb13
11
.idea/deploymentTargetDropDown.xml
generated
11
.idea/deploymentTargetDropDown.xml
generated
@ -7,7 +7,16 @@
|
|||||||
<deviceKey>
|
<deviceKey>
|
||||||
<Key>
|
<Key>
|
||||||
<type value="SERIAL_NUMBER" />
|
<type value="SERIAL_NUMBER" />
|
||||||
<value value="20119B1E55" />
|
<value value="adb-R52T60AZ93A-MF0VBc._adb-tls-connect._tcp" />
|
||||||
|
</Key>
|
||||||
|
</deviceKey>
|
||||||
|
</Target>
|
||||||
|
<Target>
|
||||||
|
<type value="RUNNING_DEVICE_TARGET" />
|
||||||
|
<deviceKey>
|
||||||
|
<Key>
|
||||||
|
<type value="SERIAL_NUMBER" />
|
||||||
|
<value value="21088B8EFD" />
|
||||||
</Key>
|
</Key>
|
||||||
</deviceKey>
|
</deviceKey>
|
||||||
</Target>
|
</Target>
|
||||||
|
|||||||
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 290
|
def appVersionCode = 294
|
||||||
def appVersionName = '1.27.3'
|
def appVersionName = '1.28.0'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -27,11 +27,18 @@
|
|||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing" />
|
||||||
<activity android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
|
<activity
|
||||||
|
android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing" />
|
||||||
<activity android:name=".gest.contab_doc_interni.edit_form.DocInterniEditFormActivity"
|
<activity
|
||||||
|
android:name=".gest.prod_dettaglio_linea.ProdDettaglioLineaActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/Light"
|
||||||
|
android:windowSoftInputMode="adjustNothing" />
|
||||||
|
<activity
|
||||||
|
android:name=".gest.contab_doc_interni.edit_form.DocInterniEditFormActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing" />
|
||||||
|
|||||||
@ -41,6 +41,8 @@ import it.integry.integrywmsnative.gest.picking_resi.PickingResiComponent;
|
|||||||
import it.integry.integrywmsnative.gest.picking_resi.PickingResiModule;
|
import it.integry.integrywmsnative.gest.picking_resi.PickingResiModule;
|
||||||
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoComponent;
|
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoComponent;
|
||||||
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoModule;
|
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoModule;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.ProdDettaglioLineaComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.ProdDettaglioLineaModule;
|
||||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdComponent;
|
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdComponent;
|
||||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdModule;
|
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdModule;
|
||||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dialog_ask_mag_prossimita.DialogAskMagazzinoProssimitaComponent;
|
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dialog_ask_mag_prossimita.DialogAskMagazzinoProssimitaComponent;
|
||||||
@ -134,7 +136,8 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
DialogAskClienteModule.class,
|
DialogAskClienteModule.class,
|
||||||
DialogEditArticoloModule.class,
|
DialogEditArticoloModule.class,
|
||||||
DialogPrintOrderSSCCListModule.class,
|
DialogPrintOrderSSCCListModule.class,
|
||||||
ProdLineeProduzioneModule.class
|
ProdLineeProduzioneModule.class,
|
||||||
|
ProdDettaglioLineaModule.class
|
||||||
})
|
})
|
||||||
public interface MainApplicationComponent {
|
public interface MainApplicationComponent {
|
||||||
|
|
||||||
@ -226,6 +229,8 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
ProdLineeProduzioneComponent.Factory prodLineeProduzioneComponent();
|
ProdLineeProduzioneComponent.Factory prodLineeProduzioneComponent();
|
||||||
|
|
||||||
|
ProdDettaglioLineaComponent.Factory prodDettaglioLineaComponent();
|
||||||
|
|
||||||
void inject(MainApplication mainApplication);
|
void inject(MainApplication mainApplication);
|
||||||
|
|
||||||
void inject(AppContext mainApplication);
|
void inject(AppContext mainApplication);
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.services.inventario.InventarioService;
|
import it.integry.integrywmsnative.core.services.inventario.InventarioService;
|
||||||
import it.integry.integrywmsnative.core.update.UpdatesManager;
|
import it.integry.integrywmsnative.core.update.UpdatesManager;
|
||||||
@ -200,4 +201,10 @@ public class MainApplicationModule {
|
|||||||
return new InventarioService(giacenzaRESTConsumer);
|
return new InventarioService(giacenzaRESTConsumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
ProductionLinesRESTConsumer provideProductionLinesRESTConsumer() {
|
||||||
|
return new ProductionLinesRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,9 +99,17 @@ public abstract class BaseFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean onBackPressed() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected void popMe() {
|
protected void popMe() {
|
||||||
|
if (requireActivity() instanceof IPoppableActivity) {
|
||||||
requireActivity().runOnUiThread(() -> {
|
requireActivity().runOnUiThread(() -> {
|
||||||
((IPoppableActivity) requireActivity()).pop();
|
((IPoppableActivity) requireActivity()).pop();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
requireActivity().getSupportFragmentManager().popBackStack();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,9 @@
|
|||||||
|
package it.integry.integrywmsnative.core.interfaces.viewmodel_listeners;
|
||||||
|
|
||||||
|
public interface IOrdersLoadingListener {
|
||||||
|
|
||||||
|
void onOrderLoadingStarted();
|
||||||
|
|
||||||
|
void onOrderLoadingEnded();
|
||||||
|
|
||||||
|
}
|
||||||
@ -26,8 +26,6 @@ public class CommonRESTException {
|
|||||||
put(MESSAGE_KEY, "Barcode non letto correttamente");
|
put(MESSAGE_KEY, "Barcode non letto correttamente");
|
||||||
put(EXCEPTION_KEY, NoResultFromBarcodeException.class);
|
put(EXCEPTION_KEY, NoResultFromBarcodeException.class);
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ public class MesRESTConsumer extends _BaseRESTConsumer {
|
|||||||
MesRESTConsumerService mesRESTConsumerService = RESTBuilder.getService(MesRESTConsumerService.class);
|
MesRESTConsumerService mesRESTConsumerService = RESTBuilder.getService(MesRESTConsumerService.class);
|
||||||
|
|
||||||
mesRESTConsumerService.getOrdiniLavorazione(flagEvaso, codJfas)
|
mesRESTConsumerService.getOrdiniLavorazione(flagEvaso, codJfas)
|
||||||
.enqueue(new Callback<ServiceRESTResponse<List<OrdineLavorazioneDTO>>>() {
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Response<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> response) {
|
public void onResponse(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Response<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> response) {
|
||||||
analyzeAnswer(response, "getOrdiniLavorazione", (m) -> onComplete.run(response.body().getDto()), onFailed);
|
analyzeAnswer(response, "getOrdiniLavorazione", (m) -> onComplete.run(response.body().getDto()), onFailed);
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -88,4 +89,24 @@ public class ProductionLinesRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void getLineDetails(ProdLineStatusDTO lineaProd, RunnableArgs<ProdLineStatusDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ProductionLinesRESTConsumerService restService = RESTBuilder.getService(ProductionLinesRESTConsumerService.class);
|
||||||
|
Call<ServiceRESTResponse<List<ProdLineStatusDTO>>> callable = restService.getStatoLinee(lineaProd.getCodMdepLav());
|
||||||
|
callable.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<List<ProdLineStatusDTO>>> call, Response<ServiceRESTResponse<List<ProdLineStatusDTO>>> response) {
|
||||||
|
analyzeAnswer(response, "getLineDetails", (lines) -> {
|
||||||
|
ProdLineStatusDTO newLine = Stream.of(lines).filter(dto -> dto.getCodJfas().equalsIgnoreCase(lineaProd.getCodJfas())).findFirstOrElse(null);
|
||||||
|
onComplete.run(newLine);
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<List<ProdLineStatusDTO>>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,7 @@ public class SitArtOrdDTO {
|
|||||||
private String descrizioneMsgr;
|
private String descrizioneMsgr;
|
||||||
private String codMsfa;
|
private String codMsfa;
|
||||||
private String descrizioneMsfa;
|
private String descrizioneMsfa;
|
||||||
|
private String untord;
|
||||||
|
|
||||||
private final HashMap<String, Object> extraInfo = new HashMap<>();
|
private final HashMap<String, Object> extraInfo = new HashMap<>();
|
||||||
|
|
||||||
@ -212,4 +213,13 @@ public class SitArtOrdDTO {
|
|||||||
public HashMap<String, Object> getExtraInfo() {
|
public HashMap<String, Object> getExtraInfo() {
|
||||||
return extraInfo;
|
return extraInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUntord() {
|
||||||
|
return untord;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitArtOrdDTO setUntord(String untord) {
|
||||||
|
this.untord = untord;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,6 +45,7 @@ public class DBSettingsModel {
|
|||||||
private boolean flagPrintPackingListOnOrderClose;
|
private boolean flagPrintPackingListOnOrderClose;
|
||||||
private boolean flagPrintEtichetteOnOrderClose;
|
private boolean flagPrintEtichetteOnOrderClose;
|
||||||
private int onNumCnfInputChanged = 1;
|
private int onNumCnfInputChanged = 1;
|
||||||
|
private int onQtaTotInputChanged = 1;
|
||||||
private boolean flagAccettazioneUseQtaOrd = false;
|
private boolean flagAccettazioneUseQtaOrd = false;
|
||||||
private boolean flagPickLiberoAllowEmptyDest = false;
|
private boolean flagPickLiberoAllowEmptyDest = false;
|
||||||
|
|
||||||
@ -309,6 +310,15 @@ public class DBSettingsModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getOnQtaTotInputChanged() {
|
||||||
|
return onQtaTotInputChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setOnQtaTotInputChanged(int onQtaTotInputChanged) {
|
||||||
|
this.onQtaTotInputChanged = onQtaTotInputChanged;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> getNotePerditaDocInterni() {
|
public List<String> getNotePerditaDocInterni() {
|
||||||
return notePerditaDocInterni;
|
return notePerditaDocInterni;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -278,6 +278,10 @@ public class SettingsManager {
|
|||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
.setKeySection("ON_NUM_CNF_INPUT_CHANGED"));
|
.setKeySection("ON_NUM_CNF_INPUT_CHANGED"));
|
||||||
|
stbGestSetupList.add(new StbGestSetup()
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("SETUP")
|
||||||
|
.setKeySection("ON_QTA_TOT_INPUT_CHANGED"));
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
stbGestSetupList.add(new StbGestSetup()
|
||||||
.setGestName("PVM")
|
.setGestName("PVM")
|
||||||
.setSection("DOC_INTERNI")
|
.setSection("DOC_INTERNI")
|
||||||
@ -339,11 +343,16 @@ public class SettingsManager {
|
|||||||
if (onNumCnfInputChanged != null) {
|
if (onNumCnfInputChanged != null) {
|
||||||
dbSettingsModelIstance.setOnNumCnfInputChanged(onNumCnfInputChanged);
|
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();
|
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_PACKING_LIST_ON_CLOSE", codMdep, (value) -> {
|
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_PACKING_LIST_ON_CLOSE", codMdep, (value) -> {
|
||||||
dbSettingsModelIstance.setFlagPrintPackingListOnOrderClose(value);
|
dbSettingsModelIstance.setFlagPrintPackingListOnOrderClose(value);
|
||||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_ETICHETTE_ON_CLOSE", codMdep, (gestSetupDTO) -> {
|
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_ETICHETTE_ON_CLOSE", codMdep, (setupValue) -> {
|
||||||
dbSettingsModelIstance.setFlagPrintEtichetteOnOrderClose(value);
|
dbSettingsModelIstance.setFlagPrintEtichetteOnOrderClose(setupValue);
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
|
|||||||
@ -0,0 +1,355 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_dettaglio_linea;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.text.InputType;
|
||||||
|
import android.text.SpannableString;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.databinding.Observable;
|
||||||
|
import androidx.databinding.ObservableField;
|
||||||
|
|
||||||
|
import com.google.android.material.chip.Chip;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableString;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
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;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment;
|
||||||
|
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||||
|
|
||||||
|
public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDettaglioLineaViewModel.Listener {
|
||||||
|
|
||||||
|
private static final String DATA_KEY_LINE = "keyLinea";
|
||||||
|
private static final String DATA_KEY_FRAGMENT_LISTENER = "onFragmentClose";
|
||||||
|
|
||||||
|
private ActivityProdDettaglioLineaBinding mBinding;
|
||||||
|
public final ObservableField<String> listaOrd = new ObservableField<>();
|
||||||
|
public final BindableString lineaLabel = new BindableString();
|
||||||
|
public final BindableBoolean isStarted = new BindableBoolean(false);
|
||||||
|
public final BindableBoolean isPaused = new BindableBoolean(false);
|
||||||
|
public final BindableBoolean flagShowProdInfo = new BindableBoolean(false);
|
||||||
|
public final BindableString hrNum = new BindableString();
|
||||||
|
public final BindableString codMart = new BindableString();
|
||||||
|
public final BindableString partitaMag = new BindableString();
|
||||||
|
public final BindableString productDescription = new BindableString();
|
||||||
|
private Runnable onResumeRunnable = null;
|
||||||
|
|
||||||
|
private int barcodeScannerIstanceID = -1;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
ProdDettaglioLineaViewModel mViewModel;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
DialogInputQuantityV2View mDialogInputQuantityV2View;
|
||||||
|
|
||||||
|
|
||||||
|
public static Intent newInstance(Context context, ProdLineStatusDTO prodLine) {
|
||||||
|
Intent myIntent = new Intent(context, ProdDettaglioLineaActivity.class);
|
||||||
|
String keyLine = DataCache.addItem(prodLine);
|
||||||
|
myIntent.putExtra(DATA_KEY_LINE, keyLine);
|
||||||
|
return myIntent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
mBinding = ActivityProdDettaglioLineaBinding.inflate(getLayoutInflater());
|
||||||
|
setContentView(mBinding.getRoot());
|
||||||
|
setSupportActionBar(mBinding.toolbar);
|
||||||
|
setTitle(R.string.line_details);
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
|
ProdLineStatusDTO lineaProd = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_LINE));
|
||||||
|
if (lineaProd == null) {
|
||||||
|
Toast.makeText(this, "Selezionare una linea di produzione e riprovare", Toast.LENGTH_SHORT).show();
|
||||||
|
close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MainApplication.appComponent
|
||||||
|
.prodDettaglioLineaComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
|
||||||
|
|
||||||
|
mViewModel.setListener(this);
|
||||||
|
mBinding.setViewModel(mViewModel);
|
||||||
|
mBinding.setView(this);
|
||||||
|
this.init();
|
||||||
|
mViewModel.init(lineaProd);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
initBarcodeReader();
|
||||||
|
mViewModel.lineaProd.observe(this, lineaProd -> {
|
||||||
|
this.listaOrd.set(lineaProd.getListaOrd());
|
||||||
|
this.lineaLabel.set(lineaProd.getLabel());
|
||||||
|
this.isStarted.set(lineaProd.isStarted());
|
||||||
|
this.isPaused.set(lineaProd.isPaused());
|
||||||
|
this.partitaMag.set(lineaProd.getPartitaMag());
|
||||||
|
this.codMart.set(lineaProd.getCodMart());
|
||||||
|
this.productDescription.set(lineaProd.getDescrizioneProd());
|
||||||
|
this.flagShowProdInfo.set(lineaProd.isStarted() && !UtilityString.isNullOrEmpty(lineaProd.getCodMart()));
|
||||||
|
this.hrNum.set(lineaProd.getQtaAllocate().toString());
|
||||||
|
});
|
||||||
|
listaOrd.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||||
|
renderOrdersChips();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
getSupportFragmentManager()
|
||||||
|
.setFragmentResultListener(DATA_KEY_FRAGMENT_LISTENER, this, (requestKey, result) -> {
|
||||||
|
if (onResumeRunnable != null) {
|
||||||
|
onResumeRunnable.run();
|
||||||
|
onResumeRunnable = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void renderOrdersChips() {
|
||||||
|
mBinding.ordersList.removeAllViews();
|
||||||
|
String listaOrdString = listaOrd.get();
|
||||||
|
if (!UtilityString.isNullOrEmpty(listaOrdString)) {
|
||||||
|
for (String ord : listaOrdString.split("\\|")) {
|
||||||
|
Chip chip = new Chip(this);
|
||||||
|
chip.setClickable(false);
|
||||||
|
chip.setText(ord);
|
||||||
|
mBinding.ordersList.addView(chip);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onSupportNavigateUp() {
|
||||||
|
onBackPressed();
|
||||||
|
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) {
|
||||||
|
onLoadingStarted();
|
||||||
|
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||||
|
.setMtbAart(mtbColr.getMtbAart())
|
||||||
|
.setInitialNumCnf(mtbColr.getNumCnf())
|
||||||
|
.setInitialQtaCnf(mtbColr.getQtaCnf())
|
||||||
|
.setInitialQtaTot(mtbColr.getQtaCol())
|
||||||
|
.setTotalQtaAvailable(mtbColr.getQtaCol())
|
||||||
|
.setTotalNumCnfAvailable(mtbColr.getNumCnf())
|
||||||
|
.setQtaCnfAvailable(mtbColr.getQtaCnf())
|
||||||
|
.setPartitaMag(mtbColr.getPartitaMag())
|
||||||
|
.setDataScad(mtbColr.getDataScadPartitaD())
|
||||||
|
.setCanOverflowOrderQuantity(false)
|
||||||
|
.setCanPartitaMagBeChanged(false)
|
||||||
|
.setCanLUBeClosed(false)
|
||||||
|
.setFocusOnStart(false);
|
||||||
|
|
||||||
|
if (!mDialogInputQuantityV2View.isVisible())
|
||||||
|
this.runOnUiThread(() -> {
|
||||||
|
onLoadingEnded();
|
||||||
|
mDialogInputQuantityV2View
|
||||||
|
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||||
|
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||||
|
|
||||||
|
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||||
|
.setNumCnf(resultDTO.getNumCnf())
|
||||||
|
.setQtaCnf(resultDTO.getQtaCnf())
|
||||||
|
.setQtaTot(resultDTO.getQtaTot())
|
||||||
|
.setPartitaMag(resultDTO.getPartitaMag())
|
||||||
|
.setDataScad(resultDTO.getDataScad());
|
||||||
|
|
||||||
|
onComplete.run(pickedQuantityDTO);
|
||||||
|
|
||||||
|
})
|
||||||
|
.setOnAbort(this::onLoadingEnded)
|
||||||
|
.show(this.getSupportFragmentManager(), "tag");
|
||||||
|
});
|
||||||
|
else this.onLoadingEnded();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onLineStop() {
|
||||||
|
onBackPressed();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void initBarcodeReader() {
|
||||||
|
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessful(onScanSuccessful)
|
||||||
|
.setOnScanFailed(this::onError));
|
||||||
|
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void requestResources() {
|
||||||
|
this.onLoadingEnded();
|
||||||
|
BarcodeManager.disable();
|
||||||
|
this.runOnUiThread(() -> {
|
||||||
|
|
||||||
|
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il numero di risorse da allocare", this.hrNum.get(), "n. risorse", qta -> {
|
||||||
|
this.onLoadingStarted();
|
||||||
|
try {
|
||||||
|
Integer hrNum = Integer.parseInt(qta);
|
||||||
|
this.mViewModel.startProductionLine(hrNum);
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
this.onError(new Exception("Inserire un numero di risorse valido"));
|
||||||
|
}
|
||||||
|
}, BarcodeManager::enable, InputType.TYPE_CLASS_NUMBER).show();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void requestOrderChange() {
|
||||||
|
this.onLoadingEnded();
|
||||||
|
this.runOnUiThread(() -> {
|
||||||
|
DialogStartProduction.newInstance((dto) -> {
|
||||||
|
this.mViewModel.checkBarcodeAndStartOrdine(dto);
|
||||||
|
}).show(getSupportFragmentManager(), "DialogStartProduction");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void requestProductionStop() {
|
||||||
|
this.onLoadingEnded();
|
||||||
|
BarcodeManager.disable();
|
||||||
|
ProdLineStatusDTO lineaProd = mViewModel.getLineaProd();
|
||||||
|
if (UtilityString.isNullOrEmpty(lineaProd.getListaOrd())) {
|
||||||
|
mViewModel.stopProduction();
|
||||||
|
} else {
|
||||||
|
this.confirmOrderClose(() -> {
|
||||||
|
mViewModel.stopProduction();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void requestMaterialRecover() {
|
||||||
|
this.onLoadingEnded();
|
||||||
|
BarcodeManager.disable();
|
||||||
|
this.runOnUiThread(() -> {
|
||||||
|
getSupportFragmentManager()
|
||||||
|
.beginTransaction()
|
||||||
|
.add(R.id.frame_layout_container,
|
||||||
|
ProdRecuperoMaterialeFragment.newInstance(mViewModel.lineaProd.getValue().getCodJfas(), DATA_KEY_FRAGMENT_LISTENER))
|
||||||
|
.addToBackStack("ProdRecuperoMaterialeFragment")
|
||||||
|
.commit();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void successDialog(String message, Runnable onComplete) {
|
||||||
|
BarcodeManager.disable();
|
||||||
|
|
||||||
|
this.runOnUiThread(() -> DialogSimpleMessageView.makeSuccessDialog(getResources().getString(R.string.success),
|
||||||
|
new SpannableString(message), null, onComplete).show(getSupportFragmentManager(), "successDialog"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showToast(String message, Runnable onComplete) {
|
||||||
|
this.runOnUiThread(() -> {
|
||||||
|
UtilityToast.showToast(message);
|
||||||
|
onComplete.run();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||||
|
this.onLoadingStarted();
|
||||||
|
|
||||||
|
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void confirmOrderClose(Runnable onConfirm) {
|
||||||
|
this.onLoadingEnded();
|
||||||
|
this.runOnUiThread(() -> {
|
||||||
|
DialogSimpleMessageView.makeWarningDialog(
|
||||||
|
Html.fromHtml("Per completare l'operazione è necessario chiudere gli ordini attualmente aperti sulla linea."
|
||||||
|
+ "<br /> <br/>" +
|
||||||
|
"Continuare?"),
|
||||||
|
null,
|
||||||
|
() -> {
|
||||||
|
DialogSimpleMessageView.makeInfoDialog(
|
||||||
|
null,
|
||||||
|
Html.fromHtml("Vuoi recuperare del materiale prima di chiudere gli ordini?"),
|
||||||
|
null,
|
||||||
|
() -> {
|
||||||
|
onResumeRunnable = onConfirm;
|
||||||
|
this.requestMaterialRecover();
|
||||||
|
},
|
||||||
|
onConfirm
|
||||||
|
).show(getSupportFragmentManager(), "confirmOrderClose");
|
||||||
|
},
|
||||||
|
BarcodeManager::enable
|
||||||
|
).show(getSupportFragmentManager(), "confirmOrderClose");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void close() {
|
||||||
|
onBackPressed();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
int count = getSupportFragmentManager().getBackStackEntryCount();
|
||||||
|
if (count > 0) {
|
||||||
|
getSupportFragmentManager().popBackStack();
|
||||||
|
} else {
|
||||||
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
|
super.onBackPressed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_dettaglio_linea;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface ProdDettaglioLineaComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
|
||||||
|
ProdDettaglioLineaComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(ProdDettaglioLineaActivity prodDettaglioLineaActivity);
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_dettaglio_linea;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.Provides;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
||||||
|
|
||||||
|
@Module(subcomponents = ProdDettaglioLineaComponent.class)
|
||||||
|
public class ProdDettaglioLineaModule {
|
||||||
|
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
ProdDettaglioLineaViewModel providesProdDettaglioLineaViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer, ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, MesRESTConsumer mesRESTConsumer) {
|
||||||
|
return new ProdDettaglioLineaViewModel(productionLinesRESTConsumer, barcodeRESTConsumer, colliMagazzinoRESTConsumer, mesRESTConsumer);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,236 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_dettaglio_linea;
|
||||||
|
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||||
|
|
||||||
|
public class ProdDettaglioLineaViewModel {
|
||||||
|
|
||||||
|
private Listener mListener;
|
||||||
|
|
||||||
|
private final ProductionLinesRESTConsumer productionLinesRESTConsumer;
|
||||||
|
private final ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer;
|
||||||
|
private final MesRESTConsumer mesRESTConsumer;
|
||||||
|
private final BarcodeRESTConsumer mBarcodeRESTConsumer;
|
||||||
|
public final MutableLiveData<ProdLineStatusDTO> lineaProd = new MutableLiveData<>();
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public ProdDettaglioLineaViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer, ColliMagazzinoRESTConsumer magazzinoRESTConsumer, MesRESTConsumer mesRESTConsumer) {
|
||||||
|
this.productionLinesRESTConsumer = productionLinesRESTConsumer;
|
||||||
|
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||||
|
this.colliMagazzinoRESTConsumer = magazzinoRESTConsumer;
|
||||||
|
this.mesRESTConsumer = mesRESTConsumer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||||
|
if (UtilityBarcode.isEtichettaAnonima(barcodeScanDTO)) {
|
||||||
|
this.executeEtichettaAnonima(barcodeScanDTO, onComplete);
|
||||||
|
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||||
|
this.executeEAN128(barcodeScanDTO, onComplete);
|
||||||
|
} else {
|
||||||
|
onComplete.run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void executeEtichettaAnonima(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||||
|
handleSSCCBarcode(barcodeScanDTO.getStringValue(), onComplete);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleSSCCBarcode(String sscc, Runnable onComplete) {
|
||||||
|
this.colliMagazzinoRESTConsumer.getBySSCC(sscc, true, false, mtbColt -> {
|
||||||
|
|
||||||
|
if (mtbColt == null) {
|
||||||
|
this.sendError(new NoLUFoundException());
|
||||||
|
} else {
|
||||||
|
if (mtbColt.getMtbColr().size() <= 0) {
|
||||||
|
this.sendError(new Exception("E' stata scansionata una UL già vuota"));
|
||||||
|
} else {
|
||||||
|
this.sendOnLUSelected(mtbColt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnLUSelected(MtbColt mtbColt) {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
this.checkOrdersCompatibility(mtbColt, () -> {
|
||||||
|
MtbColr row = mtbColt.getMtbColr().get(0);
|
||||||
|
mListener.requestQtaVersamento(
|
||||||
|
row,
|
||||||
|
dto -> {
|
||||||
|
sendOnLoadingStarted();
|
||||||
|
row.setQtaCnf(dto.getQtaCnf());
|
||||||
|
row.setNumCnf(dto.getNumCnf());
|
||||||
|
row.setQtaCol(dto.getQtaTot());
|
||||||
|
row.setPesoLordoKg(null);
|
||||||
|
row.setPesoNettoKg(null);
|
||||||
|
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||||
|
MtbDepoPosizione posizione = new MtbDepoPosizione();
|
||||||
|
posizione.setPosizione(prodLine.getCodJfas());
|
||||||
|
posizione.setCodMdep(prodLine.getCodMdepLav());
|
||||||
|
posizione.setFlagLineaProduzione("S");
|
||||||
|
this.colliMagazzinoRESTConsumer.createColloScaricoDaCarico(mtbColt, posizione,
|
||||||
|
generatedMtbColt -> {
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
this.mListener.showToast("Versamento completato!", BarcodeManager::enable);
|
||||||
|
}, this::sendError);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkOrdersCompatibility(MtbColt mtbColt, Runnable onComplete) {
|
||||||
|
mesRESTConsumer.getOrdiniLavorazioneMateriale(lineaProd.getValue().getCodJfas(), getIdMaterialeFromCollo(mtbColt), ordini -> {
|
||||||
|
if (ordini != null && ordini.size() > 0) {
|
||||||
|
onComplete.run();
|
||||||
|
} else {
|
||||||
|
this.mListener.confirmInconsistentDeposit(onComplete);
|
||||||
|
}
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getIdMaterialeFromCollo(MtbColt mtbColt) {
|
||||||
|
MtbAart articolo = mtbColt.getMtbColr().get(0).getMtbAart();
|
||||||
|
return UtilityString.isNullOrEmpty(articolo.getIdArtEqui()) ? articolo.getCodMart() : articolo.getIdArtEqui();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void executeEAN128(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||||
|
this.mBarcodeRESTConsumer.decodeEan128(barcodeScanDTO, ean128Model -> {
|
||||||
|
if (ean128Model != null && !UtilityString.isNullOrEmpty(ean128Model.Sscc)) {
|
||||||
|
handleSSCCBarcode(ean128Model.Sscc, onComplete);
|
||||||
|
} else {
|
||||||
|
this.sendError(new NoLUFoundException());
|
||||||
|
}
|
||||||
|
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void settings() {
|
||||||
|
this.mListener.onSettingsRequest(lineaProd.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnLoadingStarted() {
|
||||||
|
if (this.mListener != null) mListener.onLoadingStarted();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnLoadingEnded() {
|
||||||
|
if (this.mListener != null) mListener.onLoadingEnded();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendError(Exception ex) {
|
||||||
|
if (this.mListener != null) mListener.onError(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startProductionLine(Integer hrNum) {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||||
|
this.productionLinesRESTConsumer.avviaLineaDiProduzione(prodLine.getCodJfas(),
|
||||||
|
hrNum,
|
||||||
|
() -> this.mListener.successDialog("Operazione completata", this::loadLineDetails),
|
||||||
|
this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void startProduction(String codMart, String partitaMag) {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||||
|
this.productionLinesRESTConsumer.avviaProduzioneArticoloSuLinea(prodLine.getCodJfas(), codMart, partitaMag,
|
||||||
|
() -> this.mListener.successDialog("Operazione completata", this::loadLineDetails),
|
||||||
|
this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stopProduction() {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||||
|
this.productionLinesRESTConsumer.arrestaLineaDiProduzione(prodLine.getCodJfas(),
|
||||||
|
() -> this.mListener.successDialog("Operazione completata", this::onLineStop),
|
||||||
|
this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onLineStop() {
|
||||||
|
this.mListener.onLineStop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkBarcodeAndStartOrdine(BarcodeScanDTO dto) {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
ProdLineStatusDTO prodLine = lineaProd.getValue();
|
||||||
|
mBarcodeRESTConsumer.decodeEan128(dto, (ean128) -> {
|
||||||
|
String codMart = ean128.Content;
|
||||||
|
String partitaMag = ean128.BatchLot;
|
||||||
|
if (!prodLine.isStarted()) {
|
||||||
|
this.sendError(new Exception("Impossibile avviare una produzione su una linea ferma!"));
|
||||||
|
} else if (UtilityString.isNullOrEmpty(prodLine.getListaOrd())) {
|
||||||
|
this.startProduction(codMart, partitaMag);
|
||||||
|
} else {
|
||||||
|
this.mListener.confirmOrderClose(() -> {
|
||||||
|
this.startProduction(codMart, partitaMag);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loadLineDetails() {
|
||||||
|
sendOnLoadingStarted();
|
||||||
|
if (lineaProd.getValue() == null) {
|
||||||
|
this.sendError(new Exception("Nessuna linea selezionata!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
productionLinesRESTConsumer.getLineDetails(lineaProd.getValue(), linea -> {
|
||||||
|
this.lineaProd.postValue(linea);
|
||||||
|
sendOnLoadingEnded();
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init(ProdLineStatusDTO lineaProd) {
|
||||||
|
this.lineaProd.setValue(lineaProd);
|
||||||
|
this.loadLineDetails();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdLineStatusDTO getLineaProd() {
|
||||||
|
return lineaProd.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public interface Listener extends ILoadingListener {
|
||||||
|
void onError(Exception ex);
|
||||||
|
|
||||||
|
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 confirmOrderClose(Runnable onConfirm);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdDettaglioLineaViewModel setListener(Listener listener) {
|
||||||
|
this.mListener = listener;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package it.integry.integrywmsnative.gest.prod_linee_produzione.dialogs;
|
package it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -11,7 +11,6 @@ import androidx.annotation.Nullable;
|
|||||||
|
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|
||||||
import it.integry.integrywmsnative.databinding.BottomSheetLineActionsBinding;
|
import it.integry.integrywmsnative.databinding.BottomSheetLineActionsBinding;
|
||||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||||
|
|
||||||
@ -20,17 +19,19 @@ public class BottomSheetLineAction extends BottomSheetDialogFragment {
|
|||||||
private BottomSheetLineActionsBinding mBinding;
|
private BottomSheetLineActionsBinding mBinding;
|
||||||
|
|
||||||
private ProdLineStatusDTO prodLine;
|
private ProdLineStatusDTO prodLine;
|
||||||
private RunnableArgs<ProdLineStatusDTO> onChangeResourcesRequest;
|
private Runnable onChangeResourcesRequest;
|
||||||
private RunnableArgs<ProdLineStatusDTO> onChangeOrdersRequest;
|
private Runnable onChangeOrdersRequest;
|
||||||
private RunnableArgs<ProdLineStatusDTO> onLineCloseRequest;
|
private Runnable onLineCloseRequest;
|
||||||
|
private Runnable onRecoverRequest;
|
||||||
private Runnable onCancelAction;
|
private Runnable onCancelAction;
|
||||||
|
|
||||||
public static BottomSheetLineAction newInstance(ProdLineStatusDTO dto, RunnableArgs<ProdLineStatusDTO> onChangeResourcesRequest, RunnableArgs<ProdLineStatusDTO> onChangeOrdersRequest, RunnableArgs<ProdLineStatusDTO> onLineCloseRequest, Runnable onCancel) {
|
public static BottomSheetLineAction newInstance(ProdLineStatusDTO dto, Runnable onChangeResourcesRequest, Runnable onChangeOrdersRequest, Runnable onLineCloseRequest, Runnable onRecoverRequest, Runnable onCancel) {
|
||||||
BottomSheetLineAction fragment = new BottomSheetLineAction();
|
BottomSheetLineAction fragment = new BottomSheetLineAction();
|
||||||
fragment
|
fragment
|
||||||
.setProdLine(dto)
|
.setProdLine(dto)
|
||||||
.setOnChangeResourcesRequest(onChangeResourcesRequest)
|
.setOnChangeResourcesRequest(onChangeResourcesRequest)
|
||||||
.setOnChangeOrdersRequest(onChangeOrdersRequest)
|
.setOnChangeOrdersRequest(onChangeOrdersRequest)
|
||||||
|
.setOnRecoverRequest(onRecoverRequest)
|
||||||
.setOnLineCloseRequest(onLineCloseRequest)
|
.setOnLineCloseRequest(onLineCloseRequest)
|
||||||
.setOnCancelAction(onCancel);
|
.setOnCancelAction(onCancel);
|
||||||
return fragment;
|
return fragment;
|
||||||
@ -53,19 +54,24 @@ public class BottomSheetLineAction extends BottomSheetDialogFragment {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BottomSheetLineAction setOnChangeResourcesRequest(RunnableArgs<ProdLineStatusDTO> onChangeResourcesRequest) {
|
public BottomSheetLineAction setOnChangeResourcesRequest(Runnable onChangeResourcesRequest) {
|
||||||
this.onChangeResourcesRequest = onChangeResourcesRequest;
|
this.onChangeResourcesRequest = onChangeResourcesRequest;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public BottomSheetLineAction setOnChangeOrdersRequest(RunnableArgs<ProdLineStatusDTO> onChangeOrdersRequest) {
|
public BottomSheetLineAction setOnChangeOrdersRequest(Runnable onChangeOrdersRequest) {
|
||||||
this.onChangeOrdersRequest = onChangeOrdersRequest;
|
this.onChangeOrdersRequest = onChangeOrdersRequest;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BottomSheetLineAction setOnRecoverRequest(Runnable onRecoverRequest) {
|
||||||
|
this.onRecoverRequest = onRecoverRequest;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public BottomSheetLineAction setOnLineCloseRequest(RunnableArgs<ProdLineStatusDTO> onLineCloseRequest) {
|
|
||||||
|
public BottomSheetLineAction setOnLineCloseRequest(Runnable onLineCloseRequest) {
|
||||||
this.onLineCloseRequest = onLineCloseRequest;
|
this.onLineCloseRequest = onLineCloseRequest;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -81,7 +87,7 @@ public class BottomSheetLineAction extends BottomSheetDialogFragment {
|
|||||||
|
|
||||||
public void onResourcesClicked() {
|
public void onResourcesClicked() {
|
||||||
if (this.onChangeResourcesRequest != null) {
|
if (this.onChangeResourcesRequest != null) {
|
||||||
this.onChangeResourcesRequest.run(prodLine);
|
this.onChangeResourcesRequest.run();
|
||||||
}
|
}
|
||||||
this.dismiss();
|
this.dismiss();
|
||||||
|
|
||||||
@ -89,14 +95,21 @@ public class BottomSheetLineAction extends BottomSheetDialogFragment {
|
|||||||
|
|
||||||
public void onPlayClicked() {
|
public void onPlayClicked() {
|
||||||
if (this.onChangeOrdersRequest != null) {
|
if (this.onChangeOrdersRequest != null) {
|
||||||
this.onChangeOrdersRequest.run(prodLine);
|
this.onChangeOrdersRequest.run();
|
||||||
}
|
}
|
||||||
this.dismiss();
|
this.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onStopClicked() {
|
public void onStopClicked() {
|
||||||
if (this.onLineCloseRequest != null) {
|
if (this.onLineCloseRequest != null) {
|
||||||
this.onLineCloseRequest.run(prodLine);
|
this.onLineCloseRequest.run();
|
||||||
|
}
|
||||||
|
this.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onRecoverClicked() {
|
||||||
|
if (this.onRecoverRequest != null) {
|
||||||
|
this.onRecoverRequest.run();
|
||||||
}
|
}
|
||||||
this.dismiss();
|
this.dismiss();
|
||||||
}
|
}
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs;
|
||||||
|
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogStartProductionBinding;
|
||||||
|
|
||||||
|
public class DialogRecoverUl extends BaseDialogFragment {
|
||||||
|
private int barcodeScannerIstanceID = -1;
|
||||||
|
private RunnableArgs<BarcodeScanDTO> onScanSuccessful;
|
||||||
|
private DialogStartProductionBinding mBinding;
|
||||||
|
|
||||||
|
public static DialogRecoverUl newInstance(RunnableArgs<BarcodeScanDTO> onScanSuccessful) {
|
||||||
|
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
|
||||||
|
DialogRecoverUl fragment = new DialogRecoverUl();
|
||||||
|
fragment.setArguments(args);
|
||||||
|
fragment.setOnScanSuccessful(onScanSuccessful);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
|
super.onDismiss(dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogRecoverUl setOnScanSuccessful(RunnableArgs<BarcodeScanDTO> onScanSuccessful) {
|
||||||
|
this.onScanSuccessful = onScanSuccessful;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
mBinding = DialogStartProductionBinding.inflate(inflater, container, false);
|
||||||
|
mBinding.setLifecycleOwner(this);
|
||||||
|
this.initBarcodeReader();
|
||||||
|
setCancelable(true);
|
||||||
|
getDialog().setCanceledOnTouchOutside(true);
|
||||||
|
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
return mBinding.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void initBarcodeReader() {
|
||||||
|
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessful(this::processBarcode)
|
||||||
|
.setOnScanFailed(this::onError));
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void processBarcode(BarcodeScanDTO barcodeScanDTO) {
|
||||||
|
if (UtilityBarcode.isEan128(barcodeScanDTO)) {
|
||||||
|
this.onScanSuccessful.run(barcodeScanDTO);
|
||||||
|
this.dismiss();
|
||||||
|
} else {
|
||||||
|
this.onError(new Exception("Il barcode scansionato non è valido!"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package it.integry.integrywmsnative.gest.prod_linee_produzione.dialogs;
|
package it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
@ -17,12 +17,15 @@ import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
|||||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.DialogStartProductionBinding;
|
import it.integry.integrywmsnative.databinding.DialogStartProductionBinding;
|
||||||
|
|
||||||
public class DialogStartProduction extends BaseDialogFragment {
|
public class DialogStartProduction extends BaseDialogFragment {
|
||||||
private int barcodeScannerIstanceID = -1;
|
private int barcodeScannerIstanceID = -1;
|
||||||
private RunnableArgs<BarcodeScanDTO> onScanSuccessful;
|
private RunnableArgs<BarcodeScanDTO> onScanSuccessful;
|
||||||
private DialogStartProductionBinding mBinding;
|
private DialogStartProductionBinding mBinding;
|
||||||
|
private String title;
|
||||||
|
private String label;
|
||||||
|
|
||||||
public static DialogStartProduction newInstance(RunnableArgs<BarcodeScanDTO> onScanSuccessful) {
|
public static DialogStartProduction newInstance(RunnableArgs<BarcodeScanDTO> onScanSuccessful) {
|
||||||
|
|
||||||
@ -34,6 +37,23 @@ public class DialogStartProduction extends BaseDialogFragment {
|
|||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogStartProduction setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogStartProduction setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
@ -55,6 +75,14 @@ public class DialogStartProduction extends BaseDialogFragment {
|
|||||||
setCancelable(true);
|
setCancelable(true);
|
||||||
getDialog().setCanceledOnTouchOutside(true);
|
getDialog().setCanceledOnTouchOutside(true);
|
||||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
|
if (!UtilityString.isNullOrEmpty(title)) {
|
||||||
|
mBinding.titleText.setText(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!UtilityString.isNullOrEmpty(label)) {
|
||||||
|
mBinding.scanLabel.setText(label);
|
||||||
|
}
|
||||||
return mBinding.getRoot();
|
return mBinding.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,8 +96,8 @@ public class DialogStartProduction extends BaseDialogFragment {
|
|||||||
|
|
||||||
private void processBarcode(BarcodeScanDTO barcodeScanDTO) {
|
private void processBarcode(BarcodeScanDTO barcodeScanDTO) {
|
||||||
if (UtilityBarcode.isEan128(barcodeScanDTO)) {
|
if (UtilityBarcode.isEan128(barcodeScanDTO)) {
|
||||||
this.onScanSuccessful.run(barcodeScanDTO);
|
|
||||||
this.dismiss();
|
this.dismiss();
|
||||||
|
this.onScanSuccessful.run(barcodeScanDTO);
|
||||||
} else {
|
} else {
|
||||||
this.onError(new Exception("Il barcode scansionato non è valido!"));
|
this.onError(new Exception("Il barcode scansionato non è valido!"));
|
||||||
}
|
}
|
||||||
@ -2,7 +2,6 @@ package it.integry.integrywmsnative.gest.prod_linee_produzione;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Html;
|
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -10,7 +9,6 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.appcompat.widget.AppCompatTextView;
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
import androidx.databinding.DataBindingUtil;
|
|
||||||
import androidx.databinding.ObservableArrayList;
|
import androidx.databinding.ObservableArrayList;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
@ -27,10 +25,8 @@ import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
|||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
|
||||||
import it.integry.integrywmsnative.databinding.FragmentLineeProdBinding;
|
import it.integry.integrywmsnative.databinding.FragmentLineeProdBinding;
|
||||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dialogs.BottomSheetLineAction;
|
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.ProdDettaglioLineaActivity;
|
||||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dialogs.DialogStartProduction;
|
|
||||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.ui.LinesListAdapter;
|
import it.integry.integrywmsnative.gest.prod_linee_produzione.ui.LinesListAdapter;
|
||||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||||
@ -60,8 +56,7 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
|||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
mBinding = FragmentLineeProdBinding.inflate(inflater, container, false);
|
||||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_linee_prod, container, false);
|
|
||||||
MainApplication.appComponent
|
MainApplication.appComponent
|
||||||
.prodLineeProduzioneComponent()
|
.prodLineeProduzioneComponent()
|
||||||
.create()
|
.create()
|
||||||
@ -71,11 +66,17 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
|||||||
mBinding.setLifecycleOwner(this);
|
mBinding.setLifecycleOwner(this);
|
||||||
this.initRecyclerView();
|
this.initRecyclerView();
|
||||||
this.initBarcodeReader();
|
this.initBarcodeReader();
|
||||||
mViewModel.init();
|
|
||||||
|
|
||||||
return mBinding.getRoot();
|
return mBinding.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
mViewModel.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void initBarcodeReader() {
|
private void initBarcodeReader() {
|
||||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
.setOnScanSuccessful(onScanSuccessful)
|
.setOnScanSuccessful(onScanSuccessful)
|
||||||
@ -111,7 +112,7 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
|||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
requireActivity().runOnUiThread(() -> {
|
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();
|
this.onLoadingStarted();
|
||||||
try {
|
try {
|
||||||
Integer hrNum = Integer.parseInt(qta);
|
Integer hrNum = Integer.parseInt(qta);
|
||||||
@ -123,28 +124,6 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void requestOrderChange(ProdLineStatusDTO prodLine) {
|
|
||||||
this.onLoadingEnded();
|
|
||||||
requireActivity().runOnUiThread(() -> {
|
|
||||||
DialogStartProduction.newInstance((dto) -> {
|
|
||||||
this.mViewModel.checkBarcodeAndStartOrdine(prodLine, dto);
|
|
||||||
}).show(getChildFragmentManager(), "DialogStartProduction");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void requestProductionStop(ProdLineStatusDTO prodLine) {
|
|
||||||
this.onLoadingEnded();
|
|
||||||
BarcodeManager.disable();
|
|
||||||
if (UtilityString.isNullOrEmpty(prodLine.getListaOrd())) {
|
|
||||||
mViewModel.stopProduction(prodLine);
|
|
||||||
} else {
|
|
||||||
this.confirmOrderClose(() -> {
|
|
||||||
mViewModel.stopProduction(prodLine);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void successDialog(String message, Runnable onComplete) {
|
public void successDialog(String message, Runnable onComplete) {
|
||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
@ -160,25 +139,10 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
|||||||
if (!dto.isStarted()) {
|
if (!dto.isStarted()) {
|
||||||
this.requestResources(dto);
|
this.requestResources(dto);
|
||||||
} else {
|
} else {
|
||||||
BottomSheetLineAction.newInstance(dto, this::requestResources, this::requestOrderChange, this::requestProductionStop, BarcodeManager::enable).show(getChildFragmentManager(), "BottomSheetLineAction");
|
requireActivity().startActivity(ProdDettaglioLineaActivity.newInstance(requireActivity(), dto));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void confirmOrderClose(Runnable onConfirm) {
|
|
||||||
this.onLoadingEnded();
|
|
||||||
requireActivity().runOnUiThread(() -> {
|
|
||||||
DialogSimpleMessageView.makeWarningDialog(
|
|
||||||
Html.fromHtml("Per completare l'operazione è necessario chiudere gli ordini attualmente aperti sulla linea."
|
|
||||||
+ "<br /> <br/>" +
|
|
||||||
"Continuare?"),
|
|
||||||
null,
|
|
||||||
onConfirm,
|
|
||||||
BarcodeManager::enable
|
|
||||||
).show(getChildFragmentManager(), "confirmOrderClose");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.gest.prod_linee_produzione;
|
package it.integry.integrywmsnative.gest.prod_linee_produzione;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
|
||||||
|
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
||||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceComponent;
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceComponent;
|
||||||
|
|
||||||
@ -12,14 +9,8 @@ import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceCompo
|
|||||||
public class ProdLineeProduzioneModule {
|
public class ProdLineeProduzioneModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
ProdLineeProduzioneViewModel providesProdRientroMerceViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer) {
|
ProdLineeProduzioneViewModel providesProdRientroMerceViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer) {
|
||||||
return new ProdLineeProduzioneViewModel(productionLinesRESTConsumer, barcodeRESTConsumer);
|
return new ProdLineeProduzioneViewModel(productionLinesRESTConsumer);
|
||||||
}
|
|
||||||
|
|
||||||
@Provides
|
|
||||||
@Singleton
|
|
||||||
ProductionLinesRESTConsumer providesProductionLinesRESTConsumer() {
|
|
||||||
return new ProductionLinesRESTConsumer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,40 +11,34 @@ import javax.inject.Inject;
|
|||||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
|
||||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||||
|
|
||||||
public class ProdLineeProduzioneViewModel {
|
public class ProdLineeProduzioneViewModel {
|
||||||
|
|
||||||
|
|
||||||
private final ProductionLinesRESTConsumer productionLinesRESTConsumer;
|
private final ProductionLinesRESTConsumer productionLinesRESTConsumer;
|
||||||
private final BarcodeRESTConsumer mBarcodeRESTConsumer;
|
|
||||||
private final MutableLiveData<List<ProdLineStatusDTO>> prodLines = new MutableLiveData<>();
|
private final MutableLiveData<List<ProdLineStatusDTO>> prodLines = new MutableLiveData<>();
|
||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public ProdLineeProduzioneViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer) {
|
public ProdLineeProduzioneViewModel(ProductionLinesRESTConsumer productionLinesRESTConsumer) {
|
||||||
this.productionLinesRESTConsumer = productionLinesRESTConsumer;
|
this.productionLinesRESTConsumer = productionLinesRESTConsumer;
|
||||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
this.sendOnLoadingStarted();
|
|
||||||
reloadLines();
|
reloadLines();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reloadLines() {
|
private void reloadLines() {
|
||||||
BarcodeManager.disable();
|
|
||||||
sendOnLoadingStarted();
|
sendOnLoadingStarted();
|
||||||
|
BarcodeManager.disable();
|
||||||
this.productionLinesRESTConsumer.getStatoLinee(SettingsManager.i().getUserSession().getDepo().getCodMdep(), lineeProdList -> {
|
this.productionLinesRESTConsumer.getStatoLinee(SettingsManager.i().getUserSession().getDepo().getCodMdep(), lineeProdList -> {
|
||||||
this.sendOnLoadingEnded();
|
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
prodLines.postValue(lineeProdList);
|
prodLines.postValue(lineeProdList);
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,15 +52,12 @@ public class ProdLineeProduzioneViewModel {
|
|||||||
|
|
||||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO) {
|
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO) {
|
||||||
String codJfas = barcodeScanDTO.getStringValue();
|
String codJfas = barcodeScanDTO.getStringValue();
|
||||||
|
|
||||||
ProdLineStatusDTO prodLine = prodLines.getValue() != null ? Stream.of(prodLines.getValue()).filter(x -> x.getCodJfas().equalsIgnoreCase(codJfas)).findFirstOrElse(null) : null;
|
ProdLineStatusDTO prodLine = prodLines.getValue() != null ? Stream.of(prodLines.getValue()).filter(x -> x.getCodJfas().equalsIgnoreCase(codJfas)).findFirstOrElse(null) : null;
|
||||||
if (prodLine != null) {
|
if (prodLine != null) {
|
||||||
this.onLineSelected(prodLine);
|
this.onLineSelected(prodLine);
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new Exception("Linea di produzione " + codJfas + " non trovata"));
|
this.sendError(new Exception("Linea di produzione " + codJfas + " non trovata"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -94,37 +85,6 @@ public class ProdLineeProduzioneViewModel {
|
|||||||
mListener.selectLine(lineSelected);
|
mListener.selectLine(lineSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkBarcodeAndStartOrdine(ProdLineStatusDTO prodLine, BarcodeScanDTO dto) {
|
|
||||||
this.sendOnLoadingStarted();
|
|
||||||
mBarcodeRESTConsumer.decodeEan128(dto, (ean128) -> {
|
|
||||||
String codMart = ean128.Content;
|
|
||||||
String partitaMag = ean128.BatchLot;
|
|
||||||
if (!prodLine.isStarted()) {
|
|
||||||
this.sendError(new Exception("Impossibile avviare una produzione su una linea ferma!"));
|
|
||||||
} else if (UtilityString.isNullOrEmpty(prodLine.getListaOrd())) {
|
|
||||||
this.startProduction(prodLine, codMart, partitaMag);
|
|
||||||
} else {
|
|
||||||
this.mListener.confirmOrderClose(() -> {
|
|
||||||
this.startProduction(prodLine, codMart, partitaMag);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, this::sendError);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void startProduction(ProdLineStatusDTO prodLine, String codMart, String partitaMag) {
|
|
||||||
this.sendOnLoadingStarted();
|
|
||||||
this.productionLinesRESTConsumer.avviaProduzioneArticoloSuLinea(prodLine.getCodJfas(), codMart, partitaMag,
|
|
||||||
() -> this.mListener.successDialog("Operazione completata", this::reloadLines),
|
|
||||||
this::sendError);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void stopProduction(ProdLineStatusDTO prodLine) {
|
|
||||||
this.sendOnLoadingStarted();
|
|
||||||
this.productionLinesRESTConsumer.arrestaLineaDiProduzione(prodLine.getCodJfas(),
|
|
||||||
() -> this.mListener.successDialog("Operazione completata", this::reloadLines),
|
|
||||||
this::sendError);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public interface Listener extends ILoadingListener {
|
public interface Listener extends ILoadingListener {
|
||||||
|
|
||||||
@ -134,8 +94,6 @@ public class ProdLineeProduzioneViewModel {
|
|||||||
|
|
||||||
void selectLine(ProdLineStatusDTO prodLineStatusDTO);
|
void selectLine(ProdLineStatusDTO prodLineStatusDTO);
|
||||||
|
|
||||||
void confirmOrderClose(Runnable onConfirm);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -16,12 +16,18 @@ public class ProdLineStatusDTO {
|
|||||||
|
|
||||||
private Date datetimeEnd;
|
private Date datetimeEnd;
|
||||||
|
|
||||||
|
private String codMart;
|
||||||
|
|
||||||
|
private String partitaMag;
|
||||||
|
|
||||||
private BigDecimal maxAllocazione;
|
private BigDecimal maxAllocazione;
|
||||||
|
|
||||||
private Integer qtaAllocate;
|
private Integer qtaAllocate;
|
||||||
|
|
||||||
private String listaOrd;
|
private String listaOrd;
|
||||||
|
|
||||||
|
private String descrizioneProd;
|
||||||
|
|
||||||
|
|
||||||
public String getCodJfas() {
|
public String getCodJfas() {
|
||||||
return codJfas;
|
return codJfas;
|
||||||
@ -126,4 +132,31 @@ public class ProdLineStatusDTO {
|
|||||||
return qtaAllocate + (maxAllocazione != null && maxAllocazione.compareTo(BigDecimal.ZERO) > 0 ? "/" + maxAllocazione : "");
|
return qtaAllocate + (maxAllocazione != null && maxAllocazione.compareTo(BigDecimal.ZERO) > 0 ? "/" + maxAllocazione : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdLineStatusDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdLineStatusDTO setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getDescrizioneProd() {
|
||||||
|
return descrizioneProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdLineStatusDTO setDescrizioneProd(String descrizioneProd) {
|
||||||
|
this.descrizioneProd = descrizioneProd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,8 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
|||||||
private FragmentProdRecuperoMaterialeBinding mBinding;
|
private FragmentProdRecuperoMaterialeBinding mBinding;
|
||||||
|
|
||||||
private int barcodeScannerIstanceID = -1;
|
private int barcodeScannerIstanceID = -1;
|
||||||
|
private String codJfas;
|
||||||
|
private String fragmentResultKeyString;
|
||||||
|
|
||||||
private final ObservableArrayList<HistoryULsListModel> mHistoryULMutableData = new ObservableArrayList<>();
|
private final ObservableArrayList<HistoryULsListModel> mHistoryULMutableData = new ObservableArrayList<>();
|
||||||
|
|
||||||
@ -67,10 +69,22 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static ProdRecuperoMaterialeFragment newInstance() {
|
public static ProdRecuperoMaterialeFragment newInstance() {
|
||||||
|
return newInstance(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ProdRecuperoMaterialeFragment newInstance(String codJfas, String keyString) {
|
||||||
ProdRecuperoMaterialeFragment fragment = new ProdRecuperoMaterialeFragment();
|
ProdRecuperoMaterialeFragment fragment = new ProdRecuperoMaterialeFragment();
|
||||||
|
if (keyString != null) {
|
||||||
|
fragment.setFragmentResultKeyString(keyString);
|
||||||
|
}
|
||||||
|
fragment.setCodJfas(codJfas);
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ProdRecuperoMaterialeFragment newInstance(String codJfas) {
|
||||||
|
return newInstance(codJfas, null);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
@ -89,6 +103,14 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
|||||||
this.initBarcodeReader();
|
this.initBarcodeReader();
|
||||||
this.initRecyclerView();
|
this.initRecyclerView();
|
||||||
|
|
||||||
|
this.addOnPreDestroy(() -> {
|
||||||
|
if (!UtilityString.isNullOrEmpty(fragmentResultKeyString)) {
|
||||||
|
Bundle result = new Bundle();
|
||||||
|
result.putString(fragmentResultKeyString, "result");
|
||||||
|
getParentFragmentManager().setFragmentResult(fragmentResultKeyString, result);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return mBinding.getRoot();
|
return mBinding.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,8 +118,12 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
|||||||
@Override
|
@Override
|
||||||
public void onStart() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
this.addOnPreDestroy(() -> {
|
||||||
mViewModel.init();
|
if (barcodeScannerIstanceID > -1) {
|
||||||
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mViewModel.init(codJfas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -115,6 +141,24 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
|||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCodJfas() {
|
||||||
|
return codJfas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRecuperoMaterialeFragment setCodJfas(String codJfas) {
|
||||||
|
this.codJfas = codJfas;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFragmentResultKeyString() {
|
||||||
|
return fragmentResultKeyString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRecuperoMaterialeFragment setFragmentResultKeyString(String fragmentResultKeyString) {
|
||||||
|
this.fragmentResultKeyString = fragmentResultKeyString;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||||
this.onLoadingStarted();
|
this.onLoadingStarted();
|
||||||
|
|
||||||
@ -133,7 +177,9 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
|||||||
|
|
||||||
mBinding.prodRecuperoMaterialeMainList.setAdapter(adapter);
|
mBinding.prodRecuperoMaterialeMainList.setAdapter(adapter);
|
||||||
|
|
||||||
|
if (mToolbar != null)
|
||||||
mToolbar.setRecyclerView(mBinding.prodRecuperoMaterialeMainList);
|
mToolbar.setRecyclerView(mBinding.prodRecuperoMaterialeMainList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshList(List<HistoryVersamentoProdULDTO> filteredList) {
|
private void refreshList(List<HistoryVersamentoProdULDTO> filteredList) {
|
||||||
|
|||||||
@ -51,11 +51,11 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
this.mPrinterRESTConsumer = printerRESTConsumer;
|
this.mPrinterRESTConsumer = printerRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init(String codJfas) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
|
|
||||||
mProdRecuperMaterialeRESTConsumer.loadLastULVersate(ulList -> {
|
mProdRecuperMaterialeRESTConsumer.loadLastULVersate(codJfas, ulList -> {
|
||||||
this.mUlList.setValue(ulList);
|
this.mUlList.setValue(ulList);
|
||||||
|
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
@ -115,7 +115,10 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
qtaDaEvadere = qtaDaEvadere.add(item.getQtaCol());
|
qtaDaEvadere = qtaDaEvadere.add(item.getQtaCol());
|
||||||
|
|
||||||
if (!UtilityBigDecimal.equalsTo(qtaDaEvadere, BigDecimal.ZERO)) {
|
if (!UtilityBigDecimal.equalsTo(qtaDaEvadere, BigDecimal.ZERO)) {
|
||||||
|
|
||||||
|
if(item.getMtbAart().isFlagQtaCnfFissaBoolean())
|
||||||
numCnfDaEvadere = UtilityBigDecimal.divide(qtaDaEvadere, item.getQtaCnf());
|
numCnfDaEvadere = UtilityBigDecimal.divide(qtaDaEvadere, item.getQtaCnf());
|
||||||
|
else numCnfDaEvadere = item.getNumCnf();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sendOnItemDispatched(item,
|
this.sendOnItemDispatched(item,
|
||||||
@ -151,6 +154,7 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
BigDecimal totalSumOfQtaCol = BigDecimal.ZERO;
|
BigDecimal totalSumOfQtaCol = BigDecimal.ZERO;
|
||||||
BigDecimal totalSumOfNumCnf = BigDecimal.ZERO;
|
BigDecimal totalSumOfNumCnf = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
if (SettingsManager.iDB().isFlagVersamentoDirettoProduzione()) {
|
||||||
for (HistoryVersamentoProdULDTO.OrdineDto ordine : item.getOrdini()) {
|
for (HistoryVersamentoProdULDTO.OrdineDto ordine : item.getOrdini()) {
|
||||||
|
|
||||||
BigDecimal qtaColToSave;
|
BigDecimal qtaColToSave;
|
||||||
@ -191,6 +195,39 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
mtbColrScarico.setOperation(CommonModelConsts.OPERATION.INSERT);
|
mtbColrScarico.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||||
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
BigDecimal qtaColToSave;
|
||||||
|
BigDecimal numCnfToSave;
|
||||||
|
if (SettingsManager.iDB().isFlagForceAllToColli() || (item.getMtbAart() != null && !item.getMtbAart().isFlagQtaCnfFissaBoolean())) {
|
||||||
|
numCnfToSave = inputNumCnf;
|
||||||
|
qtaColToSave = numCnfToSave.multiply(inputQtaCnf).setScale(0, BigDecimal.ROUND_FLOOR);
|
||||||
|
} else {
|
||||||
|
qtaColToSave = inputQtaTot;
|
||||||
|
numCnfToSave = UtilityBigDecimal.divide(qtaColToSave, item.getQtaCnf(), RoundingMode.FLOOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
totalSumOfQtaCol = qtaColToSave;
|
||||||
|
totalSumOfNumCnf = numCnfToSave;
|
||||||
|
|
||||||
|
numCnfToSave = numCnfToSave.multiply(BigDecimal.valueOf(-1));
|
||||||
|
qtaColToSave = qtaColToSave.multiply(BigDecimal.valueOf(-1));
|
||||||
|
|
||||||
|
final MtbColr mtbColrScarico = new MtbColr()
|
||||||
|
.setCodMart(item.getCodMart())
|
||||||
|
.setPartitaMag(UtilityString.empty2null(item.getPartitaMag()))
|
||||||
|
.setQtaCol(qtaColToSave)
|
||||||
|
.setQtaCnf(inputQtaCnf)
|
||||||
|
.setNumCnf(numCnfToSave)
|
||||||
|
.setDescrizione(UtilityString.isNullOrEmpty(item.getMtbAart().getDescrizioneEstesa()) ? item.getMtbAart().getDescrizione() : item.getMtbAart().getDescrizioneEstesa())
|
||||||
|
.setDatetimeRow(UtilityDate.getDateInstance())
|
||||||
|
.setNumColloRif(item.getNumColloRif())
|
||||||
|
.setDataColloRif(item.getDataColloRif())
|
||||||
|
.setGestioneRif(item.getGestioneRif())
|
||||||
|
.setSerColloRif(item.getSerColloRif());
|
||||||
|
|
||||||
|
mtbColrScarico.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||||
|
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
||||||
|
}
|
||||||
|
|
||||||
boolean updateQtaCnfFirstRow = false;
|
boolean updateQtaCnfFirstRow = false;
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,9 @@ import it.integry.integrywmsnative.core.model.MtbAart;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO;
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO;
|
||||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO;
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO;
|
||||||
|
|
||||||
@ -32,6 +35,10 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
|
|
||||||
public void loadLastULVersate(RunnableArgs<List<HistoryVersamentoProdULDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void loadLastULVersate(RunnableArgs<List<HistoryVersamentoProdULDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
loadLastULVersate(null, onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loadLastULVersate(String codJfas, RunnableArgs<List<HistoryVersamentoProdULDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
String sql = "WITH ul_list AS ( " +
|
String sql = "WITH ul_list AS ( " +
|
||||||
" SELECT jtb_fasi.cod_jfas, " +
|
" SELECT jtb_fasi.cod_jfas, " +
|
||||||
@ -68,7 +75,7 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
|||||||
" AND mtb_colr.data_collo = mtb_colt.data_collo " +
|
" AND mtb_colr.data_collo = mtb_colt.data_collo " +
|
||||||
" AND mtb_colr.ser_collo = mtb_colt.ser_collo " +
|
" AND mtb_colr.ser_collo = mtb_colt.ser_collo " +
|
||||||
" AND mtb_colr.gestione = mtb_colt.gestione " +
|
" AND mtb_colr.gestione = mtb_colt.gestione " +
|
||||||
" INNER JOIN dtb_ord_steps ON dtb_ord_steps.data_ord = mtb_colr.data_ord " +
|
" " + (SettingsManager.iDB().isFlagVersamentoDirettoProduzione() ? "INNER" : "LEFT OUTER") + " join dtb_ord_steps ON dtb_ord_steps.data_ord = mtb_colr.data_ord " +
|
||||||
" AND dtb_ord_steps.gestione = mtb_colr.gestione " +
|
" AND dtb_ord_steps.gestione = mtb_colr.gestione " +
|
||||||
" AND dtb_ord_steps.num_ord = mtb_colr.num_ord " +
|
" AND dtb_ord_steps.num_ord = mtb_colr.num_ord " +
|
||||||
" AND dtb_ord_steps.data_iniz is not null " +
|
" AND dtb_ord_steps.data_iniz is not null " +
|
||||||
@ -76,6 +83,7 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
|||||||
" INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " +
|
" INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " +
|
||||||
" LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " +
|
" LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " +
|
||||||
" WHERE jtb_fasi.cod_jfas IS NOT NULL " +
|
" WHERE jtb_fasi.cod_jfas IS NOT NULL " +
|
||||||
|
(UtilityString.isNullOrEmpty(codJfas) ? "" : " AND jtb_fasi.cod_jfas = " + UtilityDB.valueToString(codJfas)) +
|
||||||
" AND segno = -1 " +
|
" AND segno = -1 " +
|
||||||
" AND mtb_colr.data_collo > DATEADD(DAY, -5, GETDATE()) " +
|
" AND mtb_colr.data_collo > DATEADD(DAY, -5, GETDATE()) " +
|
||||||
" GROUP BY jtb_fasi.cod_jfas, " +
|
" GROUP BY jtb_fasi.cod_jfas, " +
|
||||||
@ -177,7 +185,8 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
|||||||
" ISNULL(max_ul.hr, '') = ISNULL(ul_list.hr, '') AND " +
|
" ISNULL(max_ul.hr, '') = ISNULL(ul_list.hr, '') AND " +
|
||||||
" max_ul.max_datetime_row = ul_list.datetime_row";
|
" max_ul.max_datetime_row = ul_list.datetime_row";
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdULRestDTO>>() {}.getType();
|
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdULRestDTO>>() {
|
||||||
|
}.getType();
|
||||||
this.mSystemRESTConsumer.<ArrayList<HistoryVersamentoProdULRestDTO>>processSql(sql, typeOfObjectsList, ulList -> {
|
this.mSystemRESTConsumer.<ArrayList<HistoryVersamentoProdULRestDTO>>processSql(sql, typeOfObjectsList, ulList -> {
|
||||||
|
|
||||||
if (ulList == null) {
|
if (ulList == null) {
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.widget.AppCompatTextView;
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.databinding.ObservableField;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -19,7 +20,9 @@ import javax.inject.Inject;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.MainApplication;
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||||
|
import it.integry.integrywmsnative.core.interfaces.ILifecycleFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
@ -32,9 +35,18 @@ import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFrag
|
|||||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
|
|
||||||
public class ProdRientroMerceFragment extends BaseFragment implements ITitledFragment, IScrollableFragment, ProdRientroMerceViewModel.Listener, BottomSheetFragmentLUContentView.Listener, BottomSheetMtbColrEditView.Listener {
|
public class ProdRientroMerceFragment extends BaseFragment implements
|
||||||
|
ITitledFragment,
|
||||||
|
IScrollableFragment,
|
||||||
|
ILifecycleFragment,
|
||||||
|
ProdRientroMerceViewModel.Listener,
|
||||||
|
BottomSheetFragmentLUContentView.Listener,
|
||||||
|
BottomSheetMtbColrEditView.Listener,
|
||||||
|
ProdRientroMerceOrderListFragment.OnRefreshListener {
|
||||||
|
|
||||||
|
|
||||||
|
public final ObservableField<Boolean> isLargeLayout = new ObservableField<>(false);
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
ProdRientroMerceViewModel mViewModel;
|
ProdRientroMerceViewModel mViewModel;
|
||||||
|
|
||||||
@ -56,20 +68,47 @@ public class ProdRientroMerceFragment extends BaseFragment implements ITitledFra
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setRetainInstance(true);
|
setRetainInstance(true);
|
||||||
|
|
||||||
|
boolean isLargeLayout = getResources().getBoolean(R.bool.large_layout);
|
||||||
|
this.isLargeLayout.set(isLargeLayout);
|
||||||
|
|
||||||
mProdRientroMerceOrderListFragment = ProdRientroMerceOrderListFragment.newInstance(mToolbar);
|
mProdRientroMerceOrderListFragment = ProdRientroMerceOrderListFragment.newInstance(mToolbar);
|
||||||
mProdRientroMerceOrderDetailFragment = ProdRientroMerceOrderDetailFragment.newInstance();
|
mProdRientroMerceOrderDetailFragment = ProdRientroMerceOrderDetailFragment.newInstance();
|
||||||
|
|
||||||
mProdRientroMerceOrderListFragment.setOnItemSelectedRunnable(mProdRientroMerceOrderDetailFragment::setOrder);
|
|
||||||
|
|
||||||
|
mProdRientroMerceOrderListFragment
|
||||||
|
.setOnItemSelectedRunnable(order -> {
|
||||||
|
if (!isLargeLayout) {
|
||||||
|
getChildFragmentManager()
|
||||||
|
.beginTransaction()
|
||||||
|
.show(mProdRientroMerceOrderDetailFragment)
|
||||||
|
.addToBackStack(ProdRientroMerceOrderDetailFragment.class.getName())
|
||||||
|
.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
mProdRientroMerceOrderDetailFragment.setOrder(order);
|
||||||
|
})
|
||||||
|
.setOnRefreshListener(this);
|
||||||
mProdRientroMerceOrderDetailFragment.setOnMtbColtClicked(item -> {
|
mProdRientroMerceOrderDetailFragment.setOnMtbColtClicked(item -> {
|
||||||
mBindings.bottomSheetMtbColrEdit.setMtbColr(item.getMtbColr().get(0));
|
mBindings.bottomSheetMtbColrEdit.setMtbColr(item.getMtbColr().get(0));
|
||||||
mBindings.bottomSheetMtbColrEdit.expand();
|
mBindings.bottomSheetMtbColrEdit.expand();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (isLargeLayout) {
|
||||||
getChildFragmentManager()
|
getChildFragmentManager()
|
||||||
.beginTransaction()
|
.beginTransaction()
|
||||||
.replace(R.id.order_list_fragment, mProdRientroMerceOrderListFragment)
|
.replace(R.id.left_side_fragment_container, mProdRientroMerceOrderListFragment)
|
||||||
.replace(R.id.order_detail_fragment, mProdRientroMerceOrderDetailFragment)
|
.replace(R.id.right_side_fragment_container, mProdRientroMerceOrderDetailFragment)
|
||||||
.commit();
|
.commit();
|
||||||
|
} else {
|
||||||
|
getChildFragmentManager()
|
||||||
|
.beginTransaction()
|
||||||
|
.add(R.id.full_width_container, mProdRientroMerceOrderListFragment)
|
||||||
|
.add(R.id.full_width_container, mProdRientroMerceOrderDetailFragment)
|
||||||
|
.hide(mProdRientroMerceOrderDetailFragment)
|
||||||
|
.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
MainApplication.appComponent
|
MainApplication.appComponent
|
||||||
.prodRientroMerceComponent()
|
.prodRientroMerceComponent()
|
||||||
@ -82,6 +121,8 @@ public class ProdRientroMerceFragment extends BaseFragment implements ITitledFra
|
|||||||
@Nullable Bundle savedInstanceState) {
|
@Nullable Bundle savedInstanceState) {
|
||||||
mBindings = DataBindingUtil.inflate(LayoutInflater.from(getActivity()), R.layout.fragment_prod_rientro_merce, container, false);
|
mBindings = DataBindingUtil.inflate(LayoutInflater.from(getActivity()), R.layout.fragment_prod_rientro_merce, container, false);
|
||||||
mBindings.setLifecycleOwner(this);
|
mBindings.setLifecycleOwner(this);
|
||||||
|
mBindings.setView(this);
|
||||||
|
mBindings.setViewmodel(mViewModel);
|
||||||
|
|
||||||
mViewModel.setListener(this);
|
mViewModel.setListener(this);
|
||||||
|
|
||||||
@ -94,12 +135,12 @@ public class ProdRientroMerceFragment extends BaseFragment implements ITitledFra
|
|||||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
|
||||||
if(savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
this.mViewModel.getOrdiniLavorazioneAperti().observe(this.getViewLifecycleOwner(), this::ordersUpdated);
|
this.mViewModel.getOrdiniLavorazioneAperti().observe(this.getViewLifecycleOwner(), this::ordersUpdated);
|
||||||
|
mViewModel.refreshOrderList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mViewModel.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
||||||
@ -139,7 +180,6 @@ public class ProdRientroMerceFragment extends BaseFragment implements ITitledFra
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void initBottomSheet() {
|
private void initBottomSheet() {
|
||||||
mBindings.bottomSheetMtbColrEdit.setListener(this);
|
mBindings.bottomSheetMtbColrEdit.setListener(this);
|
||||||
mBindings.bottomSheetMtbColrEdit.disableEditButton();
|
mBindings.bottomSheetMtbColrEdit.disableEditButton();
|
||||||
@ -157,7 +197,33 @@ public class ProdRientroMerceFragment extends BaseFragment implements ITitledFra
|
|||||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||||
null,
|
null,
|
||||||
() -> mProdRientroMerceOrderDetailFragment.deleteMtbColr(mtbColr),
|
() -> mProdRientroMerceOrderDetailFragment.deleteMtbColr(mtbColr),
|
||||||
() -> {}
|
() -> {
|
||||||
).show(getActivity().getSupportFragmentManager(), "tag");
|
}
|
||||||
|
).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onOrderLoadingStarted() {
|
||||||
|
BarcodeManager.disable();
|
||||||
|
this.mProdRientroMerceOrderListFragment.onOrderLoadingStarted();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onOrderLoadingEnded() {
|
||||||
|
BarcodeManager.enable();
|
||||||
|
this.mProdRientroMerceOrderListFragment.onOrderLoadingEnded();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRefresh() {
|
||||||
|
this.mViewModel.refreshOrderList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPreDestroy(Runnable onComplete) {
|
||||||
|
if(getChildFragmentManager().getBackStackEntryCount() > 0)
|
||||||
|
getChildFragmentManager().popBackStack();
|
||||||
|
|
||||||
|
else onComplete.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7,6 +7,7 @@ import java.util.List;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.IOrdersLoadingListener;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.OrdersLoadException;
|
import it.integry.integrywmsnative.gest.spedizione.exceptions.OrdersLoadException;
|
||||||
@ -25,12 +26,12 @@ public class ProdRientroMerceViewModel {
|
|||||||
this.mMesRESTConsumer = mesRESTConsumer;
|
this.mMesRESTConsumer = mesRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void refreshOrderList() {
|
||||||
new Thread(this::sendOnLoadingStarted).start();
|
new Thread(this::sendOnOrdersLoadingStarted).start();
|
||||||
|
|
||||||
this.mMesRESTConsumer.getOrdiniLavorazione("I", null, ordiniLavorazioneList -> {
|
this.mMesRESTConsumer.getOrdiniLavorazione("I", null, ordiniLavorazioneList -> {
|
||||||
this.mOrdiniLavorazioneAperti.postValue(ordiniLavorazioneList);
|
this.mOrdiniLavorazioneAperti.postValue(ordiniLavorazioneList);
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnOrdersLoadingEnded();
|
||||||
}, ex -> this.sendError(new OrdersLoadException(ex)));
|
}, ex -> this.sendError(new OrdersLoadException(ex)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,12 +52,20 @@ public class ProdRientroMerceViewModel {
|
|||||||
if (this.mListener != null) mListener.onLoadingEnded();
|
if (this.mListener != null) mListener.onLoadingEnded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sendOnOrdersLoadingStarted() {
|
||||||
|
if (this.mListener != null) mListener.onOrderLoadingStarted();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnOrdersLoadingEnded() {
|
||||||
|
if (this.mListener != null) mListener.onOrderLoadingEnded();
|
||||||
|
}
|
||||||
|
|
||||||
private void sendError(Exception ex) {
|
private void sendError(Exception ex) {
|
||||||
if (this.mListener != null) mListener.onError(ex);
|
if (this.mListener != null) mListener.onError(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public interface Listener extends ILoadingListener {
|
public interface Listener extends ILoadingListener, IOrdersLoadingListener {
|
||||||
|
|
||||||
void onDataSaved();
|
void onDataSaved();
|
||||||
|
|
||||||
|
|||||||
@ -113,11 +113,14 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
|
|
||||||
mViewModel.setListener(this);
|
mViewModel.setListener(this);
|
||||||
|
|
||||||
|
if(currentOrder.getValue() != null)
|
||||||
|
refreshOrder();
|
||||||
this.mViewModel.mtbColtsOfOrder.observe(getViewLifecycleOwner(), this::refreshList);
|
this.mViewModel.mtbColtsOfOrder.observe(getViewLifecycleOwner(), this::refreshList);
|
||||||
|
|
||||||
this.initRecyclerView();
|
this.initRecyclerView();
|
||||||
this.initULScaleBluetoothConnection();
|
this.initULScaleBluetoothConnection();
|
||||||
|
|
||||||
|
mBindings.executePendingBindings();
|
||||||
return mBindings.getRoot();
|
return mBindings.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,11 +185,15 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setOrder(OrdineLavorazioneDTO order) {
|
public void setOrder(OrdineLavorazioneDTO order) {
|
||||||
currentOrder.postValue(order);
|
currentOrder.setValue(order);
|
||||||
mBindings.invalidateAll();
|
|
||||||
mAdapter.clearDataset();
|
|
||||||
|
|
||||||
mViewModel.setOrder(order);
|
refreshOrder();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void refreshOrder() {
|
||||||
|
if(mBindings != null) mBindings.invalidateAll();
|
||||||
|
if(mAdapter != null) mAdapter.clearDataset();
|
||||||
|
if(mViewModel != null) mViewModel.setOrder(currentOrder.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshList(List<MtbColt> mtbColts) {
|
private void refreshList(List<MtbColt> mtbColts) {
|
||||||
|
|||||||
@ -70,7 +70,7 @@ public class ProdRientroMerceOrderDetailViewModel {
|
|||||||
.setCodJcom(currentOrder.getCodJcom())
|
.setCodJcom(currentOrder.getCodJcom())
|
||||||
.setCodJfas(pickedQuantityDTO.getJtbFasi() != null ? pickedQuantityDTO.getJtbFasi().getCodJfas() : null)
|
.setCodJfas(pickedQuantityDTO.getJtbFasi() != null ? pickedQuantityDTO.getJtbFasi().getCodJfas() : null)
|
||||||
.setCodMart(currentOrder.getCodProd())
|
.setCodMart(currentOrder.getCodProd())
|
||||||
.setCodTcol(pickedQuantityDTO.getMtbTCol().getCodTcol())
|
.setCodTcol(pickedQuantityDTO.getMtbTCol() != null ? pickedQuantityDTO.getMtbTCol().getCodTcol() : null)
|
||||||
.setDataCollo(new Date())
|
.setDataCollo(new Date())
|
||||||
.setDataOrd(currentOrder.getDataOrdD())
|
.setDataOrd(currentOrder.getDataOrdD())
|
||||||
.setNumOrd(currentOrder.getNumOrd())
|
.setNumOrd(currentOrder.getNumOrd())
|
||||||
|
|||||||
@ -36,12 +36,10 @@ import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
|||||||
public class ProdRientroMerceOrderListFragment extends Fragment {
|
public class ProdRientroMerceOrderListFragment extends Fragment {
|
||||||
|
|
||||||
private final ObservableArrayList<ProdRientroMerceOrderListModel> mOrdiniApertiMutableData = new ObservableArrayList<>();
|
private final ObservableArrayList<ProdRientroMerceOrderListModel> mOrdiniApertiMutableData = new ObservableArrayList<>();
|
||||||
|
|
||||||
private FragmentProdRientroMerceOrderListBinding mBindings = null;
|
private FragmentProdRientroMerceOrderListBinding mBindings = null;
|
||||||
|
|
||||||
private RunnableArgs<OrdineLavorazioneDTO> mOnItemSelectedRunnable;
|
private RunnableArgs<OrdineLavorazioneDTO> mOnItemSelectedRunnable;
|
||||||
|
|
||||||
private ElevatedToolbar mToolbar;
|
private ElevatedToolbar mToolbar;
|
||||||
|
private OnRefreshListener onRefreshListener;
|
||||||
|
|
||||||
public ProdRientroMerceOrderListFragment() {
|
public ProdRientroMerceOrderListFragment() {
|
||||||
// Required empty public constructor
|
// Required empty public constructor
|
||||||
@ -93,6 +91,10 @@ public class ProdRientroMerceOrderListFragment extends Fragment {
|
|||||||
this.mBindings.mainList.setLayoutManager(new LinearLayoutManager(getActivity()));
|
this.mBindings.mainList.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
|
|
||||||
this.mToolbar.setRecyclerView(mBindings.mainList);
|
this.mToolbar.setRecyclerView(mBindings.mainList);
|
||||||
|
|
||||||
|
this.mBindings.swiperefresh.setOnRefreshListener(() -> {
|
||||||
|
if(onRefreshListener != null) onRefreshListener.onRefresh();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void pushOrderList(List<OrdineLavorazioneDTO> orderList) {
|
public void pushOrderList(List<OrdineLavorazioneDTO> orderList) {
|
||||||
@ -101,6 +103,14 @@ public class ProdRientroMerceOrderListFragment extends Fragment {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onOrderLoadingStarted() {
|
||||||
|
this.mBindings.swiperefresh.setRefreshing(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onOrderLoadingEnded() {
|
||||||
|
this.mBindings.swiperefresh.setRefreshing(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<ProdRientroMerceOrderListModel> convertDataModelToListModel(List<OrdineLavorazioneDTO> dataList) {
|
private List<ProdRientroMerceOrderListModel> convertDataModelToListModel(List<OrdineLavorazioneDTO> dataList) {
|
||||||
|
|
||||||
@ -164,4 +174,13 @@ public class ProdRientroMerceOrderListFragment extends Fragment {
|
|||||||
public RecyclerView getList() {
|
public RecyclerView getList() {
|
||||||
return mBindings.mainList;
|
return mBindings.mainList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListFragment setOnRefreshListener(OnRefreshListener onRefreshListener) {
|
||||||
|
this.onRefreshListener = onRefreshListener;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnRefreshListener {
|
||||||
|
void onRefresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -495,6 +495,6 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
@Override
|
@Override
|
||||||
public void onPreDestroy(Runnable onComplete) {
|
public void onPreDestroy(Runnable onComplete) {
|
||||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
mViewModel.closeLU(false, onComplete);
|
mViewModel.closeLU(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -757,6 +757,9 @@ public class SpedizioneViewModel {
|
|||||||
this.getPickingList().postValue(pickingList);
|
this.getPickingList().postValue(pickingList);
|
||||||
} else {
|
} else {
|
||||||
MtbColt refMtbColt = matchedItem.getRefMtbColt();
|
MtbColt refMtbColt = matchedItem.getRefMtbColt();
|
||||||
|
if (matchedItem.getMtbColts() != null && matchedItem.getMtbColts().size() == 1) {
|
||||||
|
refMtbColt = matchedItem.getMtbColts().get(0);
|
||||||
|
}
|
||||||
MtbColr refMtbColr = refMtbColt != null ? refMtbColt.getMtbColr().get(0) : null;
|
MtbColr refMtbColr = refMtbColt != null ? refMtbColt.getMtbColr().get(0) : null;
|
||||||
this.dispatchOrdineRow(matchedItem, refMtbColt, refMtbColr, refMtbColr == null);
|
this.dispatchOrdineRow(matchedItem, refMtbColt, refMtbColr, refMtbColr == null);
|
||||||
}
|
}
|
||||||
@ -1879,6 +1882,7 @@ public class SpedizioneViewModel {
|
|||||||
.setCodAnag(ord.getCodAnagOrd());
|
.setCodAnag(ord.getCodAnagOrd());
|
||||||
return ordV;
|
return ordV;
|
||||||
}).toList();
|
}).toList();
|
||||||
|
|
||||||
dto.setPrintList(closedOrders);
|
dto.setPrintList(closedOrders);
|
||||||
printClosedOrders(dto, this::sendOnOrderClosed, ex -> this.sendLUPrintError(ex, this::sendOnLoadingEnded));
|
printClosedOrders(dto, this::sendOnOrderClosed, ex -> this.sendLUPrintError(ex, this::sendOnLoadingEnded));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,6 +31,7 @@ public class DialogInputQuantityV2DTO {
|
|||||||
private boolean isDataScadMandatory = false;
|
private boolean isDataScadMandatory = false;
|
||||||
private boolean isNotesAllowed = false;
|
private boolean isNotesAllowed = false;
|
||||||
private boolean isNotesMandatory = false;
|
private boolean isNotesMandatory = false;
|
||||||
|
private boolean isFocusOnStart = true;
|
||||||
private boolean canLUBeClosed;
|
private boolean canLUBeClosed;
|
||||||
private boolean saveOnImeDone = false;
|
private boolean saveOnImeDone = false;
|
||||||
|
|
||||||
@ -131,6 +132,15 @@ public class DialogInputQuantityV2DTO {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFocusOnStart() {
|
||||||
|
return isFocusOnStart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputQuantityV2DTO setFocusOnStart(boolean focusOnStart) {
|
||||||
|
isFocusOnStart = focusOnStart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public BigDecimal getTotalQtaAvailable() {
|
public BigDecimal getTotalQtaAvailable() {
|
||||||
return UtilityBigDecimal.round(totalQtaAvailable);
|
return UtilityBigDecimal.round(totalQtaAvailable);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import com.pedromassango.doubleclick.DoubleClick;
|
|||||||
import com.pedromassango.doubleclick.DoubleClickListener;
|
import com.pedromassango.doubleclick.DoubleClickListener;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@ -57,6 +58,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
private Runnable mOnAbort;
|
private Runnable mOnAbort;
|
||||||
|
|
||||||
public ObservableField<Integer> currentTextNumCnfToTake = new ObservableField<>(0);
|
public ObservableField<Integer> currentTextNumCnfToTake = new ObservableField<>(0);
|
||||||
|
public ObservableField<Boolean> flagShowCnfToTakeLabel = new ObservableField<>(true);
|
||||||
public ObservableField<Integer> currentTextNumPezziToTake = new ObservableField<>(0);
|
public ObservableField<Integer> currentTextNumPezziToTake = new ObservableField<>(0);
|
||||||
|
|
||||||
public ObservableField<String> currentPartitaMag = new ObservableField<>();
|
public ObservableField<String> currentPartitaMag = new ObservableField<>();
|
||||||
@ -87,7 +89,6 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
private boolean mObservablesInitated = false;
|
private boolean mObservablesInitated = false;
|
||||||
|
|
||||||
private int mBarcodeScannerIstanceID;
|
private int mBarcodeScannerIstanceID;
|
||||||
private boolean mFirstStart = true;
|
|
||||||
private boolean mAbort = true;
|
private boolean mAbort = true;
|
||||||
|
|
||||||
|
|
||||||
@ -168,7 +169,9 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.onLoadingEnded();
|
this.onLoadingEnded();
|
||||||
|
if (mDialogInputQuantityV2DTO.isFocusOnStart()) {
|
||||||
mBindings.inputNumCnfText.requestFocus();
|
mBindings.inputNumCnfText.requestFocus();
|
||||||
|
}
|
||||||
return mBindings.getRoot();
|
return mBindings.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,9 +184,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||||
this.onLoadingStarted();
|
this.onLoadingStarted();
|
||||||
|
|
||||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||||
this.onLoadingEnded();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public void save() {
|
public void save() {
|
||||||
@ -213,15 +214,13 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
public void onStart() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
|
||||||
// if(!mFirstStart) {
|
|
||||||
this.init();
|
this.init();
|
||||||
// mFirstStart = false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
int onNumCnfInputChanged = SettingsManager.iDB().getOnNumCnfInputChanged();
|
int onNumCnfInputChanged = SettingsManager.iDB().getOnNumCnfInputChanged();
|
||||||
|
int onQtaTotInputChanged = SettingsManager.iDB().getOnQtaTotInputChanged();
|
||||||
|
|
||||||
this.mViewModel.setListener(this);
|
this.mViewModel.setListener(this);
|
||||||
this.mViewModel.init(onNumCnfInputChanged);
|
this.mViewModel.init(onNumCnfInputChanged, onQtaTotInputChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initViewObservables() {
|
private void initViewObservables() {
|
||||||
@ -407,9 +406,10 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
this.enabledLUCloseButton.set(this.mDialogInputQuantityV2DTO.isCanLUBeClosed());
|
this.enabledLUCloseButton.set(this.mDialogInputQuantityV2DTO.isCanLUBeClosed());
|
||||||
this.currentTaraArticolo.set(this.mViewModel.getMtbAart().getTaraKg());
|
this.currentTaraArticolo.set(this.mViewModel.getMtbAart().getTaraKg());
|
||||||
|
|
||||||
if (this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd() != null && !this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd().equals(BigDecimal.ZERO) && !(this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd().intValue() == 0)) {
|
if (this.mDialogInputQuantityV2DTO.getMtbAart().isFlagQtaCnfFissaBoolean() && this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd() != null && !this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd().equals(BigDecimal.ZERO) && !(this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd().intValue() == 0)) {
|
||||||
this.currentTextNumCnfToTake.set(this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd().intValue());
|
int numCnftoTake = this.mDialogInputQuantityV2DTO.getTotalQtaOrd().divide(this.mDialogInputQuantityV2DTO.getQtaCnfOrd(), 0, RoundingMode.DOWN).intValue();
|
||||||
int qtaText = this.mDialogInputQuantityV2DTO.getTotalQtaOrd().intValue() % this.mDialogInputQuantityV2DTO.getTotalNumCnfOrd().intValue();
|
this.currentTextNumCnfToTake.set(numCnftoTake);
|
||||||
|
int qtaText = this.mDialogInputQuantityV2DTO.getTotalQtaOrd().intValue() % this.mDialogInputQuantityV2DTO.getQtaCnfOrd().intValue();
|
||||||
this.currentTextNumPezziToTake.set(qtaText);
|
this.currentTextNumPezziToTake.set(qtaText);
|
||||||
} else {
|
} else {
|
||||||
this.currentTextNumCnfToTake.set(0);
|
this.currentTextNumCnfToTake.set(0);
|
||||||
@ -451,6 +451,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
BigDecimal taraTot = this.mViewModel.getNumCnf().multiply(articolo.getTaraKg());
|
BigDecimal taraTot = this.mViewModel.getNumCnf().multiply(articolo.getTaraKg());
|
||||||
this.currentTaraTot.set(taraTot);
|
this.currentTaraTot.set(taraTot);
|
||||||
this.currentPesoLordo.set(this.mViewModel.getQtaTot().add(taraTot));
|
this.currentPesoLordo.set(this.mViewModel.getQtaTot().add(taraTot));
|
||||||
|
this.flagShowCnfToTakeLabel.set(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mBindings.executePendingBindings();
|
this.mBindings.executePendingBindings();
|
||||||
|
|||||||
@ -70,6 +70,7 @@ public class DialogInputQuantityV2ViewModel {
|
|||||||
private boolean canOverflowOrderQuantity;
|
private boolean canOverflowOrderQuantity;
|
||||||
private boolean canPartitaMagBeChanged;
|
private boolean canPartitaMagBeChanged;
|
||||||
private int onNumCnfInputChanged;
|
private int onNumCnfInputChanged;
|
||||||
|
private int onQtaTotInputChanged;
|
||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
@ -80,8 +81,9 @@ public class DialogInputQuantityV2ViewModel {
|
|||||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(int onNumCnfInputChanged) {
|
public void init(int onNumCnfInputChanged, int onQtaTotInputChanged) {
|
||||||
this.onNumCnfInputChanged = onNumCnfInputChanged;
|
this.onNumCnfInputChanged = onNumCnfInputChanged;
|
||||||
|
this.onQtaTotInputChanged = onQtaTotInputChanged;
|
||||||
|
|
||||||
if (this.initialNumCnf != null && this.initialQtaTot != null && this.initialQtaCnf != null) {
|
if (this.initialNumCnf != null && this.initialQtaTot != null && this.initialQtaCnf != null) {
|
||||||
this.internalNumCnf = this.initialNumCnf;
|
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)
|
if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalNumCnf != null)
|
||||||
this.internalQtaCnf = UtilityBigDecimal.divide(newValue, internalNumCnf);
|
this.internalQtaCnf = UtilityBigDecimal.divide(newValue, internalNumCnf);
|
||||||
else if (!this.blockedNumCnf.get() && this.internalQtaCnf != null)
|
else if (!this.blockedNumCnf.get() && this.internalQtaCnf != null)
|
||||||
this.internalNumCnf = UtilityBigDecimal.divide(newValue, internalQtaCnf);
|
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();
|
this.mListener.onDataChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,7 +98,7 @@ public class DialogScanArtView extends BaseDialogFragment implements DialogScanA
|
|||||||
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
.setOnScanSuccessful(onScanSuccessfull)
|
.setOnScanSuccessful(onScanSuccessfull)
|
||||||
.setOnScanFailed(this::onError));
|
.setOnScanFailed(this::onError));
|
||||||
|
BarcodeManager.enable();
|
||||||
setBarcodeListener(true);
|
setBarcodeListener(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -115,7 +115,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
|||||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
if(openedMtbColt == null) {
|
if (openedMtbColt == null) {
|
||||||
mOnComplete.run(null, false);
|
mOnComplete.run(null, false);
|
||||||
}
|
}
|
||||||
super.onDismiss(dialog);
|
super.onDismiss(dialog);
|
||||||
@ -126,7 +126,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
|||||||
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
.setOnScanSuccessful(onScanSuccessfull)
|
.setOnScanSuccessful(onScanSuccessfull)
|
||||||
.setOnScanFailed(this::onError));
|
.setOnScanFailed(this::onError));
|
||||||
|
BarcodeManager.enable();
|
||||||
setBarcodeListener(true);
|
setBarcodeListener(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<ripple
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:color="@color/colorRipple"> <!-- ripple color -->
|
|
||||||
|
|
||||||
<!-- for Button -->
|
|
||||||
<item>
|
|
||||||
<shape android:shape="rectangle">
|
|
||||||
<solid android:color="@color/full_white"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
</ripple>
|
|
||||||
@ -193,7 +193,7 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="2dp"
|
android:layout_marginTop="2dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:visibility="@{view.currentTextNumCnfToTake > 0 || view.currentTextNumPezziToTake > 0 ? View.VISIBLE : View.GONE}">
|
android:visibility="@{view.flagShowCnfToTakeLabel && (view.currentTextNumCnfToTake > 0 || view.currentTextNumPezziToTake > 0 )? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
|||||||
150
app/src/main/res/layout-large/activity_login.xml
Normal file
150
app/src/main/res/layout-large/activity_login.xml
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.gest.login.LoginActivity" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="?attr/colorPrimarySurface"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="32dp"
|
||||||
|
app:cardCornerRadius="16dp">
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="24dp"
|
||||||
|
android:paddingTop="56dp"
|
||||||
|
android:paddingRight="24dp"
|
||||||
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@drawable/logo_integry_testo" />
|
||||||
|
|
||||||
|
<!-- Username Label -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:errorText="@{view.usernameError}"
|
||||||
|
app:hintTextAppearance="@style/hint_text">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_username"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="300dp"
|
||||||
|
android:hint="Username"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
app:binding="@{view.username}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- Password Label -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:errorText="@{view.passwordError}"
|
||||||
|
app:hintTextAppearance="@style/hint_text"
|
||||||
|
app:passwordToggleEnabled="true">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_password"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="300dp"
|
||||||
|
android:hint="Password"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
app:binding="@{view.password}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatCheckBox
|
||||||
|
android:id="@+id/login_checkbox_custom_server"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.customSettingsCheckboxEnabled}"
|
||||||
|
android:text="@string/action_customize_server_settings"
|
||||||
|
app:checked="@{view.customSettingsCheckboxChecked}" />
|
||||||
|
|
||||||
|
<net.cachapa.expandablelayout.ExpandableLayout
|
||||||
|
android:id="@+id/login_layout_server_details"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="6dp"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
app:el_duration="400"
|
||||||
|
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--Host Label-->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
app:errorText="@{view.codAziendaError}"
|
||||||
|
app:hintTextAppearance="@style/hint_text">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_cod_azienda"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Codice azienda"
|
||||||
|
android:inputType="text"
|
||||||
|
app:binding="@{view.codAzienda}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btn_login"
|
||||||
|
style="@style/Button.PrimaryFull"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:minWidth="170dp"
|
||||||
|
android:enabled="@{view.loginButtonEnabled}"
|
||||||
|
android:text="@string/login"
|
||||||
|
app:onClick="@{() -> view.login()}" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
</ScrollView>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
</layout>
|
||||||
@ -0,0 +1,712 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
|
|
||||||
|
<import type="androidx.core.content.ContextCompat" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneStatoEnum" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailFragment" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/gray_200"
|
||||||
|
android:padding="8dp"
|
||||||
|
tools:context=".gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailFragment">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:id="@+id/scroll_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/empty_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:alpha="0.3"
|
||||||
|
android:visibility="@{view.currentOrder != null ? View.GONE : View.VISIBLE}">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_empty_top"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_percent="0.4" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_empty_left"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.15" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_empty_right"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.85" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/guideline_empty_right"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/guideline_empty_left"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/guideline_empty_top">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="72dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@drawable/ic_info_78dp"
|
||||||
|
android:tint="@android:color/black" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/no_one_order_selected"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:visibility="@{view.currentOrder == null ? View.GONE : View.VISIBLE}"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="4dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:paddingBottom="16dp">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_toStartOf="@id/ordine_state_icon"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityDate.formatDate(view.currentOrder.dataOrdD, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
tools:text="28 maggio 2021" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{`Ordine #`+ view.currentOrder.numOrd.toString()}"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="Ordine #218" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/ordine_state_icon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:src="@{view.orderStatusIcon}"
|
||||||
|
android:tint="@{view.orderStatusIconTintColor}"
|
||||||
|
tools:src="@drawable/ic_info_78dp"
|
||||||
|
tools:tint="@color/blue_700" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:background="@{view.orderStatusLabelBackgroud}"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:text="@{view.currentOrder.stato}"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.ExtraSmall"
|
||||||
|
android:textColor="@{view.orderStatusLabelTextColor}"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:background="@drawable/label_primary_text"
|
||||||
|
tools:text="PROGRAMMATO"
|
||||||
|
tools:textColor="@color/blue_800" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/provenienza_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_toStartOf="@id/totale_bancali_layout"
|
||||||
|
android:visibility="@{view.currentOrder.codAnag != null ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:src="@drawable/ic_person_filled_24dp"
|
||||||
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Provenienza"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.ExtraSmall"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{view.currentOrder.ragSocAnag + ` (` + view.currentOrder.codAnag + `)`}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:visibility="@{view.currentOrder.ragSocAnag != null ? View.VISIBLE : View.GONE}"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
tools:text="FRUDIS S.R.L. (F0312)" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/totale_bancali_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Totale bancali"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.ExtraSmall"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(view.sumLUNumber, 0)}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
tools:text="0" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=" UL"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=" ("
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(view.sumColliNumber, 0)}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
tools:text="0" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=" COL)"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:src="@drawable/ic_pallet_96px"
|
||||||
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/cliente_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:src="@drawable/ic_person_filled_24dp"
|
||||||
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Cliente"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.ExtraSmall"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{view.currentOrder.descCommessa != null ? view.currentOrder.descCommessa : `-`}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
tools:text="GRUNDHOFER GBMH" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_toEndOf="@id/cliente_layout"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Totale netto"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.ExtraSmall"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(view.sumNetKG, 0)}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
tools:text="0" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=" KG"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:src="@drawable/ic_weight_kg_96px"
|
||||||
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/orari_produzione_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:src="@drawable/ic_workers_96px"
|
||||||
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Orari produzione"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.ExtraSmall"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="@{view.currentOrder.dataInizD != null ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityDate.formatDate(view.currentOrder.dataInizD, UtilityDate.COMMONS_DATE_FORMATS.DM_TIME_SLASH)}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
tools:text="11:00:00" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=" - "
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityDate.formatDate(view.currentOrder.dataFineD, UtilityDate.COMMONS_DATE_FORMATS.DM_TIME_SLASH)}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:visibility="@{view.currentOrder.dataFineD != null ? View.VISIBLE : View.GONE}"
|
||||||
|
tools:text="18:00:00" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="IN CORSO"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:visibility="@{view.currentOrder.dataFineD == null ? View.VISIBLE : View.GONE}"
|
||||||
|
tools:text="IN CORSO"
|
||||||
|
tools:visibility="gone" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Non avviato"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:visibility="@{view.currentOrder.dataInizD == null ? View.VISIBLE : View.GONE}"
|
||||||
|
tools:visibility="gone" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_toEndOf="@id/orari_produzione_layout"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Totale lordo"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.ExtraSmall"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(view.sumGrossKG, 0)}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
tools:text="0" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=" KG"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:src="@drawable/ic_weight_kg_96px"
|
||||||
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/button_confirm"
|
||||||
|
style="@style/Button.PrimaryOutline"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/add_lu"
|
||||||
|
app:icon="@drawable/ic_add_24dp"
|
||||||
|
app:singleClick="@{() -> view.addULButtonClick()}" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Lista bancali"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/main_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/mtb_colt_empty_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:alpha="0.3"
|
||||||
|
tools:context=".gest.lista_bancali.ListaBancaliActivity">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/mtb_colt_guideline_empty_top"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_percent="0.15" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/mtb_colt_guideline_empty_left"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.15" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/mtb_colt_guideline_empty_right"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.85" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="32dp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/mtb_colt_guideline_empty_right"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/mtb_colt_guideline_empty_left"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/mtb_colt_guideline_empty_top">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="72dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@drawable/ic_playlist_add_check_24dp" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/no_lu_found_message"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
</layout>
|
||||||
@ -60,7 +60,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:background="@drawable/ripple_effect"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/ic_search_black_24dp"
|
android:src="@drawable/ic_search_black_24dp"
|
||||||
android:onClick="@{()->view.manualSearch()}"
|
android:onClick="@{()->view.manualSearch()}"
|
||||||
|
|||||||
@ -32,13 +32,13 @@
|
|||||||
|
|
||||||
<!-- Username Label -->
|
<!-- Username Label -->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:errorText="@{view.usernameError}"
|
app:errorText="@{view.usernameError}"
|
||||||
app:hintTextAppearance="@style/hint_text"
|
app:hintTextAppearance="@style/hint_text">
|
||||||
style="@style/TextInputLayout.OutlinePrimary">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_username"
|
android:id="@+id/input_username"
|
||||||
@ -51,14 +51,14 @@
|
|||||||
|
|
||||||
<!-- Password Label -->
|
<!-- Password Label -->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:errorText="@{view.passwordError}"
|
app:errorText="@{view.passwordError}"
|
||||||
app:hintTextAppearance="@style/hint_text"
|
app:hintTextAppearance="@style/hint_text"
|
||||||
app:passwordToggleEnabled="true"
|
app:passwordToggleEnabled="true">
|
||||||
style="@style/TextInputLayout.OutlinePrimary">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_password"
|
android:id="@+id/input_password"
|
||||||
@ -93,12 +93,12 @@
|
|||||||
|
|
||||||
<!--Host Label-->
|
<!--Host Label-->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:errorText="@{view.codAziendaError}"
|
app:errorText="@{view.codAziendaError}"
|
||||||
app:hintTextAppearance="@style/hint_text"
|
app:hintTextAppearance="@style/hint_text">
|
||||||
style="@style/TextInputLayout.OutlinePrimary">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_cod_azienda"
|
android:id="@+id/input_cod_azienda"
|
||||||
@ -128,4 +128,6 @@
|
|||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
341
app/src/main/res/layout/activity_prod_dettaglio_linea.xml
Normal file
341
app/src/main/res/layout/activity_prod_dettaglio_linea.xml
Normal file
@ -0,0 +1,341 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.R" />
|
||||||
|
|
||||||
|
<import type="androidx.core.content.ContextCompat" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewModel"
|
||||||
|
type="it.integry.integrywmsnative.gest.prod_dettaglio_linea.ProdDettaglioLineaViewModel" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.gest.prod_dettaglio_linea.ProdDettaglioLineaActivity" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/gray_detail_background_round8">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/header_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
<it.integry.integrywmsnative.ui.ElevatedToolbar
|
||||||
|
android:id="@+id/elevated_toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?actionBarSize">
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
</it.integry.integrywmsnative.ui.ElevatedToolbar>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/frame_layout_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
|
||||||
|
android:text="@{view.lineaLabel}"
|
||||||
|
tools:text="L2 - Linea 2"
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
android:id="@+id/add_extra_items_toolbar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:onClick="@{()->viewModel.settings()}"
|
||||||
|
android:src="@drawable/ic_settings_24dp"
|
||||||
|
android:tint="@color/colorPrimaryGray" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/image"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:src="@{ContextCompat.getDrawable(context, view.isStarted.get() ? R.drawable.ic_baseline_play_arrow_24 : view.isPaused.get() ? R.drawable.ic_baseline_pause_24 : R.drawable.ic_baseline_stop_24)}"
|
||||||
|
app:tint="@{ContextCompat.getColor(context, view.isStarted.get() ? R.color.green_600 : view.isPaused.get() ? R.color.orange_600 : R.color.red_600)}"
|
||||||
|
tools:tint="@color/green_600"
|
||||||
|
tools:src="@drawable/ic_baseline_play_arrow_24" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/peso_lordo_collo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:text="@{view.isStarted.get() ? R.string.in_progress : view.isPaused.get() ? R.string.stand_by : R.string.stopped}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
app:textColor="@{ContextCompat.getColor(context, view.isStarted.get() ? R.color.green_600 : view.isPaused.get() ? R.color.orange_600 : R.color.red_600)}"
|
||||||
|
tools:textColor="@color/green_600"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="In lavorazione" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:visibility="@{view.isStarted}"
|
||||||
|
android:layout_marginTop="16dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/risorse_impostate"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
tools:text="Risorse assegnate" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
app:text="@{view.hrNum}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="25" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:visibility="@{view.flagShowProdInfo}"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/production_in_progress"
|
||||||
|
tools:text="Lavorazione in corso"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.TextBoxGroupTitleDashboard" />
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/article"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
tools:text="Articolo" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
app:text="@{view.codMart}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="150150-09" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/batch_lot"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
tools:text="Lotto" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
app:text="@{view.partitaMag}"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="20220530" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
|
||||||
|
>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/label_descrizione"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/description"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="Descrizione" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:gravity="end"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/label_descrizione"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:text="@{view.productDescription}"
|
||||||
|
tools:text="UVA VITTORIA IN CASSE " />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/orders_in_progress"
|
||||||
|
tools:text="Ordini in lavorazione"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium" />
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.chip.ChipGroup
|
||||||
|
android:id="@+id/orders_list"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
|
||||||
|
</com.google.android.material.chip.ChipGroup>
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/versamento_merce_fragment_title"
|
||||||
|
android:textAppearance="@style/AppTheme.NewMaterial.Text.TextBoxGroupTitleDashboard" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/scan_art_spinner"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/header_content"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progressBar"
|
||||||
|
style="?android:attr/progressBarStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/scan_lu_to_deposit"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@ -53,7 +53,7 @@
|
|||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@drawable/ripple_effect"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:onClick="@{()->viewModel.manualSearch()}"
|
android:onClick="@{()->viewModel.manualSearch()}"
|
||||||
android:src="@drawable/ic_search_black_24dp"
|
android:src="@drawable/ic_search_black_24dp"
|
||||||
android:tint="@color/colorPrimaryGray" />
|
android:tint="@color/colorPrimaryGray" />
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@drawable/ripple_effect"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:src="@drawable/ic_add_24dp"
|
android:src="@drawable/ic_add_24dp"
|
||||||
android:tint="@color/colorPrimaryGray"
|
android:tint="@color/colorPrimaryGray"
|
||||||
app:visibility="@{spedizioneView.addExtraItemsEnabled}"
|
app:visibility="@{spedizioneView.addExtraItemsEnabled}"
|
||||||
@ -73,7 +73,7 @@
|
|||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@drawable/ripple_effect"
|
android:background="?attr/selectableItemBackground"
|
||||||
app:singleClick="@{() -> spedizioneView.startManualSearch()}"
|
app:singleClick="@{() -> spedizioneView.startManualSearch()}"
|
||||||
android:src="@drawable/ic_black_barcode"
|
android:src="@drawable/ic_black_barcode"
|
||||||
android:tint="@color/colorPrimaryGray"
|
android:tint="@color/colorPrimaryGray"
|
||||||
|
|||||||
@ -8,18 +8,19 @@
|
|||||||
|
|
||||||
<import type="it.integry.integrywmsnative.R" />
|
<import type="it.integry.integrywmsnative.R" />
|
||||||
|
|
||||||
|
<import type="androidx.core.content.ContextCompat" />
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
|
|
||||||
<import type="android.view.View" />
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<import type="androidx.core.content.ContextCompat" />
|
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
type="it.integry.integrywmsnative.gest.prod_linee_produzione.dialogs.BottomSheetLineAction"
|
type="it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs.BottomSheetLineAction"
|
||||||
name="view" />
|
name="view" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
@ -32,7 +33,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="8dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:id="@+id/descriptionLayout"
|
android:id="@+id/descriptionLayout"
|
||||||
@ -202,6 +203,30 @@
|
|||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:onClick="@{()->view.onRecoverClicked()}"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_black_download" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/TextAppearance.Material3.BodyLarge"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:text="@string/prod_recupero_materiale_title_fragment" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:background="@drawable/ripple_effect">
|
android:background="?attr/selectableItemBackground">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@ -203,7 +203,7 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="2dp"
|
android:layout_marginTop="2dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:visibility="@{view.currentTextNumCnfToTake > 0 || view.currentTextNumPezziToTake > 0 ? View.VISIBLE : View.GONE}">
|
android:visibility="@{view.flagShowCnfToTakeLabel && (view.currentTextNumCnfToTake > 0 || view.currentTextNumPezziToTake > 0) ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
@ -624,7 +624,6 @@
|
|||||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||||
android:enabled="@{view.enabledQtaTot}"
|
android:enabled="@{view.enabledQtaTot}"
|
||||||
android:focusableInTouchMode="false"
|
android:focusableInTouchMode="false"
|
||||||
android:imeOptions="actionDone"
|
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
@ -636,6 +635,7 @@
|
|||||||
android:hint="@string/tot_qty"
|
android:hint="@string/tot_qty"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:selectAllOnFocus="true"
|
android:selectAllOnFocus="true"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
app:binding="@{view.currentQtaTot}" />
|
app:binding="@{view.currentQtaTot}" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|||||||
@ -59,6 +59,7 @@
|
|||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/scan_label"
|
||||||
style="@style/AppTheme.NewMaterial.Text"
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@ -22,10 +22,11 @@
|
|||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
app:visibility="@{view.isLargeLayout}">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/order_list_fragment"
|
android:id="@+id/left_side_fragment_container"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@ -36,7 +37,7 @@
|
|||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/order_detail_fragment"
|
android:id="@+id/right_side_fragment_container"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@ -44,6 +45,15 @@
|
|||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/full_width_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:reverse_visibility="@{view.isLargeLayout}"
|
||||||
|
tools:layout="@layout/fragment_prod_rientro_merce_order_list" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,7 @@
|
|||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/gray_200"
|
android:background="?attr/colorSurface"
|
||||||
android:padding="8dp"
|
|
||||||
tools:context=".gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailFragment">
|
tools:context=".gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailFragment">
|
||||||
|
|
||||||
|
|
||||||
@ -93,22 +92,12 @@
|
|||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:visibility="@{view.currentOrder == null ? View.GONE : View.VISIBLE}"
|
|
||||||
app:cardCornerRadius="8dp"
|
|
||||||
app:cardElevation="4dp">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingStart="16dp"
|
android:padding="16dp">
|
||||||
android:paddingTop="24dp"
|
|
||||||
android:paddingEnd="16dp"
|
|
||||||
android:paddingBottom="16dp">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -674,6 +663,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:padding="32dp"
|
||||||
app:layout_constraintEnd_toStartOf="@id/mtb_colt_guideline_empty_right"
|
app:layout_constraintEnd_toStartOf="@id/mtb_colt_guideline_empty_right"
|
||||||
app:layout_constraintStart_toEndOf="@id/mtb_colt_guideline_empty_left"
|
app:layout_constraintStart_toEndOf="@id/mtb_colt_guideline_empty_left"
|
||||||
app:layout_constraintTop_toTopOf="@id/mtb_colt_guideline_empty_top">
|
app:layout_constraintTop_toTopOf="@id/mtb_colt_guideline_empty_top">
|
||||||
@ -701,7 +691,6 @@
|
|||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/ripple_effect"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:paddingTop="12dp"
|
android:paddingTop="12dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
|
|||||||
@ -1,21 +1,31 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<layout
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".gest.prod_rientro_merce.order_list.ProdRientroMerceOrderListFragment">
|
tools:context=".gest.prod_rientro_merce.order_list.ProdRientroMerceOrderListFragment">
|
||||||
|
|
||||||
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||||
|
android:id="@+id/swiperefresh"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/filter_chips">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/main_list"
|
android:id="@+id/main_list"
|
||||||
android:scrollbars="vertical"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
tools:listitem="@layout/fragment_prod_rientro_merce_order_list__list_group_model" />
|
||||||
|
|
||||||
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/empty_view"
|
android:id="@+id/empty_view"
|
||||||
@ -47,28 +57,28 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
app:layout_constraintStart_toEndOf="@id/guideline_empty_left"
|
android:orientation="vertical"
|
||||||
app:layout_constraintEnd_toStartOf="@id/guideline_empty_right"
|
app:layout_constraintEnd_toStartOf="@id/guideline_empty_right"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/guideline_empty_left"
|
||||||
app:layout_constraintTop_toTopOf="@id/guideline_empty_top">
|
app:layout_constraintTop_toTopOf="@id/guideline_empty_top">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:layout_width="72dp"
|
android:layout_width="72dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_playlist_add_check_24dp"
|
android:adjustViewBounds="true"
|
||||||
android:adjustViewBounds="true"/>
|
android:src="@drawable/ic_playlist_add_check_24dp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/no_orders_found_message"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp" />
|
||||||
android:text="@string/no_orders_found_message"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@ -16,22 +16,13 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/ripple_effect"
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingStart="2dp"
|
android:paddingVertical="8dp"
|
||||||
android:paddingEnd="4dp">
|
android:paddingStart="4dp"
|
||||||
|
android:paddingEnd="12dp">
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/ordine_lavorazione_main_list_group_item_container_root"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:background="@color/full_white"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingStart="2dp"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:paddingBottom="8dp">
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
@ -119,7 +110,6 @@
|
|||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|||||||
@ -79,8 +79,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
app:layout_constraintTop_toBottomOf="@id/title_layout">
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
@ -89,6 +88,7 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
tools:listitem="@layout/layout_filter_agente__list_item"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHeight_max="270dp"
|
app:layout_constraintHeight_max="270dp"
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:background="@drawable/ripple_effect">
|
android:background="?attr/selectableItemBackground">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="@drawable/ripple_effect"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true">
|
android:focusable="true">
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,7 @@
|
|||||||
<string name="picking_not_available">Picking non disponibile</string>
|
<string name="picking_not_available">Picking non disponibile</string>
|
||||||
<string name="scan_item">Scansiona il codice a barre di un <b>articolo</b></string>
|
<string name="scan_item">Scansiona il codice a barre di un <b>articolo</b></string>
|
||||||
<string name="please_open_lu">Prima di procedere apri una <b>nuova UL</b></string>
|
<string name="please_open_lu">Prima di procedere apri una <b>nuova UL</b></string>
|
||||||
|
<string name="scan_lu_to_deposit">Scansiona il codice a barre di una <b>UL</b> per versarla</string>
|
||||||
<string name="extra_item">Articolo extra</string>
|
<string name="extra_item">Articolo extra</string>
|
||||||
<string name="info">Info</string>
|
<string name="info">Info</string>
|
||||||
<string name="lu_info">Info UL</string>
|
<string name="lu_info">Info UL</string>
|
||||||
@ -396,12 +397,16 @@
|
|||||||
<string name="in_progress">In lavorazione</string>
|
<string name="in_progress">In lavorazione</string>
|
||||||
<string name="stand_by">In pausa</string>
|
<string name="stand_by">In pausa</string>
|
||||||
<string name="stopped">Ferma</string>
|
<string name="stopped">Ferma</string>
|
||||||
<string name="risorse_impostate">Risorse allocate</string>
|
<string name="risorse_impostate">Risorse assegnate</string>
|
||||||
<string name="orders_in_progress">Ordini in lavorazione</string>
|
<string name="orders_in_progress">Ordini in lavorazione</string>
|
||||||
|
<string name="production_in_progress">Lavorazione in corso</string>
|
||||||
<string name="ridistribuisci_risorse">Assegna risorse</string>
|
<string name="ridistribuisci_risorse">Assegna risorse</string>
|
||||||
<string name="avvia_nuova_produzione">Avvia nuova produzione</string>
|
<string name="avvia_nuova_produzione">Avvia nuova produzione</string>
|
||||||
<string name="arresta_produzione">Arresta produzione</string>
|
<string name="arresta_produzione">Arresta produzione</string>
|
||||||
<string name="inizio_produzione">Inizio produzione</string>
|
<string name="inizio_produzione">Inizio produzione</string>
|
||||||
<string name="ultima_produzione">Ultima produzione</string>
|
<string name="ultima_produzione">Ultima produzione</string>
|
||||||
<string name="nessuna_linea_disponibile">Nessuna linea disponibile</string>
|
<string name="nessuna_linea_disponibile">Nessuna linea disponibile</string>
|
||||||
|
<string name="line_details">Dettaglio linea</string>
|
||||||
|
<string name="materiali_versati">Materiali versati</string>
|
||||||
|
<string name="scan_lu_to_recover">Scansiona il codice a barre della <b>UL</b> da recuperare</string>
|
||||||
</resources>
|
</resources>
|
||||||
6
app/src/main/res/values-large/values.xml
Normal file
6
app/src/main/res/values-large/values.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<item name="large_layout" type="bool">true</item>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@ -118,6 +118,7 @@
|
|||||||
<string name="scan_item">Please scan an <b>item</b> barcode</string>
|
<string name="scan_item">Please scan an <b>item</b> barcode</string>
|
||||||
<string name="extra_item">Extra item</string>
|
<string name="extra_item">Extra item</string>
|
||||||
<string name="piece">Piece</string>
|
<string name="piece">Piece</string>
|
||||||
|
<string name="scan_lu_to_deposit">Please scan a <b>LU barcode</b> to deposit</string>
|
||||||
|
|
||||||
<string name="password_error_length">between 3 and 30 alphanumeric characters</string>
|
<string name="password_error_length">between 3 and 30 alphanumeric characters</string>
|
||||||
<string name="username_error_not_valid">enter a valid username</string>
|
<string name="username_error_not_valid">enter a valid username</string>
|
||||||
@ -404,10 +405,14 @@
|
|||||||
<string name="stopped">Stopped</string>
|
<string name="stopped">Stopped</string>
|
||||||
<string name="risorse_impostate">Resources set</string>
|
<string name="risorse_impostate">Resources set</string>
|
||||||
<string name="orders_in_progress">Orders in progress</string>
|
<string name="orders_in_progress">Orders in progress</string>
|
||||||
|
<string name="production_in_progress">Production in progress</string>
|
||||||
<string name="ridistribuisci_risorse">Set resources</string>
|
<string name="ridistribuisci_risorse">Set resources</string>
|
||||||
<string name="avvia_nuova_produzione">Start production</string>
|
<string name="avvia_nuova_produzione">Start production</string>
|
||||||
<string name="arresta_produzione">Stop production</string>
|
<string name="arresta_produzione">Stop production</string>
|
||||||
<string name="inizio_produzione">Production start</string>
|
<string name="inizio_produzione">Production start</string>
|
||||||
<string name="ultima_produzione">Last production</string>
|
<string name="ultima_produzione">Last production</string>
|
||||||
<string name="nessuna_linea_disponibile">No production line available</string>
|
<string name="nessuna_linea_disponibile">No production line available</string>
|
||||||
|
<string name="line_details">Line details</string>
|
||||||
|
<string name="materiali_versati">Deposited products</string>
|
||||||
|
<string name="scan_lu_to_recover">Please scan the <b>LU barcode</b> to recover</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
6
app/src/main/res/values/values.xml
Normal file
6
app/src/main/res/values/values.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<item name="large_layout" type="bool">false</item>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@ -10,7 +10,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.1.3'
|
classpath 'com.android.tools.build:gradle:7.2.1'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath 'com.google.gms:google-services:4.3.10'
|
classpath 'com.google.gms:google-services:4.3.10'
|
||||||
|
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user