@extends('BaseSistemaWeb') @section('CSS') {{ HTML::style('DataTables/dataTables.bootstrap.min.css') }} {{ HTML::style('DataTables/responsive.dataTables.min.css') }} @stop @section('Contenido')

Gestión de ventas en línea

@if (Session::has('message'))
{{ Session::get('message') }}
@endif

Agregar proveedores de envío

{{ Form::open(array('route' => 'SysWebVentasConfEnviosAgregar', 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmAgregar', 'files' => true, 'target' => 'upload_iframe')) }}
@if( ProveedorEnvioxPais::where('paises_envios_ps_id', '=', $Pais->id)->where('envio_gratis', '=', 1)->count() == 0 )

@endif
{{ Form::button('Guardar', array('class' => 'btn btn-primary', 'id' => 'btnAgregar', 'type' => 'submit')) }}
{{ Form::close() }}

Listado de proveedores de envío

Nombre del proveedor Rangos de precios por peso Rangos de precios por precios Acciones
@stop @section('JS') {{ HTML::script('DataTables/jquery.dataTables.min.js') }} {{ HTML::script('DataTables/dataTables.bootstrap.min.js') }} {{ HTML::script('DataTables/dataTables.responsive.min.js') }} @stop @section('JSOr') $("a[data-toggle=\"tab\"]").on("shown.bs.tab", function(e){ $.fn.dataTable.tables({visible: true, api: true}).columns.adjust(); }); $("#tblConfEnvios").DataTable({ "processing": true, "serverSide": true, "ajax": "{{ URL::route('SysWebVentasConfEnviosProveedores', array($Pais->id)) }}", columns: [ {data: "nombre", name: "nombre"}, {data: "rangosPeso", name: "rangosPeso"}, {data: "rangosPrecio", name: "rangosPrecio"}, {data: "acciones", name: "acciones", "searchable": false, "orderable": false, "class": "text-center"} ], "language": { "url": "{{ asset('DataTables/Spanish.json') }}" }, "fnDrawCallback": function(oSettings){ $(".tooltips").tooltip(); }, autoWidth: false, responsive: true }); $("#frmAgregar").submit(function(e){ $.isLoading({ text: "Cargando..." }); NProgress.start(); $("#btnAgregar").html(' Cargando').prop("disabled", true); e.preventDefault(); var frmAgregar = new FormData(document.getElementById("frmAgregar")); $.ajax({ type: "POST", url: "{{ URL::route('SysWebVentasConfEnviosProveedoresAgregar', array($Pais->id)) }}", data: frmAgregar, cache: false, contentType: false, processData: false, dataType: "json", success: function(data){ $.isLoading("hide"); NProgress.done(); $("#btnAgregar").html("Guardar").prop("disabled", false); if(data.success){ new PNotify({ title: "Realizado", text: data.mensaje, type: "success" }); //setTimeout( function(){ window.location.href = "{{ URL::route('SysWebVentasConfEnviosProveedoresAgregar', array($Pais->id)) }}"; }, 3000 ); setTimeout( function(){ window.location.reload(); }, 3000 ); } else{ if(data.mensaje != ''){ new PNotify({ title: "Error", text: data.mensaje, type: "error" }); } $.each(data.errMensajes, function(key, value){ if(value != ''){ $("#err"+key).html(value); } else{ $("#err"+key).html(""); } }); } }, error: function(jqXHR, textStatus, errorThrown){ new PNotify({ title: "Error", text: textStatus + " " + errorThrown, type: "error" }); } }); }); @if(Session::has('EliminarMensajeS')) new PNotify({ title: "Realizado", text: "{{ Session::get('EliminarMensajeS') }}", type: "success" }); @endif @if(Session::has('EliminarMensajeE')) new PNotify({ title: "Realizado", text: "{{ Session::get('EliminarMensajeE') }}", type: "error" }); @endif @stop