@extends('layout.app') @section('title', config('app.name')) @section('content')
{{ csrf_field() }}

Listado de Homogeneizaciones
@if(count($lotes_Recibidos)>0) @endif @if($jsonData != null && $jsonData != 'null') @endif @if(count($coleccion)>0) @endif

{{ Form::label('etiqueta', 'Filtro por etiqueta') }} {!! Form::text('etiqueta', $etiqueta, array('class' => 'form-control', 'placeholder' => 'Introduzca una etiqueta')) !!}
{{ Form::label('fechaMin', 'Fecha desde') }} 0) value="{{$fechaMin}}" @endif placeholder="desde">
{{ Form::label('fechaMax', 'Fecha hasta') }} 0) value="{{$fechaMax}}" @endif placeholder="hasta">
{{ Form::label('estado', 'Filtro por Estado') }}
@if($etiqueta != null)
{{$etiqueta}}
@endif @if($fechaMin != null)
{{$fechaMin}}
@endif @if($fechaMax != null)
{{$fechaMax}}
@endif @if($estado != null) @foreach ($estadosLote as $key => $value) @if($key == $estado)
{{$value}} @endif @endforeach
@endif
@if(count($total))
Total de Registros {{$total}}
@endif
@if(count($coleccion) > 0) @endif @if(count($coleccion) == 0) @endif @foreach($coleccion as $value) @endforeach
# LOTE Fecha Estado
No hay información disponible.
{{$value->lote->etiqueta_lote}} @if($value->lote->exportacion() != null) @if($value->lote->exportacion()->sae != null) @if($value->lote->exportacion()->sae->codigo_sae != null) Código SAE: {{$value->lote->exportacion()->sae->codigo_sae}} @endif @endif @endif {{$value->created_at}} {{$value->estadoNombre()}}
@if(count($coleccion) != 0)
@endif
@endsection @section('modal') @include('lote.modal_recibido') @include("reportes.modalReportes") @endsection @section('scripts') $(document).ready( () => { $('#modal').on('shown.bs.modal', function (e) { var route = $(e.relatedTarget).data('route'); var etiqueta = $(e.relatedTarget).data('etiqueta'); $('#form_remito').attr('action', route); $('#etiqueta').text(etiqueta); }); // #foe = boton filtrar o exportar exportar = $('#exportar'); filtrar = $('#filtrar'); exportar.on('click', function() { $('#foe').val("1"); }); filtrar.on('click', function() { $('#foe').val(""); $('#paginator').val(1); }); // Show/Hide filters $('.btn-filter-toggle').on('click', () => { $('.filters-wrapper').toggleClass('open'); if($('.filters-wrapper').hasClass('open')) { setTimeout(() => { $('.filters-wrapper.open').css('overflow', 'visible'); }, 350); } else { $('.filters-wrapper').css('overflow', 'hidden'); } }); //Fix border radius if only one btn on title header. if($('.btn-group .btn').length == 1) { $('.btn-group .btn').eq(0).addClass('btn-group-onlyOne'); } $('#atras').on('click', function(e) { var page = Number ($('#paginator').val()); $('#paginator').val(page -1); $('#filtrosForm').submit(); }); $('#adelante').on('click', function(e) { var page = Number ($('#paginator').val()); console.log(page); $('#paginator').val(page +1); $('#filtrosForm').submit(); }); $('#filtrosForm').on('submit', e => { if($('#foe').val() == 1) { e.preventDefault(); var data = $('#filtrosForm').serializeArray(); $.ajax({ type:'POST', url:'{{ route('homo.filtrado') }}', data: data, headers: {'X-CSRF-TOKEN': window.Laravel.csrfToken}, success:function(resp) { window.location.href = resp; toggleStateLoading(); } }); $('#foe').val(""); } }); $('#modalDetalleEnvio').on('show.bs.modal', function(e) { var ruta = $(e.relatedTarget).data('url'); $('#modalDetalleEnvio .modal-body .modalContentScrollable').load(ruta); }); }); var removeFilter = (filter, toRemove) => { // Etiqueta if(filter == 'etiqueta') { $('input#etiqueta').val(''); $('#filtrosForm').submit(); } // Fechas if(filter == 'fechaMin') { $('input#fechaMin').val(''); $('#filtrosForm').submit(); } if(filter == 'fechaMax') { $('input#fechaMax').val(''); $('#filtrosForm').submit(); } if(filter == 'estado') { $('#estado option').each(function(e, i) { if($(i).val() == toRemove) { $(i).prop("selected", false); $("#estado").trigger("chosen:updated"); } }); $('#filtrosForm').submit(); } } @endsection