mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
vista creada de envios
This commit is contained in:
@ -768,6 +768,8 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func
|
||||
$routes->group('logistica', ['namespace' => 'App\Controllers\Logistica'], function ($routes) {
|
||||
|
||||
$routes->get('print/label/test', 'LogisticaController::print_test_label');
|
||||
$routes->get('panel', 'LogisticaController::panel', ['as' => 'LogisticaPanel']);
|
||||
$routes->get('selectEnvios/(:any)', 'LogisticaController::selectorEnvios/$1', ['as' => 'selectEnvios']);
|
||||
|
||||
});
|
||||
|
||||
|
||||
@ -15,11 +15,22 @@ class LogisticaController extends BaseController
|
||||
protected string $locale;
|
||||
protected array $viewData;
|
||||
|
||||
protected static $controllerSlug = 'logistica';
|
||||
protected static $viewPath = 'themes/vuexy/form/logistica/';
|
||||
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
$this->impresoraEtiquetaService = service('impresora_etiqueta');
|
||||
$this->locale = session()->get('lang');
|
||||
|
||||
$this->viewData['pageTitle'] = lang('Logistica.logistica');
|
||||
|
||||
// Breadcrumbs
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_logistica"), 'route' => "javascript:void(0);", 'active' => false],
|
||||
];
|
||||
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
}
|
||||
public function print_test_label()
|
||||
@ -28,4 +39,33 @@ class LogisticaController extends BaseController
|
||||
$responseMessage = $etiquetaData["status"] ? "OK" : "ERROR";
|
||||
return $this->response->setJSON(["message" => $responseMessage, "data" => $etiquetaData, "status" => $etiquetaData["status"]]);
|
||||
}
|
||||
|
||||
public function panel()
|
||||
{
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'boxTitle' => lang('Logistica.panel'),
|
||||
'pageSubTitle' => 'Panel',
|
||||
'usingServerSideDataTable' => true,
|
||||
];
|
||||
|
||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||
|
||||
return view(static::$viewPath . 'viewPanelLogistica', $viewData);
|
||||
}
|
||||
|
||||
public function selectorEnvios($tipoEnvio = null)
|
||||
{
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'boxTitle' => lang('Logistica.envioSimpleMultiple'),
|
||||
'usingServerSideDataTable' => true,
|
||||
'tipoEnvio' => $tipoEnvio,
|
||||
];
|
||||
|
||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||
|
||||
return view(static::$viewPath . 'viewLogisticaSelectEnvios', $viewData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -9,4 +9,21 @@ return [
|
||||
'etiquetasEnvio' => 'Etiquetas de envío',
|
||||
'envioFerros' => 'Envío de ferros',
|
||||
'cerrarOTauto' => 'Cerrar OT automáticamente',
|
||||
'envioSimpleMultiple' => 'Envío simple/múltiple',
|
||||
'nuevoEnvio' => 'Nuevo envío',
|
||||
'buscadorPedidosTitle' => 'Código Pedido o ISBN',
|
||||
'listadoEnvios' => 'Listado de envíos',
|
||||
'idEnvio' => 'ID Envío',
|
||||
'numeroPedidos' => 'Nº Pedidos',
|
||||
'numeroLineas' => 'Nº Líneas',
|
||||
'att' => 'Att',
|
||||
'direccion' => 'Dirección',
|
||||
'ciudad' => 'Ciudad',
|
||||
'pais' => 'País',
|
||||
'cp' => 'CP',
|
||||
'email' => 'Email',
|
||||
'telefono' => 'Teléfono',
|
||||
'finalizado' => 'Finalizado',
|
||||
'acciones' => 'Acciones',
|
||||
'backToPanel' => 'Volver al panel',
|
||||
];
|
||||
@ -0,0 +1,83 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4><?= $boxTitle ?></h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="card accordion-item active mb-5">
|
||||
<h4 class="accordion-header px-4 py-3">
|
||||
<?= lang("Logistica.nuevoEnvio") ?>
|
||||
</h4>
|
||||
|
||||
<div id="accordionNuevoEnvioTip" class="accordion-collapse collapse show">
|
||||
<div class="accordion-body px-4 py-3">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="mb-1 col-sm-4">
|
||||
<label for="buscadorPedidos" class="form-label">
|
||||
<?= lang("Logistica.buscadorPedidosTitle") ?>
|
||||
</label>
|
||||
<input id="buscadorPedidos" name="buscador_pedidos" tabindex="1" maxlength="50"
|
||||
class="form-control" value="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card accordion-item active">
|
||||
<h4 class="accordion-header px-4 py-3">
|
||||
<?= lang("Logistica.listadoEnvios") ?>
|
||||
</h4>
|
||||
|
||||
<div id="accordionListadoEnviosTip" class="accordion-collapse collapse show">
|
||||
<div class="accordion-body px-4 py-3">
|
||||
|
||||
<div class="row">
|
||||
<table id="tableOfEnvios" class="table table-striped table-hover w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Logistica.idEnvio') ?? 'ID Envío' ?></th>
|
||||
<th><?= lang('Logistica.numeroPedidos') ?? 'Nº Pedidos' ?></th>
|
||||
<th><?= lang('Logistica.numeroLineas') ?? 'Nº Líneas' ?></th>
|
||||
<th><?= lang('Logistica.att') ?? 'Att' ?></th>
|
||||
<th><?= lang('Logistica.direccion') ?? 'Dirección' ?></th>
|
||||
<th><?= lang('Logistica.ciudad') ?? 'Ciudad' ?></th>
|
||||
<th><?= lang('Logistica.pais') ?? 'País' ?></th>
|
||||
<th><?= lang('Logistica.cp') ?? 'CP' ?></th>
|
||||
<th><?= lang('Logistica.email') ?? 'Email' ?></th>
|
||||
<th><?= lang('Logistica.telefono') ?? 'Teléfono' ?></th>
|
||||
<th><?= lang('Logistica.finalizado') ?? 'Finalizado' ?></th>
|
||||
<th><?= lang('Logistica.acciones') ?? 'Acciones' ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<button type="button" class="btn btn-secondary" id="btnImprimirEtiquetas" onclick="window.location.href='<?= route_to('LogisticaPanel') ?>'">
|
||||
<?= lang('Logistica.backToPanel') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -14,41 +14,43 @@
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-4">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 "
|
||||
onclick="window.location.href='<?= route_to('selectEnvios', 'simple') ?>'"
|
||||
>
|
||||
<?= lang('Logistica.envioSimple') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " >
|
||||
<?= lang('Logistica.envioMultiple') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " >
|
||||
<?= lang('Logistica.envioConjunto') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-4">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " >
|
||||
<?= lang('Logistica.etiquetasTitulos') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " >
|
||||
<?= lang('Logistica.etiquetasEnvio') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " >
|
||||
<?= lang('Logistica.envioFerros') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
|
||||
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " >
|
||||
<?= lang('Logistica.cerrarOTauto') ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user