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

Listado de Exportaciones
@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('tipo', 'Filtro por tipo') }}
{{ Form::label('estado', 'Filtro por Estado') }}
{{ Form::label('fechaMin', 'Fecha desde') }} 0) value="{{$fechaMin}}" @endif placeholder="desde">
{{ Form::label('fechaMax', 'Fecha hasta') }} 0) value="{{$fechaMax}}" @endif placeholder="hasta">
@if($etiqueta != null)
{{$etiqueta}}
@endif @if($tipo != null) @foreach ($tipos_de_exportacion as $key => $value) @if($key == $tipo)
{{$value}} @endif @endforeach
@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 $exportacion) @endforeach
# EXPORTACIÓN Tipo de Entrega Fecha Estado
No hay información disponible.
{{$exportacion->lote->etiquetaLote()}} {{$exportacion->user->nombre}} {{$exportacion->tipoEntrega()}} {{$exportacion->fecha()}} {{$exportacion->estadoNombre()}}
@if(count($coleccion) != 0)
@endif
@endsection @section('modal') @include('lote.modal_recibido') @include("reportes.modalReportes") @endsection @section('scripts') $(document).ready( () => { $("#filtrosForm").keypress(function(e) { var code = (e.keyCode ? e.keyCode : e.which); if(code==13){ $("#filtrosForm").submit(); return false; } }); $('#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'); } }); 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('exportacion.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(); } if(filter == 'tipo') { $('#tipo option').each(function(e, i) { if($(i).val() == toRemove) { $(i).prop("selected", false); $("#tipo").trigger("chosen:updated"); } }); $('#filtrosForm').submit(); } } @endsection