Compare commits
29 Commits
v1.28.4(29
...
v1.29.1(30
| Author | SHA1 | Date | |
|---|---|---|---|
| 6fa80a5485 | |||
| e0ea6b17a1 | |||
| 60978167c2 | |||
| 6a848e081a | |||
| 2960d0d4b4 | |||
| 6b01861a26 | |||
| 5889942ff9 | |||
| 0359ddcc90 | |||
| 8409507dab | |||
| 208653223c | |||
| 62f6e12a86 | |||
| b662929c19 | |||
| 40895eac2f | |||
| dc7e90b2fe | |||
| 5d1f275ebc | |||
| 79192ce337 | |||
| 7f0f6c969a | |||
| e23beddf65 | |||
| 1fd51a4097 | |||
| 5ea124bcf6 | |||
| fa6ab9f58f | |||
| f7806103fb | |||
| 87acc5a4e3 | |||
| 7c49af085d | |||
| 0c3d5bd0f1 | |||
| 37d956bb5c | |||
| fef564b090 | |||
| d1c491ee80 | |||
| 0cd8a3b41f |
17
.idea/deploymentTargetDropDown.xml
generated
17
.idea/deploymentTargetDropDown.xml
generated
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<targetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="C:\Users\ValerioC.STUDIO-ML\.android\avd\Pixel_4_XL_API_30.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2022-07-15T15:36:03.605659600Z" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 298
|
||||
def appVersionName = '1.28.4'
|
||||
def appVersionCode = 305
|
||||
def appVersionName = '1.29.1'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@@ -31,12 +31,12 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
compileSdkVersion 31
|
||||
compileSdkVersion 32
|
||||
|
||||
defaultConfig {
|
||||
applicationId "it.integry.integrywmsnative"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 31
|
||||
targetSdkVersion 32
|
||||
versionCode appVersionCode
|
||||
versionName appVersionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -86,6 +86,8 @@ import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdC
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Component;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Module;
|
||||
import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUComponent;
|
||||
@@ -137,7 +139,8 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
||||
DialogEditArticoloModule.class,
|
||||
DialogPrintOrderSSCCListModule.class,
|
||||
ProdLineeProduzioneModule.class,
|
||||
ProdDettaglioLineaModule.class
|
||||
ProdDettaglioLineaModule.class,
|
||||
DialogPrintUlSSCCModule.class
|
||||
})
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
@@ -231,6 +234,8 @@ public interface MainApplicationComponent {
|
||||
|
||||
ProdDettaglioLineaComponent.Factory prodDettaglioLineaComponent();
|
||||
|
||||
DialogPrintUlSSCCComponent.Factory dialogPrintUlSSCCComponent();
|
||||
|
||||
void inject(MainApplication mainApplication);
|
||||
|
||||
void inject(AppContext mainApplication);
|
||||
|
||||
@@ -88,6 +88,11 @@ public class MtbAart extends EntityBase {
|
||||
private String marchio;
|
||||
private Integer sezione;
|
||||
private UntMisRifPesoEnum untMisRifPeso;
|
||||
|
||||
private BigDecimal qtaEsistente;
|
||||
private BigDecimal qtaImpegnata;
|
||||
private BigDecimal numCnfEsistente;
|
||||
private BigDecimal numCnfImpegnata;
|
||||
|
||||
private List<MtbUntMis> mtbUntMis;
|
||||
|
||||
@@ -819,4 +824,40 @@ public class MtbAart extends EntityBase {
|
||||
this.untMisRifPeso = untMisRifPeso;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaEsistente() {
|
||||
return qtaEsistente;
|
||||
}
|
||||
|
||||
public MtbAart setQtaEsistente(BigDecimal qtaEsistente) {
|
||||
this.qtaEsistente = qtaEsistente;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaImpegnata() {
|
||||
return qtaImpegnata;
|
||||
}
|
||||
|
||||
public MtbAart setQtaImpegnata(BigDecimal qtaImpegnata) {
|
||||
this.qtaImpegnata = qtaImpegnata;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNumCnfEsistente() {
|
||||
return numCnfEsistente;
|
||||
}
|
||||
|
||||
public MtbAart setNumCnfEsistente(BigDecimal numCnfEsistente) {
|
||||
this.numCnfEsistente = numCnfEsistente;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNumCnfImpegnata() {
|
||||
return numCnfImpegnata;
|
||||
}
|
||||
|
||||
public MtbAart setNumCnfImpegnata(BigDecimal numCnfImpegnata) {
|
||||
this.numCnfImpegnata = numCnfImpegnata;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,11 @@ public class RESTBuilder {
|
||||
}
|
||||
|
||||
public static <T> T getService(final Class<T> service, String host, int port, boolean addInterceptors) {
|
||||
return getService(service, host, port, addInterceptors, true, 30);
|
||||
return getService(service, host, port, addInterceptors, true, 60);
|
||||
}
|
||||
|
||||
public static <T> T getService(final Class<T> service, String host, int port, boolean addInterceptors, boolean addEmsApi) {
|
||||
return getService(service, host, port, addInterceptors, addEmsApi, 30);
|
||||
return getService(service, host, port, addInterceptors, addEmsApi, 60);
|
||||
}
|
||||
|
||||
public static <T> T getService(final Class<T> service, String host, int port, boolean addInterceptors, boolean addEmsApi, int timeout) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||
analyzeAnswer(response, "getByBarcodeProd", (m) -> {
|
||||
List<MtbAart> aartList = response.body().getEntityList();
|
||||
aartList = Stream.of(aartList).filter(x -> x.getFlagStato().equalsIgnoreCase("A")).toList();
|
||||
aartList = aartList != null ? Stream.of(aartList).filter(x -> x.getFlagStato().equalsIgnoreCase("A")).toList() : null;
|
||||
onComplete.run(aartList);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
public void getBySSCC(String ssccString, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||
colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull).enqueue(new Callback<ServiceRESTResponse<MtbColt>>() {
|
||||
colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
||||
analyzeAnswer(response, "GetBySSCC", mtbColt -> {
|
||||
@@ -700,4 +700,29 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void loadShipmentUlFromProductionUL(MtbColt mtbColt, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
params.put("mtb_colr.gestione_rif", mtbColt.getGestione());
|
||||
params.put("mtb_colr.ser_collo_rif", mtbColt.getSerCollo());
|
||||
params.put("mtb_colr.num_collo_rif", mtbColt.getNumCollo());
|
||||
params.put("mtb_colr.data_collo_rif", mtbColt.getDataColloD());
|
||||
|
||||
String whereCond = UtilityQuery.concatFieldsInWhereCond(params);
|
||||
|
||||
|
||||
String query = "select distinct mtb_colt.*\n" +
|
||||
"from mtb_colt\n" +
|
||||
" left join mtb_colr on mtb_colt.gestione = mtb_colr.gestione and mtb_colt.data_collo = mtb_colr.data_collo and\n" +
|
||||
" mtb_colt.ser_collo = mtb_colr.ser_collo and mtb_colt.num_collo = mtb_colr.num_collo\n" +
|
||||
"where mtb_colt.gestione = 'V'" +
|
||||
" AND " + whereCond;
|
||||
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
|
||||
}.getType();
|
||||
this.mSystemRESTConsumer.<ArrayList<MtbColt>>processSql(query, typeOfObjectsList, data -> {
|
||||
onComplete.run(data.get(0));
|
||||
}, onFailed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,21 @@ public class UtilityDate {
|
||||
|
||||
|
||||
public static Date getDateInstance() {
|
||||
return getCalendarInstance().getTime();
|
||||
return getDateInstance(false);
|
||||
}
|
||||
|
||||
|
||||
public static Date getDateInstance(boolean removeTime) {
|
||||
var calendar = getCalendarInstance();
|
||||
|
||||
if(removeTime) {
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
}
|
||||
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Calendar getCalendarInstance() {
|
||||
|
||||
@@ -35,6 +35,7 @@ public class UtilityNumber {
|
||||
decimalFormat.setMaximumFractionDigits(decimal);
|
||||
decimalFormat.setDecimalFormatSymbols(otherSymbols);
|
||||
decimalFormat.setGroupingUsed(false);
|
||||
decimalFormat.setMinimumFractionDigits(2);
|
||||
|
||||
return decimalFormat.format(floatValue);
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ import it.integry.integrywmsnative.core.utility.UtilityContext;
|
||||
import it.integry.integrywmsnative.databinding.ActivityMainBinding;
|
||||
import it.integry.integrywmsnative.gest.login.LoginActivity;
|
||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||
|
||||
public class MainActivity extends BaseActivity
|
||||
implements NavigationView.OnNavigationItemSelectedListener, IPoppableActivity {
|
||||
@@ -70,6 +71,10 @@ public class MainActivity extends BaseActivity
|
||||
@Inject
|
||||
UpdatesManager updatesManager;
|
||||
|
||||
|
||||
@Inject
|
||||
DialogInputQuantityV2View mDialogInputQuantityV2View;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -103,6 +108,14 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
init();
|
||||
|
||||
|
||||
// mDialogInputQuantityV2View
|
||||
// .setDialogInputQuantityV2DTO(new DialogInputQuantityV2DTO()
|
||||
// .setMtbAart(new MtbAart()
|
||||
// .setCodMart("AAAA")
|
||||
// .setFlagQtaCnfFissa("S")))
|
||||
// .show(getSupportFragmentManager(), "tag");
|
||||
|
||||
}
|
||||
|
||||
private void startLoginActivity() {
|
||||
|
||||
@@ -231,6 +231,7 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
||||
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 -> {
|
||||
@@ -276,7 +277,7 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
||||
getSupportFragmentManager()
|
||||
.beginTransaction()
|
||||
.add(R.id.frame_layout_container,
|
||||
ProdRecuperoMaterialeFragment.newInstance(mViewModel.lineaProd.getValue().getCodJfas(), DATA_KEY_FRAGMENT_LISTENER))
|
||||
ProdRecuperoMaterialeFragment.newInstance(null, DATA_KEY_FRAGMENT_LISTENER))
|
||||
.addToBackStack("ProdRecuperoMaterialeFragment")
|
||||
.commit();
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import android.view.ViewGroup;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -43,11 +42,6 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
||||
private FragmentLineeProdBinding mBinding;
|
||||
private ElevatedToolbar mToolbar;
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
this.mViewModel.processBarcodeDTO(data);
|
||||
};
|
||||
|
||||
public static ProdLineeProduzioneFragment newInstance() {
|
||||
return new ProdLineeProduzioneFragment();
|
||||
@@ -83,6 +77,11 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
||||
.setOnScanFailed(this::onError));
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
this.mViewModel.processBarcodeDTO(data);
|
||||
};
|
||||
|
||||
@Override
|
||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||
mToolbar = toolbar;
|
||||
@@ -98,11 +97,14 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
||||
|
||||
private void initRecyclerView() {
|
||||
this.mViewModel.getProdLinesList().observe(getViewLifecycleOwner(), this::refreshLineeProd);
|
||||
LinesListAdapter prodLinesListAdapter = new LinesListAdapter(this.requireActivity(), this.mLinesObservableList);
|
||||
prodLinesListAdapter.setEmptyView(this.mBinding.linesListEmptyView);
|
||||
|
||||
LinesListAdapter prodLinesListAdapter = new LinesListAdapter(this.mLinesObservableList);
|
||||
this.mBinding.linesMainList.setAdapter(prodLinesListAdapter);
|
||||
this.mBinding.linesMainList.setLayoutManager(new LinearLayoutManager(this.requireActivity()));
|
||||
prodLinesListAdapter.setOnItemClicked(this.mViewModel::onLineSelected);
|
||||
|
||||
prodLinesListAdapter
|
||||
.setOnItemClicked(this::selectLine)
|
||||
.setEmptyView(this.mBinding.linesListEmptyView);
|
||||
|
||||
if (mToolbar != null)
|
||||
mToolbar.setRecyclerView(this.mBinding.linesMainList);
|
||||
}
|
||||
@@ -136,6 +138,7 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
||||
public void selectLine(ProdLineStatusDTO dto) {
|
||||
this.onLoadingEnded();
|
||||
BarcodeManager.disable();
|
||||
|
||||
if (!dto.isStarted()) {
|
||||
this.requestResources(dto);
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package it.integry.integrywmsnative.gest.prod_linee_produzione.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@@ -16,13 +15,11 @@ import it.integry.integrywmsnative.databinding.FragmentLineeProdMainListModelBin
|
||||
import it.integry.integrywmsnative.gest.prod_linee_produzione.dto.ProdLineStatusDTO;
|
||||
|
||||
public class LinesListAdapter extends ExtendedRecyclerView<ProdLineStatusDTO, LinesListAdapter.SingleItemViewHolder> {
|
||||
private Context mContext;
|
||||
|
||||
private RunnableArgs<ProdLineStatusDTO> mOnItemClicked;
|
||||
|
||||
public LinesListAdapter(Context context, ObservableArrayList<ProdLineStatusDTO> myDataset) {
|
||||
public LinesListAdapter(ObservableArrayList<ProdLineStatusDTO> myDataset) {
|
||||
super(myDataset);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -38,6 +35,7 @@ public class LinesListAdapter extends ExtendedRecyclerView<ProdLineStatusDTO, Li
|
||||
|
||||
holder.binding.setListModel(line);
|
||||
holder.binding.executePendingBindings();
|
||||
|
||||
holder.binding.getRoot().setOnClickListener(v -> {
|
||||
if (this.mOnItemClicked != null)
|
||||
this.mOnItemClicked.run(line);
|
||||
@@ -45,8 +43,9 @@ public class LinesListAdapter extends ExtendedRecyclerView<ProdLineStatusDTO, Li
|
||||
}
|
||||
|
||||
|
||||
public void setOnItemClicked(RunnableArgs<ProdLineStatusDTO> onItemClicked) {
|
||||
public LinesListAdapter setOnItemClicked(RunnableArgs<ProdLineStatusDTO> onItemClicked) {
|
||||
this.mOnItemClicked = onItemClicked;
|
||||
return this;
|
||||
}
|
||||
|
||||
static class SingleItemViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
@@ -9,10 +9,8 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
@@ -88,7 +86,7 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_prod_recupero_materiale, container, false);
|
||||
mBinding = FragmentProdRecuperoMaterialeBinding.inflate(inflater, container, false);
|
||||
|
||||
MainApplication.appComponent
|
||||
.prodRecuperoMaterialeComponent()
|
||||
@@ -168,8 +166,6 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
private void initRecyclerView() {
|
||||
this.mViewModel.getOrderList().observe(getViewLifecycleOwner(), this::refreshList);
|
||||
|
||||
mBinding.prodRecuperoMaterialeMainList.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
|
||||
HistoryULsListAdapter adapter = new HistoryULsListAdapter(getActivity(), mHistoryULMutableData)
|
||||
.setOnItemClicked(data -> this.mViewModel.dispatchItem(data.getOriginalModel(), null));
|
||||
|
||||
|
||||
@@ -247,6 +247,7 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
.setCodCol(restDTO.getCodCol())
|
||||
.setCodTagl(restDTO.getCodTagl())
|
||||
.setCodJfas(restDTO.getCodJfas())
|
||||
.setDescrizioneArt(restDTO.getDescrizioneArt())
|
||||
.setDescrizioneFase(restDTO.getDescrizioneFase())
|
||||
.setQtaCol(qtaColTot)
|
||||
.setNumCnf(numCnfColTot)
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.view.ExtendedSectionedRecyclerView;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.ProdRecuperoMaterialeListHeaderBinding;
|
||||
import it.integry.integrywmsnative.databinding.ProdRecuperoMaterialeListItemBinding;
|
||||
@@ -99,7 +100,7 @@ public class HistoryULsListAdapter extends ExtendedSectionedRecyclerView<History
|
||||
holder.binding.numCollo.setText(String.valueOf(ul.getNumCollo()));
|
||||
holder.binding.partitaMag.setText("(" + ul.getPartitaMag() + ")");
|
||||
|
||||
holder.binding.qtaVersata.setText(String.valueOf(ul.getQtaVersata()));
|
||||
holder.binding.qtaVersata.setText(UtilityNumber.decimalToString(ul.getQtaVersata(), 2));
|
||||
holder.binding.untMisQtaVersata.setText(String.valueOf(ul.getUntMisVersata()));
|
||||
|
||||
holder.binding.getRoot().setOnClickListener(v -> {
|
||||
|
||||
@@ -63,6 +63,8 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
||||
return new ProdRientroMerceFragment();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
@@ -18,6 +18,7 @@ import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.annimon.stream.ComparatorCompat;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||
@@ -43,12 +44,14 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailBinding;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdView;
|
||||
import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCView;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
@@ -76,6 +79,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
|
||||
private BluetoothManager bluetoothManager;
|
||||
private BluetoothSerialDevice mConnectedBluetoothDevice;
|
||||
private String mLatestCodTcol;
|
||||
|
||||
|
||||
public ObservableField<BigDecimal> sumLUNumber = new ObservableField<>(BigDecimal.ZERO);
|
||||
@@ -182,6 +186,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
mLatestCodTcol = null;
|
||||
if (mConnectedBluetoothDevice != null)
|
||||
bluetoothManager.close();
|
||||
|
||||
@@ -207,13 +212,28 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
AtomicBigDecimal sumColli = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||
AtomicBigDecimal sumNet = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||
AtomicBigDecimal sumGross = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||
AtomicBigDecimal sumQtaCol = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||
|
||||
Stream.of(mtbColts)
|
||||
.forEach(x -> Stream.of(x.getMtbColr()).forEach(y -> {
|
||||
sumColli.getAndAdd(y.getNumCnf());
|
||||
sumNet.getAndAdd(y.getPesoNettoKg());
|
||||
sumGross.getAndAdd(y.getPesoLordoKg());
|
||||
sumQtaCol.getAndAdd(y.getQtaCol());
|
||||
}));
|
||||
|
||||
ComparatorCompat<MtbColt> c = ComparatorCompat
|
||||
.chain(
|
||||
new ComparatorCompat<MtbColt>((x, y) -> x.getDataVersD().compareTo(y.getDataVersD()))
|
||||
)
|
||||
.reversed();
|
||||
MtbColt lastUl = Stream.of(mtbColts).sorted(c).findFirstOrElse(null);
|
||||
if (lastUl != null && !UtilityString.isNullOrEmpty(lastUl.getCodTcol())) {
|
||||
mLatestCodTcol = lastUl.getCodTcol();
|
||||
}
|
||||
|
||||
currentOrder.getValue().setQtaTrasferite(sumQtaCol.get());
|
||||
this.progress.set(currentOrder.getValue().getProgress());
|
||||
sumColliNumber.set(sumColli.get());
|
||||
sumGrossKG.set(sumGross.get());
|
||||
progress.set(currentOrder.getValue().getProgress());
|
||||
@@ -229,7 +249,17 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataSaved() {
|
||||
public void onDataSaved(MtbColt mtbColt) {
|
||||
String codJcom = currentOrder.getValue().getCodJcom();
|
||||
|
||||
DialogPrintUlSSCCView.newInstance(codJcom, mtbColt, result -> {
|
||||
if (result.isFlagPrintShipmentLabel() || result.isFlagPrintProductionLabel()) {
|
||||
this.mViewModel.printSavedMtbColt(result);
|
||||
} else {
|
||||
this.mViewModel.refreshMtbColts();
|
||||
}
|
||||
})
|
||||
.show(requireActivity().getSupportFragmentManager(), "DialogPrintUlSSCC");
|
||||
|
||||
}
|
||||
|
||||
@@ -237,7 +267,12 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
public void addULButtonClick() {
|
||||
this.onLoadingStarted();
|
||||
|
||||
String codProd = this.currentOrder.getValue().getCodProd();
|
||||
OrdineLavorazioneDTO currentOrder = this.currentOrder.getValue();
|
||||
if (currentOrder == null) {
|
||||
this.onError(new Exception("Nessun ordine rilevato!"));
|
||||
return;
|
||||
}
|
||||
String codProd = currentOrder.getCodProd();
|
||||
mArticoloRESTConsumer.getByCodMart(codProd, mtbAart -> {
|
||||
|
||||
String sql = "SELECT TOP 1 * " +
|
||||
@@ -246,9 +281,9 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
" * " +
|
||||
" FROM dtb_ord_steps " +
|
||||
" WHERE cod_jfas IS NOT NULL " +
|
||||
" AND gestione = " + UtilityDB.valueToString(this.currentOrder.getValue().getGestione()) +
|
||||
" AND num_ord = " + UtilityDB.valueToString(this.currentOrder.getValue().getNumOrd()) +
|
||||
" AND data_ord = " + UtilityDB.valueToString(this.currentOrder.getValue().getDataOrdD()) +
|
||||
" AND gestione = " + UtilityDB.valueToString(currentOrder.getGestione()) +
|
||||
" AND num_ord = " + UtilityDB.valueToString(currentOrder.getNumOrd()) +
|
||||
" AND data_ord = " + UtilityDB.valueToString(currentOrder.getDataOrdD()) +
|
||||
" ) tmp " +
|
||||
"WHERE data_iniz IS NOT NULL " +
|
||||
" AND (data_fine IS NULL OR last_step = id_step) " +
|
||||
@@ -259,15 +294,24 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
|
||||
this.onLoadingEnded();
|
||||
|
||||
String codTcol = currentOrder.getCodTcolUl();
|
||||
if (UtilityString.isNullOrEmpty(codTcol)) {
|
||||
if (!UtilityString.isNullOrEmpty(mLatestCodTcol)) {
|
||||
codTcol = mLatestCodTcol;
|
||||
} else {
|
||||
codTcol = mtbAart.getCodTcolUl();
|
||||
}
|
||||
}
|
||||
|
||||
DialogInputLUProdDTO dialogInputLUProdDTO = new DialogInputLUProdDTO()
|
||||
.setMtbAart(mtbAart)
|
||||
.setNumCnf(this.currentOrder.getValue().getColliPedana())
|
||||
.setNumCnf(currentOrder.getColliPedana())
|
||||
.setQtaCnf(mtbAart.getQtaCnf())
|
||||
.setQtaTot(this.currentOrder.getValue().getColliPedana().multiply(mtbAart.getQtaCnf()))
|
||||
.setPartitaMag(this.currentOrder.getValue().getPartitaMag())
|
||||
.setDataScad(this.currentOrder.getValue().getDataScadD())
|
||||
.setCodJfasParent(this.currentOrder.getValue().getCodJfas())
|
||||
.setCodTcol(this.currentOrder.getValue().getCodTcolUl())
|
||||
.setQtaTot(currentOrder.getColliPedana().multiply(mtbAart.getQtaCnf()))
|
||||
.setPartitaMag(currentOrder.getPartitaMag())
|
||||
.setDataScad(currentOrder.getDataScadD())
|
||||
.setCodJfasParent(currentOrder.getCodJfas())
|
||||
.setCodTcol(codTcol)
|
||||
.setSuggestedCodJfas(dtbOrdStep != null && dtbOrdStep.size() > 0 ? dtbOrdStep.get(0).getCodJfas() : null);
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.ProdRientroMerceOrderDetailRESTConsumer;
|
||||
|
||||
@@ -17,8 +18,9 @@ public class ProdRientroMerceOrderDetailModule {
|
||||
@Provides
|
||||
ProdRientroMerceOrderDetailViewModel provideProdRientroMerceOrderDetailViewModel(
|
||||
ProdRientroMerceOrderDetailRESTConsumer prodRientroMerceOrderDetailRESTConsumer,
|
||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) {
|
||||
return new ProdRientroMerceOrderDetailViewModel(prodRientroMerceOrderDetailRESTConsumer, colliMagazzinoRESTConsumer);
|
||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||
PrinterRESTConsumer printerRESTConsumer) {
|
||||
return new ProdRientroMerceOrderDetailViewModel(prodRientroMerceOrderDetailRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,32 +6,42 @@ import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.report.ReportType;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.ProdRientroMerceOrderDetailRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto.ImportColliDaProduzioneRequestDTO;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.printSsccUl.dto.PrintUlDTO;
|
||||
|
||||
public class ProdRientroMerceOrderDetailViewModel {
|
||||
|
||||
public MutableLiveData<List<MtbColt>> mtbColtsOfOrder = new MutableLiveData<>();
|
||||
public final MutableLiveData<List<MtbColt>> mtbColtsOfOrder = new MutableLiveData<>();
|
||||
private OrdineLavorazioneDTO currentOrder;
|
||||
|
||||
private final ProdRientroMerceOrderDetailRESTConsumer mProdRientroMerceOrderDetailRESTConsumer;
|
||||
private final ColliMagazzinoRESTConsumer mColliMagazzinoRESTConsumer;
|
||||
private final PrinterRESTConsumer mPrinterRESTConsumer;
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
@Inject
|
||||
public ProdRientroMerceOrderDetailViewModel(ProdRientroMerceOrderDetailRESTConsumer prodRientroMerceOrderDetailRESTConsumer,
|
||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) {
|
||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||
PrinterRESTConsumer printerRESTConsumer) {
|
||||
this.mProdRientroMerceOrderDetailRESTConsumer = prodRientroMerceOrderDetailRESTConsumer;
|
||||
this.mColliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
||||
this.mPrinterRESTConsumer = printerRESTConsumer;
|
||||
}
|
||||
|
||||
public void setOrder(OrdineLavorazioneDTO order) {
|
||||
@@ -40,7 +50,7 @@ public class ProdRientroMerceOrderDetailViewModel {
|
||||
refreshMtbColts();
|
||||
}
|
||||
|
||||
private void refreshMtbColts() {
|
||||
public void refreshMtbColts() {
|
||||
this.sendOnLoadingStarted();
|
||||
this.mtbColtsOfOrder.postValue(null);
|
||||
|
||||
@@ -81,12 +91,9 @@ public class ProdRientroMerceOrderDetailViewModel {
|
||||
.setPesoNetto(pickedQuantityDTO.getPesoNetto());
|
||||
|
||||
this.mProdRientroMerceOrderDetailRESTConsumer.importColloDaProduzione(importColliDaProduzioneRequestDTO, mtbColtSaved -> {
|
||||
|
||||
synchronized (this.mtbColtsOfOrder) {
|
||||
refreshMtbColts();
|
||||
this.mListener.onDataSaved(mtbColtSaved);
|
||||
}
|
||||
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
|
||||
|
||||
@@ -136,9 +143,39 @@ public class ProdRientroMerceOrderDetailViewModel {
|
||||
if (this.mListener != null) mListener.onError(ex);
|
||||
}
|
||||
|
||||
public void printSavedMtbColt(PrintUlDTO result) {
|
||||
if (result.isFlagPrintProductionLabel()) {
|
||||
this.startPrint(result.getMtbColt(), ReportType.ETICHETTA_SSCC_LAVORAZIONE, currentOrder.getCodAnag());
|
||||
} else {
|
||||
this.loadShipmentUlFromProductionUL(result.getMtbColt(), mtbColt -> {
|
||||
this.startPrint(mtbColt, ReportType.ETICHETTA_SSCC_SPEDIZIONE, mtbColt.getCodAnag());
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void loadShipmentUlFromProductionUL(MtbColt productionUL, RunnableArgs<MtbColt> onLoad, RunnableArgs<Exception> onError) {
|
||||
this.mColliMagazzinoRESTConsumer.loadShipmentUlFromProductionUL(productionUL, onLoad, onError);
|
||||
}
|
||||
|
||||
private void startPrint(MtbColt mtbColt, ReportType reportType, String codAnag) {
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
params.put("gestione", mtbColt.getGestione());
|
||||
params.put("ser_collo", mtbColt.getSerCollo());
|
||||
params.put("num_collo", mtbColt.getNumCollo());
|
||||
params.put("data_collo", UtilityDate.formatDate(mtbColt.getDataColloD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_DASH));
|
||||
this.mPrinterRESTConsumer.printReportType(
|
||||
reportType,
|
||||
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
|
||||
codAnag,
|
||||
params,
|
||||
this::refreshMtbColts,
|
||||
this::sendError);
|
||||
}
|
||||
|
||||
public interface Listener extends ILoadingListener {
|
||||
|
||||
void onDataSaved();
|
||||
void onDataSaved(MtbColt mtbColt);
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
|
||||
@@ -288,8 +288,8 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArtListLoaded(ArrayList<MtbAart> artList) {
|
||||
DialogChooseArtFromListaArts.make(getActivity(), artList, mtbAart -> mViewModel.dispatchArt(mtbAart, null)).show();
|
||||
public void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
||||
DialogChooseArtFromListaArts.make(getActivity(), artList, onArtChoosed).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -336,14 +336,13 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
@Override
|
||||
public void onError(Exception ex) {
|
||||
this.onLoadingEnded();
|
||||
BarcodeManager.enable();
|
||||
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(requireActivity(), ex, mCurrentProgress);
|
||||
}
|
||||
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -353,6 +352,10 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal totalQtaInWarehouse,
|
||||
BigDecimal totalNumCnfInWarehouse,
|
||||
BigDecimal totalQtaCommitted,
|
||||
BigDecimal totalNumCnfCommitted,
|
||||
BigDecimal totalQtaToBeTaken,
|
||||
BigDecimal totalNumCnfToBeTaken,
|
||||
BigDecimal qtaCnfToBeTaken,
|
||||
@@ -368,6 +371,10 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
.setInitialNumCnf(initialNumCnf)
|
||||
.setInitialQtaCnf(initialQtaCnf)
|
||||
.setInitialQtaTot(initialQtaTot)
|
||||
.setTotalQtaInWarehouse(totalQtaInWarehouse)
|
||||
.setTotalNumCnfInWarehouse(totalNumCnfInWarehouse)
|
||||
.setTotalQtaCommitted(totalQtaCommitted)
|
||||
.setTotalNumCnfCommitted(totalNumCnfCommitted)
|
||||
.setTotalQtaToBeTaken(totalQtaToBeTaken)
|
||||
.setTotalNumCnfToBeTaken(totalNumCnfToBeTaken)
|
||||
.setQtaCnfToBeTaken(qtaCnfToBeTaken)
|
||||
@@ -494,7 +501,11 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
@Override
|
||||
public void onPreDestroy(Runnable onComplete) {
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
mViewModel.closeLU(false);
|
||||
if(mViewModel.getCurrentMtbColt() != null)
|
||||
mViewModel.closeLU(false);
|
||||
else {
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
onComplete.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,10 +196,24 @@ public class RettificaGiacenzeViewModel {
|
||||
return;
|
||||
}
|
||||
|
||||
RunnableArgs<MtbAart> dispatchArtRunnable = mtbAart -> {
|
||||
|
||||
var matchRows = Stream.of(this.mCurrentMtbColt.getMtbColr())
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbAart.getCodMart()))
|
||||
.toList();
|
||||
|
||||
if (matchRows.size() != 1) {
|
||||
dispatchArt(mtbAart, null);
|
||||
} else {
|
||||
dispatchRowEdit(matchRows.get(0));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
if (artsList.size() == 1) {
|
||||
dispatchArt(artsList.get(0), null);
|
||||
dispatchArtRunnable.run(artsList.get(0));
|
||||
} else {
|
||||
this.sendOnArtListLoaded(new ArrayList<>(artsList));
|
||||
this.sendOnArtListLoaded(new ArrayList<>(artsList), dispatchArtRunnable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,6 +305,10 @@ public class RettificaGiacenzeViewModel {
|
||||
initialNumCnf,
|
||||
initialQtaCnf,
|
||||
initialQtaTot,
|
||||
mtbAart.getQtaEsistente(),
|
||||
mtbAart.getNumCnfEsistente(),
|
||||
mtbAart.getQtaImpegnata(),
|
||||
mtbAart.getNumCnfImpegnata(),
|
||||
qtaColDaPrelevare,
|
||||
numCnfDaPrelevare,
|
||||
qtaCnfDaPrelevare,
|
||||
@@ -507,33 +525,41 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
public void dispatchRowEdit(MtbColr mtbColrToUpdate) {
|
||||
|
||||
final PickingObjectDTO pickingObjectDTO = new PickingObjectDTO()
|
||||
.setMtbAart(mtbColrToUpdate.getMtbAart());
|
||||
this.mRettificaGiacenzeRESTConsumer.searchArtInt(mtbColrToUpdate.getMtbAart().getCodMart(), newMtbAartList -> {
|
||||
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
mtbColrToUpdate.getNumCnf(),
|
||||
mtbColrToUpdate.getQtaCnf(),
|
||||
mtbColrToUpdate.getQtaCol(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
mtbColrToUpdate.getPartitaMag(),
|
||||
mtbColrToUpdate.getDataScadPartitaD(),
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
var newMtbAart = newMtbAartList.get(0);
|
||||
|
||||
final PickingObjectDTO pickingObjectDTO = new PickingObjectDTO()
|
||||
.setMtbAart(newMtbAart);
|
||||
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
mtbColrToUpdate.getNumCnf(),
|
||||
mtbColrToUpdate.getQtaCnf(),
|
||||
mtbColrToUpdate.getQtaCol(),
|
||||
newMtbAart.getQtaEsistente(), newMtbAart.getNumCnfEsistente(),
|
||||
newMtbAart.getQtaImpegnata(), newMtbAart.getNumCnfImpegnata(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
mtbColrToUpdate.getPartitaMag(),
|
||||
mtbColrToUpdate.getDataScadPartitaD(),
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
|
||||
this.saveEditedRow(mtbColrToUpdate,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
pickedQuantityDTO.getQtaCnf(),
|
||||
pickedQuantityDTO.getQtaTot(),
|
||||
pickedQuantityDTO.getPartitaMag(),
|
||||
pickedQuantityDTO.getDataScad(),
|
||||
shouldCloseLU);
|
||||
});
|
||||
}, this::sendError);
|
||||
|
||||
this.saveEditedRow(mtbColrToUpdate,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
pickedQuantityDTO.getQtaCnf(),
|
||||
pickedQuantityDTO.getQtaTot(),
|
||||
pickedQuantityDTO.getPartitaMag(),
|
||||
pickedQuantityDTO.getDataScad(),
|
||||
shouldCloseLU);
|
||||
});
|
||||
}
|
||||
|
||||
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||
@@ -670,8 +696,8 @@ public class RettificaGiacenzeViewModel {
|
||||
}
|
||||
|
||||
|
||||
private void sendOnArtListLoaded(ArrayList<MtbAart> artList) {
|
||||
if (this.mListener != null) mListener.onArtListLoaded(artList);
|
||||
private void sendOnArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
||||
if (this.mListener != null) mListener.onArtListLoaded(artList, onArtChoosed);
|
||||
}
|
||||
|
||||
private void sendOnLUOpenRequest(RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
@@ -699,6 +725,10 @@ public class RettificaGiacenzeViewModel {
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal totalQtaInWarehouse,
|
||||
BigDecimal totalNumCnfInWarehouse,
|
||||
BigDecimal totalQtaCommitted,
|
||||
BigDecimal totalNumCnfCommitted,
|
||||
BigDecimal totalQtaToBeTaken,
|
||||
BigDecimal totalNumCnfToBeTaken,
|
||||
BigDecimal qtaCnfToBeTaken,
|
||||
@@ -713,6 +743,10 @@ public class RettificaGiacenzeViewModel {
|
||||
initialNumCnf,
|
||||
initialQtaCnf,
|
||||
initialQtaTot,
|
||||
totalQtaInWarehouse,
|
||||
totalNumCnfInWarehouse,
|
||||
totalQtaCommitted,
|
||||
totalNumCnfCommitted,
|
||||
totalQtaToBeTaken,
|
||||
totalNumCnfToBeTaken,
|
||||
qtaCnfToBeTaken,
|
||||
@@ -751,7 +785,7 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
void onFornitoriLoaded(ArrayList<FornitoreDTO> fornitoriList);
|
||||
|
||||
void onArtListLoaded(ArrayList<MtbAart> artList);
|
||||
void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed);
|
||||
|
||||
void onLUOpenRequest(RunnableArgss<MtbColt, Boolean> onComplete);
|
||||
|
||||
@@ -768,6 +802,10 @@ public class RettificaGiacenzeViewModel {
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal totalQtaInWarehouse,
|
||||
BigDecimal totalNumCnfInWarehouse,
|
||||
BigDecimal totalQtaCommitted,
|
||||
BigDecimal totalNumCnfCommitted,
|
||||
BigDecimal totalQtaToBeTaken,
|
||||
BigDecimal totalNumCnfToBeTaken,
|
||||
BigDecimal qtaCnfToBeTaken,
|
||||
|
||||
@@ -12,6 +12,7 @@ import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbAartWithFornitore;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
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.gest.rettifica_giacenze.dto.FornitoreDTO;
|
||||
|
||||
@@ -41,7 +42,7 @@ public class RettificaGiacenzeRESTConsumer extends _BaseRESTConsumer {
|
||||
" WHERE mtb_lisa.cod_alis = " + UtilityDB.valueToString(codAlis) +
|
||||
" AND mtb_lisa.cod_mart = mtb_aart.cod_mart " +
|
||||
" AND mtb_lisa.cod_mart = mtb_part.cod_mart " +
|
||||
" AND mtb_part.cod_mdep = '01' " +
|
||||
" AND mtb_part.cod_mdep = '" + SettingsManager.i().getUserSession().getDepo().getCodMdep() + "' " +
|
||||
" AND (mtb_aart.descrizione_estesa LIKE '%" + codArtForOrDescr + "%' OR cod_art_for LIKE '%" + codArtForOrDescr + "%') " +
|
||||
" ORDER BY ABS(mtb_part.qta_esistente) DESC, mtb_aart.descrizione_estesa";
|
||||
|
||||
@@ -55,13 +56,19 @@ public class RettificaGiacenzeRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
|
||||
public void searchArtInt(String codMartOrBarcodeOrDescr, RunnableArgs<ArrayList<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
String sql = "SELECT DISTINCT mtb_aart.* " +
|
||||
"FROM mtb_aart " +
|
||||
"LEFT OUTER JOIN mvw_barcode on mtb_aart.cod_mart = mvw_barcode.cod_mart " +
|
||||
"WHERE CASE" +
|
||||
String sql = "SELECT DISTINCT mtb_aart.*," +
|
||||
" qta_esistente, " +
|
||||
" qta_imp_cli + qta_imp_lav AS qta_impegnata, " +
|
||||
" num_esistente AS num_cnf_esistente, " +
|
||||
" num_imp_cli + num_imp_lav AS num_cnf_impegnata " +
|
||||
" FROM mtb_aart " +
|
||||
" LEFT OUTER JOIN mvw_barcode on mtb_aart.cod_mart = mvw_barcode.cod_mart " +
|
||||
" LEFT OUTER JOIN mtb_part mp on mtb_aart.cod_mart = mp.cod_mart " +
|
||||
" AND mp.cod_mdep = '" + SettingsManager.i().getUserSession().getDepo().getCodMdep() + "'" +
|
||||
" WHERE CASE" +
|
||||
" WHEN LEN(mvw_barcode.cod_barre) > 13 THEN mvw_barcode.cod_barre " +
|
||||
" ELSE Replicate('0', 13 - len(mvw_barcode.cod_barre))+ mvw_barcode.cod_barre " +
|
||||
"END LIKE '%' + CASE " +
|
||||
" END LIKE '%' + CASE " +
|
||||
" WHEN LEN('" + codMartOrBarcodeOrDescr + "') > 13 THEN '" + codMartOrBarcodeOrDescr + "' " +
|
||||
" ELSE Replicate('0', 13 - len('" + codMartOrBarcodeOrDescr + "')) + '" + codMartOrBarcodeOrDescr + "'" +
|
||||
" END " +
|
||||
|
||||
@@ -178,8 +178,8 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
ICustomConfiguration customConfiguration = ClassRouter.getInstance(ClassRouter.PATH.CUSTOM_CONFIGURATION);
|
||||
mFlagShowCodForn = customConfiguration.getConfig(BaseCustomConfiguration.Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE);
|
||||
mDivideByGrpMerc = customConfiguration.getConfig(BaseCustomConfiguration.Keys.FLAG_SPEDIZIONE_GROUP_BY_GRP_MERC);
|
||||
mFlagShowCodForn = customConfiguration != null ? customConfiguration.getConfig(BaseCustomConfiguration.Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE) : true;
|
||||
mDivideByGrpMerc = customConfiguration != null ? customConfiguration.getConfig(BaseCustomConfiguration.Keys.FLAG_SPEDIZIONE_GROUP_BY_GRP_MERC) : false;
|
||||
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
mEnableQuantityReset = sharedPreferences.getBoolean("picking_uscita_enable_quantity_reset", true);
|
||||
|
||||
@@ -1,68 +1,115 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.base;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.text.InputType;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogInputGeneralBinding;
|
||||
import it.integry.integrywmsnative.databinding.DialogInputGeneralContentBinding;
|
||||
|
||||
/**
|
||||
* Created by GiuseppeS on 22/03/2018.
|
||||
*/
|
||||
|
||||
public class DialogSimpleInputHelper {
|
||||
public class DialogSimpleInputHelper extends MaterialAlertDialogBuilder {
|
||||
|
||||
|
||||
private static Dialog makeBase(Context mContext, String titleText, String defaultTextValue, String hintText, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick, Integer inputType) {
|
||||
Dialog dialog = new Dialog(mContext);
|
||||
DialogSimpleInputViewModel viewModel = new DialogSimpleInputViewModel(dialog);
|
||||
public final ObservableField<String> inputValue = new ObservableField<>();
|
||||
|
||||
public DialogSimpleInputHelper(@NonNull Context context, String titleText, String defaultTextValue, String hintText, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick, Integer inputType) {
|
||||
super(context);
|
||||
|
||||
DialogInputGeneralBinding mBinding = DataBindingUtil.inflate(LayoutInflater.from(mContext), R.layout.dialog_input_general, null, false);
|
||||
viewModel
|
||||
.setOnPositive(() -> {
|
||||
var dialogBindings = DialogInputGeneralContentBinding.inflate(LayoutInflater.from(context));
|
||||
dialogBindings.setView(this);
|
||||
|
||||
onPositiveClick.run(mBinding.generalInput.getText().toString());
|
||||
})
|
||||
.setOnNegative(onNegativeClick);
|
||||
dialogBindings.executePendingBindings();
|
||||
|
||||
mBinding.setViewmodel(viewModel);
|
||||
|
||||
//Title VIEW
|
||||
|
||||
mBinding.titleText.setText(titleText);
|
||||
this.setTitle(titleText);
|
||||
// this.setMessage("Inserisci la nuova quantità residua dell'ordine");
|
||||
this.setView(dialogBindings.getRoot());
|
||||
this.setCancelable(true);
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(hintText)) {
|
||||
mBinding.generalInput.setHint(hintText);
|
||||
dialogBindings.generalInputText.setHint(hintText);
|
||||
}
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(defaultTextValue)) {
|
||||
mBinding.generalInput.setText(defaultTextValue);
|
||||
dialogBindings.generalInputText.setText(defaultTextValue);
|
||||
}
|
||||
if (inputType != null) {
|
||||
mBinding.generalInput.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||
dialogBindings.generalInputText.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||
}
|
||||
//Content View
|
||||
dialog.setCancelable(true);
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
dialog.setContentView(mBinding.getRoot());
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
UtilityDialog.setTo90PercentWidth(mContext, dialog);
|
||||
|
||||
return dialog;
|
||||
this.setPositiveButton("Ok", (dialog, which) -> {
|
||||
if(onPositiveClick != null) onPositiveClick.run(this.inputValue.get());
|
||||
});
|
||||
|
||||
this.setNegativeButton("Annulla", (dialog, which) -> {
|
||||
if(onNegativeClick != null) onNegativeClick.run();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static Dialog makeInputDialog(Context mContext, String title, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick) {
|
||||
private static DialogSimpleInputHelper makeBase(Context mContext, String titleText, String defaultTextValue, String hintText, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick, Integer inputType) {
|
||||
DialogSimpleInputHelper dialogSimpleInputHelper = new DialogSimpleInputHelper(
|
||||
mContext,
|
||||
titleText,
|
||||
defaultTextValue,
|
||||
hintText,
|
||||
onPositiveClick,
|
||||
onNegativeClick,
|
||||
inputType
|
||||
);
|
||||
|
||||
return dialogSimpleInputHelper;
|
||||
|
||||
// Dialog dialog = new Dialog(mContext);
|
||||
// DialogSimpleInputViewModel viewModel = new DialogSimpleInputViewModel(dialog);
|
||||
//
|
||||
//
|
||||
// DialogInputGeneralBinding mBinding = DataBindingUtil.inflate(LayoutInflater.from(mContext), R.layout.dialog_input_general, null, false);
|
||||
// viewModel
|
||||
// .setOnPositive(() -> {
|
||||
//
|
||||
// onPositiveClick.run(mBinding.generalInput.getText().toString());
|
||||
// })
|
||||
// .setOnNegative(onNegativeClick);
|
||||
//
|
||||
// mBinding.setViewmodel(viewModel);
|
||||
//
|
||||
// //Title VIEW
|
||||
// mBinding.titleText.setText(titleText);
|
||||
//
|
||||
// if (!UtilityString.isNullOrEmpty(hintText)) {
|
||||
// mBinding.generalInput.setHint(hintText);
|
||||
// }
|
||||
//
|
||||
// if (!UtilityString.isNullOrEmpty(defaultTextValue)) {
|
||||
// mBinding.generalInput.setText(defaultTextValue);
|
||||
// }
|
||||
// if (inputType != null) {
|
||||
// mBinding.generalInput.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||
// }
|
||||
// //Content View
|
||||
// dialog.setCancelable(true);
|
||||
// dialog.setCanceledOnTouchOutside(false);
|
||||
// dialog.setContentView(mBinding.getRoot());
|
||||
// dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
// UtilityDialog.setTo90PercentWidth(mContext, dialog);
|
||||
//
|
||||
// return dialog;
|
||||
}
|
||||
|
||||
|
||||
public static DialogSimpleInputHelper makeInputDialog(Context mContext, String title, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick) {
|
||||
|
||||
return makeBase(mContext,
|
||||
title,
|
||||
@@ -75,7 +122,7 @@ public class DialogSimpleInputHelper {
|
||||
}
|
||||
|
||||
|
||||
public static Dialog makeInputDialog(Context mContext, String title, String defaultTextValue, String hintText, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick) {
|
||||
public static DialogSimpleInputHelper makeInputDialog(Context mContext, String title, String defaultTextValue, String hintText, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick) {
|
||||
|
||||
return makeBase(mContext,
|
||||
title,
|
||||
@@ -87,7 +134,7 @@ public class DialogSimpleInputHelper {
|
||||
|
||||
}
|
||||
|
||||
public static Dialog makeInputDialog(Context mContext, String title, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick, Integer inputType) {
|
||||
public static DialogSimpleInputHelper makeInputDialog(Context mContext, String title, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick, Integer inputType) {
|
||||
|
||||
return makeBase(mContext,
|
||||
title,
|
||||
@@ -100,7 +147,7 @@ public class DialogSimpleInputHelper {
|
||||
}
|
||||
|
||||
|
||||
public static Dialog makeInputDialog(Context mContext, String title, String defaultTextValue, String hintText, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick, Integer inputType) {
|
||||
public static DialogSimpleInputHelper makeInputDialog(Context mContext, String title, String defaultTextValue, String hintText, RunnableArgs<String> onPositiveClick, Runnable onNegativeClick, Integer inputType) {
|
||||
|
||||
return makeBase(mContext,
|
||||
title,
|
||||
|
||||
@@ -19,6 +19,11 @@ public class DialogInputQuantityV2DTO {
|
||||
private BigDecimal totalNumCnfOrd;
|
||||
private BigDecimal qtaCnfOrd;
|
||||
|
||||
private BigDecimal totalQtaInWarehouse;
|
||||
private BigDecimal totalNumCnfInWarehouse;
|
||||
private BigDecimal totalQtaCommitted;
|
||||
private BigDecimal totalNumCnfCommitted;
|
||||
|
||||
private BigDecimal totalQtaToBeTaken;
|
||||
private BigDecimal totalNumCnfToBeTaken;
|
||||
private BigDecimal qtaCnfToBeTaken;
|
||||
@@ -106,6 +111,42 @@ public class DialogInputQuantityV2DTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalQtaInWarehouse() {
|
||||
return totalQtaInWarehouse;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setTotalQtaInWarehouse(BigDecimal totalQtaInWarehouse) {
|
||||
this.totalQtaInWarehouse = totalQtaInWarehouse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalNumCnfInWarehouse() {
|
||||
return totalNumCnfInWarehouse;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setTotalNumCnfInWarehouse(BigDecimal totalNumCnfInWarehouse) {
|
||||
this.totalNumCnfInWarehouse = totalNumCnfInWarehouse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalQtaCommitted() {
|
||||
return totalQtaCommitted;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setTotalQtaCommitted(BigDecimal totalQtaCommitted) {
|
||||
this.totalQtaCommitted = totalQtaCommitted;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalNumCnfCommitted() {
|
||||
return totalNumCnfCommitted;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setTotalNumCnfCommitted(BigDecimal totalNumCnfCommitted) {
|
||||
this.totalNumCnfCommitted = totalNumCnfCommitted;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalQtaToBeTaken() {
|
||||
return UtilityBigDecimal.round(totalQtaToBeTaken);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.input_quantity_v2;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@@ -16,7 +15,6 @@ import android.view.inputmethod.EditorInfo;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
@@ -83,7 +81,8 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
public ObservableField<Boolean> enabledChangePartitaMag = new ObservableField<>(true);
|
||||
public ObservableField<Boolean> enabledNotes = new ObservableField<>(false);
|
||||
public ObservableField<Boolean> enabledLUCloseButton = new ObservableField<>(true);
|
||||
private Handler mHandler = new Handler();
|
||||
|
||||
private final Handler mHandler = new Handler();
|
||||
|
||||
private Context context;
|
||||
|
||||
@@ -110,6 +109,11 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2View() {
|
||||
super();
|
||||
// openInFullScreen();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -122,7 +126,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
this.context = getActivity();
|
||||
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_input_quantity_v2, container, false);
|
||||
mBindings = DialogInputQuantityV2Binding.inflate(inflater, container, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
mBindings.toolbar.setTitle("Inserimento articolo");
|
||||
|
||||
@@ -136,6 +140,10 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
.setInitialNumCnf(mDialogInputQuantityV2DTO.getInitialNumCnf())
|
||||
.setInitialQtaCnf(mDialogInputQuantityV2DTO.getInitialQtaCnf())
|
||||
.setInitialQtaTot(mDialogInputQuantityV2DTO.getInitialQtaTot())
|
||||
.setTotalQtaInWarehouse(mDialogInputQuantityV2DTO.getTotalQtaInWarehouse())
|
||||
.setTotalNumCnfInWarehouse(mDialogInputQuantityV2DTO.getTotalNumCnfInWarehouse())
|
||||
.setTotalQtaCommitted(mDialogInputQuantityV2DTO.getTotalQtaCommitted())
|
||||
.setTotalNumCnfCommitted(mDialogInputQuantityV2DTO.getTotalNumCnfCommitted())
|
||||
.setTotalNumCnfOrd(mDialogInputQuantityV2DTO.getTotalNumCnfOrd())
|
||||
.setTotalQtaOrd(mDialogInputQuantityV2DTO.getTotalQtaOrd())
|
||||
.setQtaCnfOrd(mDialogInputQuantityV2DTO.getQtaCnfOrd())
|
||||
@@ -185,6 +193,14 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
if (mAbort) this.mOnAbort.run();
|
||||
}
|
||||
|
||||
private void initBarcode() {
|
||||
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(onScanSuccessful)
|
||||
@@ -213,12 +229,12 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
if (mAbort) this.mOnAbort.run();
|
||||
super.onDismiss(dialog);
|
||||
}
|
||||
// @Override
|
||||
// public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
// BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
// if (mAbort) this.mOnAbort.run();
|
||||
// super.onDismiss(dialog);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
|
||||
@@ -45,6 +45,11 @@ public class DialogInputQuantityV2ViewModel {
|
||||
public BigDecimal totalNumCnfToBeTaken;
|
||||
public BigDecimal qtaCnfToBeTaken;
|
||||
|
||||
public BigDecimal totalQtaInWarehouse;
|
||||
public BigDecimal totalNumCnfInWarehouse;
|
||||
public BigDecimal totalQtaCommitted;
|
||||
public BigDecimal totalNumCnfCommitted;
|
||||
|
||||
public BigDecimal totalQtaAvailable;
|
||||
public BigDecimal totalNumCnfAvailable;
|
||||
public BigDecimal qtaCnfAvailable;
|
||||
@@ -244,6 +249,26 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setTotalQtaInWarehouse(BigDecimal totalQtaInWarehouse) {
|
||||
this.totalQtaInWarehouse = totalQtaInWarehouse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setTotalNumCnfInWarehouse(BigDecimal totalNumCnfInWarehouse) {
|
||||
this.totalNumCnfInWarehouse = totalNumCnfInWarehouse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setTotalQtaCommitted(BigDecimal totalQtaCommitted) {
|
||||
this.totalQtaCommitted = totalQtaCommitted;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setTotalNumCnfCommitted(BigDecimal totalNumCnfCommitted) {
|
||||
this.totalNumCnfCommitted = totalNumCnfCommitted;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setTotalQtaOrd(BigDecimal totalQtaOrd) {
|
||||
this.totalQtaOrd = totalQtaOrd;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.printSsccUl;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface DialogPrintUlSSCCComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
DialogPrintUlSSCCComponent create();
|
||||
}
|
||||
|
||||
void inject(DialogPrintUlSSCCView dialogPrintUlSSCCView);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.printSsccUl;
|
||||
|
||||
import dagger.Module;
|
||||
|
||||
@Module(subcomponents = DialogPrintUlSSCCComponent.class)
|
||||
public class DialogPrintUlSSCCModule {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.printSsccUl;
|
||||
|
||||
import android.content.Context;
|
||||
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 android.widget.RadioGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogPrintUlSsccBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.printSsccUl.dto.PrintUlDTO;
|
||||
|
||||
public class DialogPrintUlSSCCView extends BaseDialogFragment {
|
||||
|
||||
|
||||
private Context mContext;
|
||||
private DialogPrintUlSsccBinding mBindings;
|
||||
private final PrintUlDTO printUlDTO;
|
||||
private final RunnableArgs<PrintUlDTO> onDialogClose;
|
||||
|
||||
|
||||
public static DialogPrintUlSSCCView newInstance(
|
||||
String codJcom, MtbColt mtbColt,
|
||||
RunnableArgs<PrintUlDTO> onDismiss
|
||||
) {
|
||||
return new DialogPrintUlSSCCView(codJcom, mtbColt, onDismiss);
|
||||
}
|
||||
|
||||
public DialogPrintUlSSCCView(@NotNull String codJcom, @NotNull MtbColt mtbColt, @NotNull RunnableArgs<PrintUlDTO> onDismiss) {
|
||||
this.onDialogClose = onDismiss;
|
||||
|
||||
this.printUlDTO = new PrintUlDTO()
|
||||
.setMtbColt(mtbColt)
|
||||
.setFlagPrintShipmentLabel(!UtilityString.isNullOrEmpty(codJcom))
|
||||
.setFlagPrintProductionLabel(UtilityString.isNullOrEmpty(codJcom));
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
this.mContext = getActivity();
|
||||
|
||||
mBindings = DialogPrintUlSsccBinding.inflate(inflater, container, false);
|
||||
|
||||
MainApplication.appComponent
|
||||
.dialogPrintUlSSCCComponent()
|
||||
.create();
|
||||
|
||||
mBindings.setView(this);
|
||||
setCancelable(true);
|
||||
getDialog().setCanceledOnTouchOutside(true);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
public void onCheckChange(RadioGroup radioGroup, int id) {
|
||||
this.printUlDTO.setFlagPrintProductionLabel(id == mBindings.printProductionLabel.getId());
|
||||
this.printUlDTO.setFlagPrintShipmentLabel(id == mBindings.printShippingLabel.getId());
|
||||
|
||||
}
|
||||
|
||||
public void onPositiveClick() {
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
public void onNegativeClick() {
|
||||
this.printUlDTO.setFlagPrintProductionLabel(false);
|
||||
this.printUlDTO.setFlagPrintShipmentLabel(false);
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
this.onDialogClose.run(this.printUlDTO);
|
||||
super.onDismiss(dialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(@NonNull DialogInterface dialog) {
|
||||
this.onNegativeClick();
|
||||
super.onCancel(dialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
if (this.printUlDTO.isFlagPrintShipmentLabel()) {
|
||||
mBindings.printShippingLabel.setChecked(true);
|
||||
} else {
|
||||
mBindings.printProductionLabel.setChecked(true);
|
||||
}
|
||||
super.onStart();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onError(Exception ex) {
|
||||
UtilityExceptions.defaultException(this.mContext, ex);
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.printSsccUl.dto;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
|
||||
public class PrintUlDTO {
|
||||
|
||||
private boolean flagPrintShipmentLabel = false;
|
||||
private boolean flagPrintProductionLabel = false;
|
||||
private MtbColt mtbColt;
|
||||
|
||||
public boolean isFlagPrintShipmentLabel() {
|
||||
return flagPrintShipmentLabel;
|
||||
}
|
||||
|
||||
public PrintUlDTO setFlagPrintShipmentLabel(boolean flagPrintShipmentLabel) {
|
||||
this.flagPrintShipmentLabel = flagPrintShipmentLabel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagPrintProductionLabel() {
|
||||
return flagPrintProductionLabel;
|
||||
}
|
||||
|
||||
public PrintUlDTO setFlagPrintProductionLabel(boolean flagPrintProductionLabel) {
|
||||
this.flagPrintProductionLabel = flagPrintProductionLabel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbColt getMtbColt() {
|
||||
return mtbColt;
|
||||
}
|
||||
|
||||
public PrintUlDTO setMtbColt(MtbColt mtbColt) {
|
||||
this.mtbColt = mtbColt;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.scan_or_create_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
@@ -92,8 +93,6 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
this.mViewModel
|
||||
.setListener(this);
|
||||
|
||||
getDialog().setCanceledOnTouchOutside(false);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc, mEnableCreation);
|
||||
|
||||
@@ -110,6 +109,16 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
var dialog = super.onCreateDialog(savedInstanceState);
|
||||
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
|
||||
@@ -276,6 +276,215 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="1">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/light_blue_100"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:visibility="@{viewmodel.totalNumCnfInWarehouse != null || viewmodel.totalQtaInWarehouse != null ? View.VISIBLE : View.GONE}">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/in_warehouse"
|
||||
android:textColor="@color/gray_600" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityNumber.decimalToString(viewmodel.totalNumCnfInWarehouse, 1)}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/unt_mis_col"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="("
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:text="@{UtilityNumber.decimalToString(viewmodel.totalQtaInWarehouse, 2)}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="@{viewmodel.mtbAart.untMis}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:text=")"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/light_blue_100"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:visibility="@{viewmodel.totalNumCnfCommitted != null || viewmodel.totalQtaCommitted != null ? View.VISIBLE : View.GONE}">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/total_committed"
|
||||
android:textColor="@color/gray_600" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityNumber.decimalToString(viewmodel.totalNumCnfCommitted, 1)}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/unt_mis_col"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="("
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:text="@{UtilityNumber.decimalToString(viewmodel.totalQtaCommitted, 2)}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="@{viewmodel.mtbAart.untMis}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:text=")"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -81,12 +81,12 @@
|
||||
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:padding="6dp"
|
||||
android:src="@drawable/ic_settings_24dp"
|
||||
android:tint="@color/colorPrimaryGray" />
|
||||
|
||||
|
||||
44
app/src/main/res/layout/dialog_input_general_content.xml
Normal file
44
app/src/main/res/layout/dialog_input_general_content.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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>
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/general_input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:focusableInTouchMode="false"
|
||||
android:imeOptions="actionDone"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/general_input_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:selectAllOnFocus="true"
|
||||
app:binding="@{view.inputValue}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
@@ -29,7 +29,8 @@
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -287,6 +288,214 @@
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="1">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/light_blue_100"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:visibility="@{viewmodel.totalNumCnfInWarehouse != null || viewmodel.totalQtaInWarehouse != null ? View.VISIBLE : View.GONE}">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/in_warehouse"
|
||||
android:textColor="@color/gray_600" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityNumber.decimalToString(viewmodel.totalNumCnfInWarehouse, 1)}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/unt_mis_col"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="("
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:text="@{UtilityNumber.decimalToString(viewmodel.totalQtaInWarehouse, 2)}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="@{viewmodel.mtbAart.untMis}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:text=")"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/light_blue_100"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:visibility="@{viewmodel.totalNumCnfCommitted != null || viewmodel.totalQtaCommitted != null ? View.VISIBLE : View.GONE}">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/total_committed"
|
||||
android:textColor="@color/gray_600" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityNumber.decimalToString(viewmodel.totalNumCnfCommitted, 1)}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/unt_mis_col"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="("
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:text="@{UtilityNumber.decimalToString(viewmodel.totalQtaCommitted, 2)}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="@{viewmodel.mtbAart.untMis}"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:text=")"
|
||||
android:textColor="@color/gray_600"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
121
app/src/main/res/layout/dialog_print_ul_sscc.xml
Normal file
121
app/src/main/res/layout/dialog_print_ul_sscc.xml
Normal file
@@ -0,0 +1,121 @@
|
||||
<?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>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCView" />
|
||||
</data>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:cardBackgroundColor="@android:color/transparent"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/base"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:cardBackgroundColor="@color/light_blue_300"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
android:background="@drawable/dialog_card_child_bg"
|
||||
android:padding="24dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="@string/action_close_order" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/TextViewMaterial"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="left"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_text"
|
||||
android:text="@string/message_print_SSCC_list_on_close_order" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/radioGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onCheckedChanged="@{view::onCheckChange}"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/description_text">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/print_shipping_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/action_print_shipping_SSCC" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/print_production_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/action_print_production_SSCC" />
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/buttonPositive"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@string/confirm"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/radioGroup" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/buttonNegative"
|
||||
style="@style/Button.DangerOutline"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> view.onNegativeClick()}"
|
||||
android:text="@string/abort"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/radioGroup"
|
||||
app:layout_constraintEnd_toStartOf="@id/buttonPositive"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</layout>
|
||||
@@ -1,86 +1,85 @@
|
||||
<?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:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/full_white">
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/lines_main_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:itemCount="5"
|
||||
tools:listitem="@layout/fragment_linee_prod_main_list_model" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/lines_main_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/lines_list_empty_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.3">
|
||||
|
||||
<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.1" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/lines_list_empty_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.3">
|
||||
<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_top"
|
||||
android:layout_width="wrap_content"
|
||||
<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:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.1" />
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_playlist_add_check_24dp" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_left"
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
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">
|
||||
android:text="@string/nessuna_linea_disponibile"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<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.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/nessuna_linea_disponibile"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -25,204 +25,200 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="0dp">
|
||||
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
android:weightSum="2">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/mtb_grp_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
android:weightSum="2">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/mtb_grp_container"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Large"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{listModel.getLabel()}"
|
||||
android:textColor="@{ContextCompat.getColor(context,listModel.isStarted() ? R.color.green_600 : listModel.isPaused() ? R.color.orange_600 : R.color.red_600)}"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="L2 - Linea 2"
|
||||
tools:textColor="@color/green_600" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@{ContextCompat.getColor(context, listModel.isStarted() ? R.color.green_600 : listModel.isPaused() ? R.color.orange_600 : R.color.red_600)}"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2"
|
||||
tools:backgroundTint="@color/green_600">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@{ContextCompat.getDrawable(context, listModel.isStarted() ? R.drawable.ic_baseline_play_arrow_24 : listModel.isPaused() ? R.drawable.ic_baseline_pause_24 : R.drawable.ic_baseline_stop_24)}"
|
||||
app:tint="@color/white"
|
||||
tools:src="@drawable/ic_baseline_play_arrow_24" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Large"
|
||||
android:id="@+id/peso_lordo_collo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{listModel.getLabel()}"
|
||||
android:textColor="@{ContextCompat.getColor(context,listModel.isStarted() ? R.color.green_600 : listModel.isPaused() ? R.color.orange_600 : R.color.red_600)}"
|
||||
android:textSize="16sp"
|
||||
android:text="@{listModel.isStarted() ? R.string.in_progress : listModel.isPaused() ? R.string.stand_by : R.string.stopped}"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
tools:text="L2 - Linea 2"
|
||||
tools:textColor="@color/green_600" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@{ContextCompat.getColor(context, listModel.isStarted() ? R.color.green_600 : listModel.isPaused() ? R.color.orange_600 : R.color.red_600)}"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2"
|
||||
tools:backgroundTint="@color/green_600">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@{ContextCompat.getDrawable(context, listModel.isStarted() ? R.drawable.ic_baseline_play_arrow_24 : listModel.isPaused() ? R.drawable.ic_baseline_pause_24 : R.drawable.ic_baseline_stop_24)}"
|
||||
app:tint="@color/white"
|
||||
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"
|
||||
android:text="@{listModel.isStarted() ? R.string.in_progress : listModel.isPaused() ? R.string.stand_by : R.string.stopped}"
|
||||
android:textAppearance="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
tools:text="In lavorazione" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/resources_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{listModel.isStarted() ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/risorse_impostate"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/resources"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{listModel.getRisorseLabel()}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="5/25" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/lista_ords_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{listModel.isStarted() && !UtilityString.isNullOrEmpty(listModel.listaOrd) ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/orders_in_progress"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/lista_ords"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{listModel.listaOrd}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="125|255" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/production_start_cotnainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{listModel.isStarted() ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/inizio_produzione"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/production_start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityDate.formatDate(listModel.datetimeStart, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="05/07/2022 14:00:00" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/production_stop_cotnainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{listModel.isStarted() ? View.GONE : View.VISIBLE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/ultima_produzione"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/production_stop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityDate.formatDate(listModel.datetimeEnd, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="05/07/2022 23:59:59" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
tools:text="In lavorazione" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/resources_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{listModel.isStarted() ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/risorse_impostate"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/resources"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{listModel.getRisorseLabel()}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="5/25" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/lista_ords_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{listModel.isStarted() && !UtilityString.isNullOrEmpty(listModel.listaOrd) ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/orders_in_progress"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/lista_ords"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{listModel.listaOrd}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="125|255" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/production_start_cotnainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{listModel.isStarted() ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/inizio_produzione"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/production_start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityDate.formatDate(listModel.datetimeStart, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="05/07/2022 14:00:00" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/production_stop_cotnainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{listModel.isStarted() ? View.GONE : View.VISIBLE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/ultima_produzione"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/production_stop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityDate.formatDate(listModel.datetimeEnd, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="05/07/2022 23:59:59" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -3,12 +3,13 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
style="@style/Widget.Material3.CardView.Elevated"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="4dp">
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +21,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/menu_icon"
|
||||
android:layout_width="64sp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
android:background="@android:color/white"
|
||||
android:id="@+id/prod_recupero_materiale_main_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/prod_recupero_materiale_list_item"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/empty_view"
|
||||
@@ -54,25 +56,25 @@
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
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_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: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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/no_item_in_recupera_materiale"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp"
|
||||
android:text="@string/no_item_in_recupera_materiale"/>
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -2,29 +2,17 @@
|
||||
|
||||
<layout xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:layout_marginTop="16dp">
|
||||
<androidx.appcompat.widget.AppCompatTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/recuper_materiale_main_list_group_header"
|
||||
style="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/colorPrimary"
|
||||
tools:text="Linea 1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/recuper_materiale_main_list_group_header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="LINEA1"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</layout>
|
||||
|
||||
@@ -1,129 +1,116 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/left_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/left_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentStart="true"
|
||||
android:paddingEnd="8dp">
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp">
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="-8dp"
|
||||
android:text="@string/logistic_unit" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="-8dp"
|
||||
android:text="@string/logistic_unit"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/num_collo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="22"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold"
|
||||
android:textSize="22sp"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/num_collo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/cod_mart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
tools:text="150101-040"
|
||||
android:textColor="@android:color/black"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/partita_mag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/gray_700"
|
||||
tools:text="Lotto articolo"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_toEndOf="@id/cod_mart"
|
||||
android:layout_toStartOf="@id/right_content"
|
||||
android:layout_alignBottom="@id/cod_mart"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:layout_marginEnd="6dp"
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/right_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignBottom="@id/cod_mart"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/qta_versata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
tools:text="27"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/unt_mis_qta_versata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textSize="18sp"
|
||||
tools:text="PZ"/>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/descrizione"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/gray_700"
|
||||
tools:text="Descrizione estesa articolo"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="22" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/cod_mart"
|
||||
style="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="150101-040" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/partita_mag"
|
||||
style="@style/TextAppearance.Material3.TitleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@id/cod_mart"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_toStartOf="@id/right_content"
|
||||
android:layout_toEndOf="@id/cod_mart"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
tools:text="Lotto articolo" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/right_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@id/cod_mart"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/qta_versata"
|
||||
style="@style/TextAppearance.Material3.BodyLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="27" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/unt_mis_qta_versata"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
tools:text="PZ" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/descrizione"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
style="@style/TextAppearance.Material3.BodySmall"
|
||||
tools:text="Descrizione estesa articolo" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</layout>
|
||||
@@ -146,6 +146,8 @@
|
||||
|
||||
<string name="total_ordered">Totale ordinato</string>
|
||||
<string name="total_available">Totale disponibile</string>
|
||||
<string name="total_committed">Totale impegnato</string>
|
||||
<string name="in_warehouse">In magazzino</string>
|
||||
<string name="to_be_taken">Da prelevare</string>
|
||||
<string name="ordered_abbr">Ord</string>
|
||||
<string name="to_dispatch_abbr">Da ev</string>
|
||||
@@ -409,4 +411,6 @@
|
||||
<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>
|
||||
<string name="action_print_shipping_SSCC">Stampa etichetta spedizione</string>
|
||||
<string name="action_print_production_SSCC">Stampa etichetta lavorazione</string>
|
||||
</resources>
|
||||
@@ -144,6 +144,8 @@
|
||||
|
||||
<string name="total_ordered">Total ordered</string>
|
||||
<string name="total_available">Total available</string>
|
||||
<string name="total_committed">Total committed</string>
|
||||
<string name="in_warehouse">In warehouse</string>
|
||||
<string name="to_be_taken">To be taken</string>
|
||||
<string name="ordered_abbr">Ord</string>
|
||||
<string name="to_dispatch_abbr">To disp</string>
|
||||
@@ -415,4 +417,6 @@
|
||||
<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>
|
||||
<string name="action_print_shipping_SSCC">Print shipping label</string>
|
||||
<string name="action_print_production_SSCC">Print production label</string>
|
||||
</resources>
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.honeywell.aidc.BarcodeFailureEvent;
|
||||
import com.honeywell.aidc.BarcodeReadEvent;
|
||||
import com.honeywell.aidc.BarcodeReader;
|
||||
import com.honeywell.aidc.ScannerUnavailableException;
|
||||
import com.honeywell.aidc.UnsupportedPropertyException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -124,12 +123,12 @@ public class HoneyWellBarcodeReader implements BarcodeReaderInterface {
|
||||
|
||||
|
||||
// set the trigger mode to client control
|
||||
try {
|
||||
barcodeReader.setProperty(BarcodeReader.PROPERTY_TRIGGER_CONTROL_MODE,
|
||||
BarcodeReader.TRIGGER_CONTROL_MODE_CLIENT_CONTROL);
|
||||
} catch (UnsupportedPropertyException e) {
|
||||
throw new Exception("Failed to apply properties");
|
||||
}
|
||||
// try {
|
||||
// barcodeReader.setProperty(BarcodeReader.PROPERTY_TRIGGER_CONTROL_MODE,
|
||||
// BarcodeReader.TRIGGER_CONTROL_MODE_CLIENT_CONTROL);
|
||||
// } catch (UnsupportedPropertyException e) {
|
||||
// throw new Exception("Failed to apply properties");
|
||||
// }
|
||||
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
|
||||
@@ -146,7 +145,8 @@ public class HoneyWellBarcodeReader implements BarcodeReaderInterface {
|
||||
properties.put(BarcodeReader.PROPERTY_EAN_13_CHECK_DIGIT_TRANSMIT_ENABLED, true);
|
||||
properties.put(BarcodeReader.PROPERTY_UPC_A_CHECK_DIGIT_TRANSMIT_ENABLED, true);
|
||||
|
||||
properties.put(BarcodeReader.PROPERTY_TRIGGER_CONTROL_MODE, BarcodeReader.TRIGGER_CONTROL_MODE_AUTO_CONTROL);
|
||||
properties.put(BarcodeReader.PROPERTY_TRIGGER_SCAN_MODE, BarcodeReader.TRIGGER_SCAN_MODE_READ_ON_RELEASE);
|
||||
// properties.put(BarcodeReader.PROPERTY_TRIGGER_SCAN_DELAY, 500);
|
||||
|
||||
// Apply the settings
|
||||
barcodeReader.setProperties(properties);
|
||||
|
||||
Reference in New Issue
Block a user