ot pdf download

This commit is contained in:
amazuecos
2025-03-30 14:22:43 +02:00
parent 50cd951755
commit bc969828b9
16 changed files with 1198 additions and 458 deletions

View File

@ -153,7 +153,7 @@ class Ordentrabajo extends BaseController
->add("logo", fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo))) ->add("logo", fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)))
->edit( ->edit(
"fecha_encuadernado_at", "fecha_encuadernado_at",
fn($q) => $q->fecha_encuadernado_at? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y"):"" fn($q) => Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y")
) )
->add("action", fn($q) => $q->id) ->add("action", fn($q) => $q->id)
->toJson(true); ->toJson(true);
@ -168,7 +168,7 @@ class Ordentrabajo extends BaseController
->add("logo", fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo))) ->add("logo", fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)))
->edit( ->edit(
"fecha_encuadernado_at", "fecha_encuadernado_at",
fn($q) => $q->fecha_encuadernado_at?Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y"):"" fn($q) => Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y")
) )
->add("action", fn($q) => $q->id) ->add("action", fn($q) => $q->id)
->toJson(true); ->toJson(true);

View File

@ -10,7 +10,8 @@ use App\Models\OrdenTrabajo\OrdenTrabajoTarea;
use App\Models\OrdenTrabajo\OrdenTrabajoUser; use App\Models\OrdenTrabajo\OrdenTrabajoUser;
use App\Models\Pedidos\PedidoModel; use App\Models\Pedidos\PedidoModel;
use CodeIgniter\Entity\Entity; use CodeIgniter\Entity\Entity;
use Picqer\Barcode\Renderers\PngRenderer;
use Picqer\Barcode\Types\TypeCode128;
class OrdenTrabajoEntity extends Entity class OrdenTrabajoEntity extends Entity
{ {
@ -101,4 +102,11 @@ class OrdenTrabajoEntity extends Entity
$this->attributes["dates"] = $ot_dates->fill($data); $this->attributes["dates"] = $ot_dates->fill($data);
return $this; return $this;
} }
public function getBarCode() : string
{
$barcode = new TypeCode128();
$renderer = new PngRenderer();
$barcodeData = $barcode->getBarcode($this->pedido()->presupuesto()->id);
return base64_encode($renderer->render($barcodeData,200, 50));
}
} }

View File

@ -2,6 +2,8 @@
namespace App\Entities\Produccion; namespace App\Entities\Produccion;
use App\Entities\Usuarios\UserEntity;
use App\Models\Usuarios\UserModel;
use CodeIgniter\Entity\Entity; use CodeIgniter\Entity\Entity;
class OrdenTrabajoUserEntity extends Entity class OrdenTrabajoUserEntity extends Entity
@ -10,30 +12,30 @@ class OrdenTrabajoUserEntity extends Entity
protected $dates = ['created_at', 'updated_at', 'deleted_at']; protected $dates = ['created_at', 'updated_at', 'deleted_at'];
protected $attributes = [ protected $attributes = [
"orden_trabajo_id"=> null, "orden_trabajo_id" => null,
"user_created_id"=> null, "user_created_id" => null,
"user_update_id"=> null, "user_update_id" => null,
"inaplazable_revised_change_user_id"=> null, "inaplazable_revised_change_user_id" => null,
"ferro_disponible_hecho_user_id"=> null, "ferro_disponible_hecho_user_id" => null,
"ferro_disponible_ok_user_id"=> null, "ferro_disponible_ok_user_id" => null,
"ferro_entregado_user_id"=> null, "ferro_entregado_user_id" => null,
"pendiente_ferro_user_id"=> null, "pendiente_ferro_user_id" => null,
"ferro_en_cliente_user_id"=> null, "ferro_en_cliente_user_id" => null,
"ferro_ok_user_id"=> null, "ferro_ok_user_id" => null,
"interior_bn_user_id"=> null, "interior_bn_user_id" => null,
"interior_color_user_id"=> null, "interior_color_user_id" => null,
"preparacion_interior_user_id"=> null, "preparacion_interior_user_id" => null,
"cubierta_user_id"=> null, "cubierta_user_id" => null,
"plastificado_user_id"=> null, "plastificado_user_id" => null,
"encuadernacion_user_id"=> null, "encuadernacion_user_id" => null,
"corte_user_id"=> null, "corte_user_id" => null,
"embalaje_user_id"=> null, "embalaje_user_id" => null,
"entrada_manipulado_user_id"=> null, "entrada_manipulado_user_id" => null,
"pre_formato_user_id"=> null, "pre_formato_user_id" => null,
"pre_lomo_user_id"=> null, "pre_lomo_user_id" => null,
"pre_solapa_user_id"=> null, "pre_solapa_user_id" => null,
"pre_codbarras_user_id"=> null, "pre_codbarras_user_id" => null,
"pre_imposicion_user_id"=> null, "pre_imposicion_user_id" => null,
"pre_imprimir_user_id" => null "pre_imprimir_user_id" => null
]; ];
// protected array $casts = [ // protected array $casts = [
@ -63,4 +65,21 @@ class OrdenTrabajoUserEntity extends Entity
// "pre_imposicion_user_id" => "?integer", // "pre_imposicion_user_id" => "?integer",
// "pre_imprimir_user_id" => "?integer" // "pre_imprimir_user_id" => "?integer"
// ]; // ];
protected function userBy(string $key): ?UserEntity
{
$user = null;
if (isset($this->attributes[$key])) {
if ($this->attributes[$key]) {
$m = model(UserModel::class);
$user = $m->find($this->attributes[$key]);
}
}
return $user;
}
public function getPlastificadoBy() : ?UserEntity
{
return $this->userBy('plastificado_user_id');
}
} }

View File

@ -1,6 +1,8 @@
<?php <?php
namespace App\Entities\Tarifas\Acabados; namespace App\Entities\Tarifas\Acabados;
use App\Entities\Tarifas\Maquinas\TarifaAcabadoMaquinaEntity;
use App\Models\Tarifas\Maquinas\TarifaAcabadoMaquinaModel;
use CodeIgniter\Entity; use CodeIgniter\Entity;
class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity
@ -32,4 +34,15 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity
"user_updated_id" => "int", "user_updated_id" => "int",
"is_deleted" => "int", "is_deleted" => "int",
]; ];
/**
* Devuelve las maquinas asociadas a esta tarifa de acabado
*
* @return array<MaquinaEntity>
*/
public function maquinas() : array
{
$m = model(TarifaAcabadoMaquinaModel::class);
$ta_maquinas = $m->where('tarifa_acabado_id',$this->attributes['id'])->findAll();
return array_map(fn(TarifaAcabadoMaquinaEntity $ta_maquina) => $ta_maquina->maquina(),$ta_maquinas);
}
} }

View File

@ -1,7 +1,9 @@
<?php <?php
namespace App\Entities\Tarifas\Maquinas; namespace App\Entities\Tarifas\Maquinas;
use App\Entities\Configuracion\Maquina;
use App\Entities\Tarifas\Acabados\TarifaAcabadoEntity; use App\Entities\Tarifas\Acabados\TarifaAcabadoEntity;
use App\Models\Configuracion\MaquinaModel;
use App\Models\Tarifas\Acabados\TarifaAcabadoModel; use App\Models\Tarifas\Acabados\TarifaAcabadoModel;
use CodeIgniter\Entity\Entity; use CodeIgniter\Entity\Entity;
@ -27,4 +29,10 @@ class TarifaAcabadoMaquinaEntity extends Entity
$m = model(TarifaAcabadoModel::class); $m = model(TarifaAcabadoModel::class);
return $m->find($this->attributes["tarifa_acabado_id"]); return $m->find($this->attributes["tarifa_acabado_id"]);
} }
public function maquina() : Maquina
{
$m = model(MaquinaModel::class);
return $m->find($this->attributes["maquina_id"]);
}
} }

View File

@ -33,9 +33,11 @@
</form> </form>
<div class="col-md-12 mt-3"> <div class="col-md-12 mt-3">
<div class="d-grip gap-2"> <div class="d-grip gap-2">
<a type="button" class="btn btn-primary btn-block w-100 mb-1" target="__blank" href="<?= "/produccion/ordentrabajo/pdf/" . $modelId ?>"><?= @lang("Produccion.preview_pdf") ?></a> <a type="button" class="btn btn-outline-danger btn-block mb-1" target="__blank" href="<?= "/produccion/ordentrabajo/pdf/" . $modelId ?>">
<button type="button" class="btn btn-primary btn-block w-100 mb-1"><?= @lang("Produccion.imprimir_ferro") ?></button> <span class="ti-sm ti ti-eye me-1"></span>
<button type="button" class="btn btn-secondary btn-block w-100 mb-1"><?= @lang("Produccion.imprimir_codigo_safekat") ?></button> <?= @lang("Produccion.preview_pdf") ?></a>
<button type="button" class="btn btn-primary btn-block mb-1"><?= @lang("Produccion.imprimir_ferro") ?></button>
<button type="button" class="btn btn-secondary btn-block mb-1"><?= @lang("Produccion.imprimir_codigo_safekat") ?></button>
</div> </div>
</div> </div>

View File

@ -0,0 +1,356 @@
<?php
use CodeIgniter\I18n\Time;
$session = session();
$settings = $session->get('settings');
?>
<!DOCTYPE html>
<html
lang="<?= $session->get('lang') ?>"
data-assets-path="<?= site_url('themes/vuexy/') ?>"
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Icons -->
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/fontawesome.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/tabler-icons.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/flag-icons.css') ?>" />
<!-- Core CSS -->
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/core.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/theme-semi-dark.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/safekat.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/app-chat.css') ?>">
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.css') ?>" />
<link rel="icon" type="image/x-icon" href="<?= site_url('themes/vuexy/img/favicon/favicon.ico') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.ot.css') ?>">
<title><?= $presupuesto->titulo ?>[OT:<?= $ot->id ?>]</title>
</head>
<body>
<div class="col-md-12" data-id=<?= $ot->id ?>>
<div class="header">
<div class="title"><?= $presupuesto->titulo ?></div>
<div style="font-size: medium;"> <strong><?= Time::now()->format("d/m/Y H:i:s") ?></strong></div>
</div>
<div class="section">
<div class="cover">
<div class="portada">
<img class="portada-img" src="<?= "data:image/png;base64," . base64_encode(file_get_contents(WRITEPATH . "uploads/" . $ot->portada_path)) ?>">
</div>
<div class="portada-info">
<div class="d-flex flex-row justify-content-end">
<h1 class="text-success"><?= $presupuesto->presupuestoLineaImpresion()->isRotativa() ? "Rotativa" : "Plana" ?></h1>
</div>
<div class="portada-row">
<span class="portada-text pl-2"><strong><?= $dates->fecha_encuadernado_at ? week_day_humanize(Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)->getDayOfWeek(), true) : "" ?></strong></span>
<div class="portada-text pr-2"><strong>Comercial:</strong> <?= $cliente->first_name . " " . $cliente->comercial()->last_name ?> </div>
</div>
<div class="portada-row-2 <?= $ot->fecha_entrega_warning ? "bg-red" : "bg-white" ?>">
<div style="display: flex;flex-direction:column;height:100%;width:25%">
<span class="portada-text date <?= $ot->fecha_entrega_warning ? "bg-red" : "bg-white" ?> " id="fecha_encuadernado_at"><?= $dates->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)?->format("d/m/Y") : "" ?></span>
<!-- <div style="width: 100%;height: 100%;background-color:white;margin-left:0.5rem;margin-bottom:0.5rem">
</div> -->
<div class="pl-2">
<table id="table-portada-ubicacion">
<tr class="t-row">
<th class="t-header">IN</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PO</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PL</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">EN</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">MA</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
</table>
</div>
</div>
<div style="display: flex;flex-direction:column;height:100%;width:10%" class="pt-2">
<div class="pl-2 pt-2">
<table id="table-portada-ubicacion">
<tr class="t-row">
<th class="t-header" style="font-size: large;">RF</th>
</tr>
</table>
</div>
</div>
<div class="square-wrapper">
<div class="square bg-white">
BCLF 100
</div>
<div class="square bg-white">
0:3
</div>
<div class="square bg-gray">
EM 300
</div>
<div class="square bg-blue">
BRILLO
</div>
</div>
<div class="cod">
<div class="code-code">
<p style="line-height: 0px;font-size:20px"><?= $ot->id ?></p>
</div>
<div class="cod-barras">
<img src="data:image/png;base64,<?= $ot->bar_code ?>" alt="barcode" />
</div>
</div>
</div>
</div>
</div>
</div>
<div class="section">
<div class="flex-row">
<div class="flex-col" id="presupuesto-section">
<table>
<tr>
<th>Cliente</th>
<td class="t-cell ">
<p class="cliente-title"><?= $cliente->nombre ?></p>
</td>
</tr>
<tr>
<th>Titulo</th>
<td class="t-cell ">
<p class="presupuesto-title"><?= $presupuesto->titulo ?></p>
</td>
</tr>
<tr>
<th>ISBN</th>
<td class="t-cell"><?= $presupuesto->isbn ?></td>
</tr>
<tr>
<th>CIF</th>
<td class="t-cell"><?= $cliente->cif ?></td>
</tr>
</table>
</div>
<div class="esquema-imposicion-wrapper">
<div class="esquema">
<div class="pagina-imposicion-outer-start">
<div class="pagina-imposicion-inner">
A
</div>
</div>
<div class="pagina-imposicion-outer">
<div class="pagina-imposicion-inner">
A
</div>
</div>
<div class="pagina-imposicion-outer">
<div class="pagina-imposicion-inner">
A
</div>
</div>
<div class="pagina-imposicion-outer-end">
<div class="pagina-imposicion-inner">
A
</div>
</div>
</div>
<div class="imposicion">
<table style="width: 400%;">
<tr>
<th>Imposicion</th>
<td>400x400</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="section">
<div class="section-title impresion">IMP. INTERIOR</div>
<table>
<tr>
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_impresion->get_impresion_logo()) ?>" width="35px" height="35px"></td>
<th>Páginas</th>
<th>Ejemplares</th>
<th>Tintas</th>
<th>Formas</th>
<th>Máquina</th>
<th>Clics</th>
<th>Tiempo</th>
</tr>
<tr>
<td><?= $presupuesto->paginas ?></td>
<td><?= $presupuesto->tirada ?></td>
<td>??</td>
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
<td><?= $linea_impresion->rotativa_clicks_total ?></td>
<td><?= float_seconds_to_hhmm_string($linea_impresion->horas_maquina * 3600) ?></td>
</tr>
<tr>
<td colspan="4"><?= $linea_impresion->papel_impresion ?></td>
<td><?= $linea_impresion->papel_impresion()->gramaje . " " . "gr" ?></td>
<td colspan="2"><?= number_format($linea_impresion->rotativa_metros_total, 2, ',', '.') ?> metros</td>
</tr>
</table>
<div class="comments">
<div class="flex-row impresion">Comentarios impresión interior</div>
<div class="comment-content">
<p>
</p>
<br />
<p>
</p>
</div>
</div>
</div>
<div class="section">
<div class="section-title cubierta">IMP. CUBIERTA</div>
<table>
<tr>
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_cubierta->get_impresion_logo()) ?>" width="35px" height="35px"></td>
<th>Tintas</th>
<th>Ejemplares</th>
<th>Maquina</th>
<th>Marcapaginas</th>
<th>Tiempo</th>
</tr>
<tr>
<td>??</td>
<td><?= $presupuesto->tirada ?></td>
<td><strong><?= $linea_cubierta->maquina()->nombre ?></strong></td>
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
<td><?= float_seconds_to_hhmm_string($linea_cubierta->horas_maquina * 3600) ?></td>
</tr>
<tr>
<td colspan="1"><?= json_decode($linea_cubierta->formas)->maquina_ancho ?>x<?= json_decode($linea_cubierta->formas)->maquina_alto ?></td>
<td colspan="1"><?= $papel_formato->ancho ?>x<?= $papel_formato->alto ?></td>
<td colspan="2"><?= $linea_cubierta->papel_impresion ?></td>
<td colspan="2"><?= $linea_cubierta->papel_impresion()->gramaje . " " . "gr" ?></td>
</tr>
</table>
<div class="comments">
<div class="flex-row cubierta">Comentarios cubierta</div>
<div class="comment-content">
<p>
</p>
</div>
</div>
</div>
<div class="section">
<div class="section-title encuadernacion">ENCUADERNACIÓN</div>
<table>
<tr>
<th class="t-header">Plastificado</th>
<td class="t-cell"><?= $acabados[0]->tarifa()->nombre ?></td>
<th class="t-header" style="width: 10%;">UVI</th>
<td class="t-cell"> ?? </td>
</tr>
</table>
<table>
<tr>
<th class="t-header">MAQUINA</th>
<td class="t-cell"><?= implode("/", array_map(fn($q) => $q->nombre, $acabados[0]->maquinas())) ?> </td>
</tr>
</table>
<table>
<tr>
<th class="t-header">OPERARIO</th>
<td class="t-cell"><?= $ot->users()->plastificado_by->getFullName() ?> </td>
</tr>
</table>
<?php if (count($encuadernaciones) > 0): ?>
<table>
<tr>
<th>Encuadernacion</th>
<th>Solapas</th>
<th>Sobrecubierta</th>
<th>Plegado</th>
<th>Guardas</th>
<th>Retractilado</th>
<th>Marcapáginas</th>
</tr>
<?php foreach ($encuadernaciones as $key => $value): ?>
<tr>
<td><?= $value->tarifa()->nombre ?></td>
<td><?= $presupuesto->solapas ? "SI" : "NO" ?></td>
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
<td> ______ pliegos de ______ </td>
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
</tr>
<?php endforeach; ?>
</table>
<div class="comments">
<div class="flex-row encuadernacion">Comentarios encuadernacion:</div>
<div class="comment-content">
<p>
</p>
</div>
</div>
<?php endif; ?>
</div>
<div class="section">
<div class="section-title">LOGISTICA</div>
<table>
<tr>
<th>Peso Unidad</th>
<th>Peso Pedido</th>
<th>Cajas</th>
<th>Corte Pie</th>
</tr>
<tr>
<td><?= number_format($peso_unidad, 2, ',', '.') ?> gr</td>
<td><?= $peso_pedido > 1000 ? number_format($peso_pedido / 1000, 2, ',', '.') . " kg" : number_format($peso_pedido, 2, ',', '.') . " gr" ?> </td>
<td>-</td>
<td>-</td>
</tr>
</table>
<div class="comments">
<div class="flex-row">Comentarios logistica:</div>
<div class="comment-content">
<p>
</p>
</div>
</div>
</div>
<div class="footer">
&copy; 2024 SAFEKAT. Todos los derechos reservados.
</div>
<script src=<?= site_url("themes/vuexy/vendor/libs/html2pdf/html2pdf.bundle.min.js") ?>></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/jquery/jquery.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/popper/popper.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/js/bootstrap.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/hammer/hammer.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/js/menu.js') ?>"></script>
<script src="<?= site_url('assets/js/safekat/pages/pdf/otDownload.js') ?>"></script>
</div>
</body>
</html>

View File

@ -1,126 +1,161 @@
<?php <?php
use CodeIgniter\I18n\Time; use CodeIgniter\I18n\Time;
$session = session();
$settings = $session->get('settings');
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="es"> <html
lang="<?= $session->get('lang') ?>"
data-assets-path="<?= site_url('themes/vuexy/') ?>"
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Icons -->
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/fontawesome.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/tabler-icons.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/flag-icons.css') ?>" />
<!-- Core CSS -->
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/core.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/theme-semi-dark.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/safekat.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/app-chat.css') ?>">
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.css') ?>" />
<link rel="icon" type="image/x-icon" href="<?= site_url('themes/vuexy/img/favicon/favicon.ico') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.ot.css') ?>">
<title><?= $presupuesto->titulo ?>[OT:<?= $ot->id ?>]</title>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.ot.css') ?>">
<title>Rotativa</title>
</head> </head>
<body> <body>
<div>
<div class="header"> <div class="col-md-12" data-id=<?= $ot->id ?>>
<div class="title"><?= $presupuesto->titulo ?></div> <div class="row">
<div><?= Time::now()->format("d/m/Y H:i:s") ?></div> <div class="col-12 d-flex justify-content-between align-items-center">
<h4><?= $presupuesto->titulo ?></h4>
<span class="fs-medium"><strong><?= Time::now()->format("d/m/Y H:i:s") ?></strong></span>
</div>
</div> </div>
<div class="section">
<div class="cover">
<div class="portada">
<img class="portada-img" src="<?= "data:image/png;base64," . base64_encode(file_get_contents(WRITEPATH . "uploads/" . $ot->portada_path)) ?>">
</div>
<div class="portada-info">
<div class="portada-row">
<p class="portada-text pl-2"><strong><?= $dates->fecha_encuadernado_at ? week_day_humanize(Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)->getDayOfWeek(),true) : "" ?></strong></p>
<div class="portada-text pr-2"><strong>Comercial:</strong> <?= $cliente->first_name . " " . $cliente->comercial()->last_name ?> </div>
</div>
<div class="row mb-2 d-flex flex align-items-stretch">
<div class="col-2">
<img class="portada-img border-secondary img-thumbnail img-fluid" src="<?= "data:image/png;base64," . base64_encode(file_get_contents(WRITEPATH . "uploads/" . $ot->portada_path)) ?>" />
</div>
<div class="col-10 <?= $ot->fecha_entrega_warning ? "bg-danger" : "bg-secondary" ?> py-2 rounded border-1 border-secondary">
<div class="row">
<div class="col-8">
<div class="px-2 d-flex flex justify-content-between align-items-center mb-2 border boder-1 border-dark bg-primary text-white rounded-pill bordered border-secondary">
<span><strong><?= $dates->fecha_encuadernado_at ? week_day_humanize(Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)->getDayOfWeek(), true) : "" ?></strong></span>
<span><strong>Comercial:</strong> <?= $cliente->first_name . " " . $cliente->comercial()->last_name ?> </span>
</div> </div>
<div class="portada-row-2"> </div>
<div style="display: flex;flex-direction:column;height:100%;width:25%"> <div class="col-4">
<p class="portada-text date" id="fecha_encuadernado_at"><?= $dates->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)?->format("d/m/Y") : "" ?></p> <div class="px-2 d-flex flex justify-content-center align-items-center mb-2 border boder-1 border-dark bg-success rounded-pill">
<!-- <div style="width: 100%;height: 100%;background-color:white;margin-left:0.5rem;margin-bottom:0.5rem"> <span class="text-white"><strong><?= $presupuesto->presupuestoLineaImpresion()->isRotativa() ? "Rotativa" : "Plana" ?></strong></span>
</div> -->
<div class="pl-2">
<table id="table-portada-ubicacion">
<tr class="t-row">
<th class="t-header">IN</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PO</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PL</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">EN</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">MA</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
</table>
</div>
</div>
<div style="display: flex;flex-direction:column;height:100%;width:10%" class="pt-2">
<div class="pl-2 pt-2">
<table id="table-portada-ubicacion">
<tr class="t-row">
<th class="t-header" style="font-size: large;">RF</th>
</tr>
</table>
</div>
</div>
<div class="square-wrapper">
<div class="square bg-white">
BCLF 100
</div>
<div class="square bg-white">
0:3
</div>
<div class="square bg-gray">
EM 300
</div>
<div class="square bg-blue">
BRILLO
</div>
</div>
<div class="cod">
<div class="code-code">
<p style="line-height: 0px;font-size:20px"><?= $ot->id ?></p>
</div>
<div class="cod-barras"></div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="section">
<div class="flex-row">
<div class="flex-col" id="presupuesto-section">
<table>
<tr>
<th>Cliente</th>
<td class="t-cell ">
<p class="cliente-title"><?= $cliente->nombre ?></p>
</td>
</tr>
<tr>
<th>Titulo</th>
<td class="t-cell ">
<p class="presupuesto-title"><?= $presupuesto->titulo ?></p>
</td>
</tr> <div class="row p-2">
<tr> <div class="col-4 h-100">
<th>ISBN</th> <div class="row px-2 d-flex flex justify-content-between align-items-center">
<td class="t-cell"><?= $presupuesto->isbn ?></td> <div class="col-6 w-75 border border-1 border-dark text-center <?= $ot->fecha_entrega_warning ? "bg-danger" : "bg-secondary" ?> ">
</tr> <span class="text-white" id="fecha_encuadernado_at"><strong><?= $dates->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)?->format("d/m/Y") : "" ?></strong></span>
<tr> </div>
<th>CIF</th> <div class="col-6 w-25 border border-1 border-dark text-center bg-secondary text-white">
<td class="t-cell"><?= $cliente->cif ?></td> <strong>RF</strong>
</tr> </div>
</table> </div>
<div class="row px-2 mt-2 h-100">
<table class="h-100">
<tr class="t-row">
<th class="t-header">IN</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PO</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PL</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">EN</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">MA</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
</table>
</div>
</div> </div>
<div class="col-4">
<div class="row h-100">
<div class="col-6 h-50 square text-center text-dark bg-secondary border border-right border-dark">
BCLF 100
</div>
<div class="col-6 h-50 square text-center text-dark bg-secondary border border-right border-dark">
0:3
</div>
<div class="col-6 h-50 square bg-primary text-center text-white border border-right border-dark">
EM 300
</div>
<div class="col-6 h-50 square bg-blue text-center text-dark bg-secondary border border-right border-dark">
BRILLO
</div>
</div>
</div>
<div class="col-4 bg-warning border border-dark">
<div class="row h-100">
<div class="col-12 h-25 d-flex flex align-items-center justify-content-center">
<span class="fs-large text-white"><strong><?= $ot->id ?></strong></span>
</div>
<div class="col-12 h-75 d-flex flex align-items-center justify-content-center bg-white">
<img class="img-fluid" src="data:image/png;base64,<?= $ot->bar_code ?>" alt="barcode" />
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-8">
<table class="h-100">
<tr>
<th>Cliente</th>
<td class="t-cell ">
<?= $cliente->nombre ?>
</td>
</tr>
<tr>
<th>Titulo</th>
<td class="t-cell ">
<?= $presupuesto->titulo ?>
</td>
</tr>
<tr>
<th>ISBN</th>
<td class="t-cell"><?= $presupuesto->isbn ?></td>
</tr>
<tr>
<th>CIF</th>
<td class="t-cell"><?= $cliente->cif ?></td>
</tr>
</table>
</div>
<div class="col-4">
<div class="col-12 mb-2">
<div class="esquema-imposicion-wrapper"> <div class="esquema-imposicion-wrapper">
<div class="esquema"> <div class="esquema">
<div class="pagina-imposicion-outer-start"> <div class="pagina-imposicion-outer-start">
@ -144,52 +179,56 @@ use CodeIgniter\I18n\Time;
</div> </div>
</div> </div>
</div> </div>
<div class="imposicion">
<table style="width: 400%;">
<tr>
<th>Imposicion</th>
<td>400x400</td>
</tr>
</table>
</div>
</div> </div>
</div>
<div class="col-12">
<div class="imposicion">
<table>
<tr>
<th>Imposicion</th>
<td>400x400</td>
</tr>
</table>
</div>
</div> </div>
</div> </div>
</div>
<div class="row mb-2">
<div class="section-title impresion">IMP. INTERIOR</div>
<div class="col-12">
<div>
<table>
<tr>
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_impresion->get_impresion_logo()) ?>" width="35px" height="35px"></td>
<th>Páginas</th>
<th>Ejemplares</th>
<th>Tintas</th>
<th>Formas</th>
<th>Máquina</th>
<th>Clics</th>
<th>Tiempo</th>
</tr>
<tr>
<td><?= $presupuesto->paginas ?></td>
<td><?= $presupuesto->tirada ?></td>
<td>??</td>
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
<td><?= $linea_impresion->rotativa_clicks_total ?></td>
<td><?= float_seconds_to_hhmm_string($linea_impresion->horas_maquina * 3600) ?></td>
</tr>
<tr>
<td colspan="4"><?= $linea_impresion->papel_impresion ?></td>
<td><?= $linea_impresion->papel_impresion()->gramaje . " " . "gr" ?></td>
<td colspan="2"><?= number_format($linea_impresion->rotativa_metros_total, 2, ',', '.') ?> metros</td>
<div class="section"> </tr>
<div class="section-title impresion">IMP. INTERIOR</div> </table>
<table> </div>
<tr>
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_impresion->get_impresion_logo()) ?>" width="35px" height="35px"></td>
<th>Páginas</th>
<th>Ejemplares</th>
<th>Tintas</th>
<th>Formas</th>
<th>Máquina</th>
<th>Clics</th>
<th>Tiempo</th>
</tr>
<tr>
<td><?= $presupuesto->paginas ?></td>
<td><?= $presupuesto->tirada ?></td>
<td>??</td>
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
<td><?= $linea_impresion->rotativa_clicks_total ?></td>
<td><?= float_seconds_to_hhmm_string($linea_impresion->horas_maquina * 3600) ?></td>
</tr>
<tr>
<td colspan="4"><?= $linea_impresion->papel_impresion ?></td>
<td><?= $linea_impresion->papel_impresion()->gramaje . " " . "gr" ?></td>
<td colspan="2">_________ metros</td>
</tr>
</table>
<div class="comments"> <div class="comments">
<div class="flex-row impresion">Comentarios impresión interior</div> <div class="flex-row impresion">Comentarios impresión interior</div>
<div class="comment-content"> <div class="comment-content w-100">
<p> <p>
</p> </p>
<br /> <br />
@ -198,9 +237,11 @@ use CodeIgniter\I18n\Time;
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="row mb-2">
<div class="section-title cubierta">IMP. CUBIERTA</div>
<div class="col-12">
<div class="section">
<div class="section-title cubierta">IMP. CUBIERTA</div>
<table> <table>
<tr> <tr>
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_cubierta->get_impresion_logo()) ?>" width="35px" height="35px"></td> <td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_cubierta->get_impresion_logo()) ?>" width="35px" height="35px"></td>
@ -233,39 +274,34 @@ use CodeIgniter\I18n\Time;
</div> </div>
</div> </div>
</div> </div>
<div class="section">
<div class="section-title encuadernacion">ENCUADERNACIÓN</div> </div>
<div class="row mb-2">
<div class="section-title encuadernacion">ENCUADERNACIÓN</div>
<div class="col-12">
<table> <table>
<tr> <tr>
<th class="t-header">Plastificado</th> <th class="t-header" style="width: 10%;">Plastificado</th>
<td class="t-cell"><?= $acabados[0]->tarifa()->nombre ?></td> <td class="t-cell"><?= $acabados[0]->tarifa()->nombre ?></td>
<th class="t-header" style="width: 10%;">UVI</th> <th class="t-header" style="width: 10%;">UVI</th>
<td class="t-cell"> ?? </td> <td class="t-cell"> ?? </td>
<th class="t-header" style="width: 10%;">Máquina</th>
<td class="t-cell"><?= implode("/", array_map(fn($q) => $q->nombre, $acabados[0]->maquinas())) ?> </td>
<th class="t-header" style="width: 10%;">Operario</th>
<td class="t-cell"><?= $ot->users()->plastificado_by->getFullName() ?> </td>
</tr> </tr>
</table> </table>
<table> <table>
<tr> <tr>
<th class="t-header">MAQUINA</th> <th>Encuadernacion</th>
<td class="t-cell"> ?? </td> <th>Solapas</th>
<th>Sobrecubierta</th>
<th>Plegado</th>
<th>Guardas</th>
<th>Retractilado</th>
<th>Marcapáginas</th>
</tr> </tr>
</table> <?php if (count($encuadernaciones) > 0): ?>
<table>
<tr>
<th class="t-header">OPERARIO</th>
<td class="t-cell"> ?? </td>
</tr>
</table>
<?php if (count($encuadernaciones) > 0): ?>
<table>
<tr>
<th>Encuadernacion</th>
<th>Solapas</th>
<th>Sobrecubierta</th>
<th>Plegado</th>
<th>Guardas</th>
<th>Retractilado</th>
<th>Marcapáginas</th>
</tr>
<?php foreach ($encuadernaciones as $key => $value): ?> <?php foreach ($encuadernaciones as $key => $value): ?>
<tr> <tr>
<td><?= $value->tarifa()->nombre ?></td> <td><?= $value->tarifa()->nombre ?></td>
@ -277,7 +313,14 @@ use CodeIgniter\I18n\Time;
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td> <td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</table> <?php else: ?>
<tr>
<td colspan="7">Sin encuadernación</td>
</tr>
<?php endif; ?>
</table>
<?php if (count($encuadernaciones) > 0): ?>
<div class="comments"> <div class="comments">
<div class="flex-row encuadernacion">Comentarios encuadernacion:</div> <div class="flex-row encuadernacion">Comentarios encuadernacion:</div>
<div class="comment-content"> <div class="comment-content">
@ -286,10 +329,13 @@ use CodeIgniter\I18n\Time;
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
<div class="section"> </div>
<div class="section-title">LOGISTICA</div> <div class="row mb-2">
<div class="section-title">LOGISTICA</div>
<div class="col-12">
<table> <table>
<tr> <tr>
<th>Peso Unidad</th> <th>Peso Unidad</th>
@ -298,8 +344,8 @@ use CodeIgniter\I18n\Time;
<th>Corte Pie</th> <th>Corte Pie</th>
</tr> </tr>
<tr> <tr>
<td><?= $peso_unidad ?>gr</td> <td><?= number_format($peso_unidad, 2, ',', '.') ?> gr</td>
<td><?= $peso_pedido ?>gr</td> <td><?= $peso_pedido > 1000 ? number_format($peso_pedido / 1000, 2, ',', '.') . " kg" : number_format($peso_pedido, 2, ',', '.') . " gr" ?> </td>
<td>-</td> <td>-</td>
<td>-</td> <td>-</td>
</tr> </tr>
@ -312,11 +358,21 @@ use CodeIgniter\I18n\Time;
</div> </div>
</div> </div>
</div> </div>
<div class="footer">
&copy; 2024 SAFEKAT. Todos los derechos reservados.
</div>
</div> </div>
<div class="col-md-12 d-flex justify-content-center align-items-center">
<span>&copy; 2024 SAFEKAT. Todos los derechos reservados.</span>
</div>
<script src=<?= site_url("themes/vuexy/vendor/libs/html2pdf/html2pdf.bundle.min.js") ?>></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/jquery/jquery.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/popper/popper.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/js/bootstrap.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/hammer/hammer.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/js/menu.js') ?>"></script>
<script src="<?= site_url('assets/js/safekat/pages/pdf/otDownload.js') ?>"></script>
</body> </body>
</html> </html>

View File

@ -17,7 +17,8 @@
"firebase/php-jwt": "^6.10", "firebase/php-jwt": "^6.10",
"hermawan/codeigniter4-datatables": "^0.7.2", "hermawan/codeigniter4-datatables": "^0.7.2",
"nicolab/php-ftp-client": "^2.0", "nicolab/php-ftp-client": "^2.0",
"phpseclib/phpseclib": "~3.0" "phpseclib/phpseclib": "~3.0",
"picqer/php-barcode-generator": "^3.2"
}, },
"require-dev": { "require-dev": {
"fakerphp/faker": "^1.9", "fakerphp/faker": "^1.9",

87
ci4/composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "939889ce4de6a8168b475984ff4401bd", "content-hash": "e811712016c9f7c27fff6e0007f6bc44",
"packages": [ "packages": [
{ {
"name": "codeigniter4/framework", "name": "codeigniter4/framework",
@ -937,6 +937,87 @@
], ],
"time": "2024-09-16T03:06:04+00:00" "time": "2024-09-16T03:06:04+00:00"
}, },
{
"name": "picqer/php-barcode-generator",
"version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/picqer/php-barcode-generator.git",
"reference": "3ef0b26ebd3996e8bb9e90fa2059a67d2e482b3e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/picqer/php-barcode-generator/zipball/3ef0b26ebd3996e8bb9e90fa2059a67d2e482b3e",
"reference": "3ef0b26ebd3996e8bb9e90fa2059a67d2e482b3e",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": "^8.2"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.5"
},
"suggest": {
"ext-bcmath": "Barcode IMB (Intelligent Mail Barcode) needs bcmath extension",
"ext-gd": "For JPG and PNG generators, GD or Imagick is required",
"ext-imagick": "For JPG and PNG generators, GD or Imagick is required"
},
"type": "library",
"autoload": {
"psr-4": {
"Picqer\\Barcode\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0-or-later"
],
"authors": [
{
"name": "Casper Bakker",
"email": "info@picqer.com",
"homepage": "https://picqer.com"
},
{
"name": "Nicola Asuni",
"email": "info@tecnick.com",
"homepage": "http://nicolaasuni.tecnick.com"
}
],
"description": "An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.",
"homepage": "https://github.com/picqer/php-barcode-generator",
"keywords": [
"CODABAR",
"Code11",
"Code93",
"EAN13",
"KIX",
"KIXCODE",
"MSI",
"POSTNET",
"Pharma",
"Standard 2 of 5",
"barcode",
"barcode generator",
"code128",
"code39",
"ean",
"html",
"jpeg",
"jpg",
"php",
"png",
"svg",
"upc"
],
"support": {
"issues": "https://github.com/picqer/php-barcode-generator/issues",
"source": "https://github.com/picqer/php-barcode-generator/tree/v3.2.0"
},
"time": "2024-10-01T19:35:25+00:00"
},
{ {
"name": "psr/log", "name": "psr/log",
"version": "3.0.2", "version": "3.0.2",
@ -3033,12 +3114,12 @@
], ],
"aliases": [], "aliases": [],
"minimum-stability": "stable", "minimum-stability": "stable",
"stability-flags": [], "stability-flags": {},
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^8.2" "php": "^8.2"
}, },
"platform-dev": [], "platform-dev": {},
"plugin-api-version": "2.6.0" "plugin-api-version": "2.6.0"
} }

View File

@ -34,7 +34,7 @@ class OrdenTrabajoDatatable {
render: (d, t) => { render: (d, t) => {
return `<div class="btn-group btn-group-sm"> return `<div class="btn-group btn-group-sm">
<a type="button" href="/produccion/ordentrabajo/edit/${d}" class=" btn btn-outline ot-edit"><i class="ti ti-eye ti-sm mx-2"></i></a> <a type="button" href="/produccion/ordentrabajo/edit/${d}" class=" btn btn-outline ot-edit"><i class="ti ti-eye ti-sm mx-2"></i></a>
<a type="button" href="/produccion/ordentrabajo/pdf/${d}" class="btn btn-outline ot-pdf"><i class="ti ti-download ti-sm mx-2"></i></a> <a type="button" target="_blank" href="/produccion/ordentrabajo/pdf/${d}" class="btn btn-outline ot-pdf"><i class="ti ti-download ti-sm mx-2"></i></a>
</div>` </div>`
} }

View File

@ -0,0 +1,12 @@
$(() => {
console.log("PDF")
var opt = {
margin: 2,
filename: "PDF_OrdenTrabajo_" + $(".pdf-wrapper").data("id") + ".pdf",
image: { type: 'jpeg', quality: 1 },
html2canvas: { scale: 3 },
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
};
let elementToPdf = $('body')[0]
html2pdf().set(opt).from(elementToPdf).save()
})

View File

@ -217,7 +217,6 @@ class OrdenTrabajo {
} }
handleSummaryError(error) { } handleSummaryError(error) { }
fillPreimpresionReview() { fillPreimpresionReview() {
console.log(this.summaryData.ot)
this.otForm.find("[name=fecha_entrega_warning]").prop("checked", this.summaryData.ot.fecha_entrega_warning) this.otForm.find("[name=fecha_entrega_warning]").prop("checked", this.summaryData.ot.fecha_entrega_warning)
this.otForm.find("[name=fecha_entrega_warning_revised]").prop("checked", this.summaryData.ot.fecha_entrega_warning_revised) this.otForm.find("[name=fecha_entrega_warning_revised]").prop("checked", this.summaryData.ot.fecha_entrega_warning_revised)
this.otForm.find("[name=revisar_formato]").prop("checked", this.summaryData.ot.revisar_formato) this.otForm.find("[name=revisar_formato]").prop("checked", this.summaryData.ot.revisar_formato)

View File

@ -0,0 +1,348 @@
@page {
size: A4;
margin: 0;
}
@media print {
body,html {
width: 210mm;
height: 297mm;
max-width: 210mm;
max-height: 297mm;
print-color-adjust: exact;
}
/* ... the rest of the rules ... */
}
html {
font-family: Arial, sans-serif;
width: 210mm;
height: 297mm;
max-width: 210mm;
font-size : 11px;
max-height: 297mm;
background-color: #f9f9f9;
}
body{
border: 0px solid;
padding: 20px;
max-width: 210mm;
max-height: 297mm;
}
.cubierta{
color: #007bff;
}
.encuadernacion{
color: green;
}
.impresion{
color: #ff4000;
}
.container {
width: 100%;
width: 210mm;
height: 297mm;
background: #fff;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border: 2px solid;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
}
.cover{
display: flex;
justify-content: start;
align-items: center;
gap: 10px;
margin-top: 10px;
margin-bottom: 10px;
}
.portada-info{
display: flex;
flex-direction: column;
width: 100%;
}
.impresion-tipo-row{
display: flex;
align-items: center;
justify-items: center;
justify-content: end;
width: 100%;
height: 5mm;
margin: 2px;
}
.portada-row{
display: flex;
align-items: center;
justify-items: center;
justify-content: space-between;
background-color: #4ba0fccc;
width: 100%;
height: 5mm;
border: solid 2px;
margin: 2px;
border-color: black;
}
.portada-row-2{
display: flex;
align-items: center;
justify-items: center;
width: 100%;
height: 35mm;
margin: 2px;
border: 2px solid;
border-color: black;
}
.portada{
height: 40mm;
}
.presupuesto-title{
color: #007bff;
font-size: medium;
line-height: 0;
}
.pl-2{
padding-left: 0.5rem;
}
.pr-2{
padding-right: 0.5rem;
}
.pt-2{
padding-top: 0.5rem;
}
.flex-row{
display: flex;
width: 100%;
justify-content: start;
align-items: flex-start;
}
.date{
padding-left: 0.5rem;
padding-top: 0px;
width: 100%;
line-height: 0px;
stroke-width: 5px;
font-size: medium;
}
#presupuesto-section{
width: 100%;
}
.flex-col{
display: flex;
padding: 0;
flex-direction: column;
}
.cliente-title{
color: red;
font-size: medium;
stroke-width: 10px;
line-height: 0px;
}
.header .title {
font-size: 24px;
font-weight: bold;
color: #333;
}
.section {
margin-top: 0.5rem;
border-top: 1px solid #ddd;
padding-top: 0.2rem;
}
.section-title {
font-weight: bold;
margin-bottom: 10px;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 5px;
font-size: 12px;
}
table th, table td {
border: 2px solid #000000;
text-align: center;
}
table th {
background-color: #f4f4f4;
font-weight: bold;
}
table td{
font-weight: bold;
}
.comments {
color: #555;
font-style: italic;
margin-top: 0.2rem;
}
.comment-content {
line-height: 0;
width: 100%;
height: 50px;
border: solid;
border-width: 1px;
}
.footer {
text-align: center;
margin-top: 0.5rem;
font-size: 14px;
color: #777;
}
.row-logo-impresion{
text-align: center;
}
.portada-img{
border: black;
border-style: solid;
border-width: 2px;
height: 40mm;
width: 100px;
max-width: 30mm;
border: 2px solid;
border-color: black;
border-radius: 5%;
}
.portada-text{
color: white;
}
.t-header{
color: black;
width: 25%;
}
.t-cell{
background-color: white;
color: black;
text-align: start;
padding-left: 0.2rem;
}
.t-row{
font-size: 10px;
}
.esquema{
display: flex;
justify-content:flex-end;
width: 100%;
justify-items: flex-end;
}
.pagina-imposicion-outer-start{
border-top: 2px solid;
border-left: 2px solid;
border-bottom: 2px solid;
width: 50px;
height: 100px;
display: flex;
align-items: center;
justify-content: center;
}
.pagina-imposicion-outer-end{
border-top: 2px solid;
border-right: 2px solid;
border-bottom: 2px solid;
width: 50px;
height: 100px;
display: flex;
align-items: center;
justify-content: center;
}
.pagina-imposicion-outer{
border-top: 2px solid;
border-bottom: 2px solid;
width: 50px;
height: 100px;
display: flex;
align-items: center;
justify-content: center;
}
.pagina-imposicion-inner{
border: 2px solid;
font-size: 25px;
width: 40px;
height: 90px;
display: flex;
align-items: center;
justify-content: center;
}
.square-wrapper{
display: grid;
grid-template-columns: repeat(2,1fr);
margin-left: 5px;
}
.square{
width: 100px;
height: 50px;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
}
.cod{
width: 150px;
height: 100px;
display: flex;
flex-direction: column;
background-color: orange;
margin-left : 20px;
color: white;
align-items: center;
justify-content: space-between;
font-weight: bold;
}
.cod-code{
font-weight: bold;
color: white;
}
.esquema-imposicion-wrapper{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-left: 2rem;
gap: 10px;
}
.imposicion{
display: flex;
align-items: center;
justify-content: center;
width: 200px;
}
.imposicion td{
font-size: large;
}
.cod-barras{
width: 150px;
height: 80px;
text-align : center;
background-color: white;
align-content: center;
}
.cod-barras img {
padding : 1px;
}
.bg-white{
background-color: white;
color: black;
}
.bg-red{
background-color: red;
color: white;
}
.bg-gray{
background-color: gray;
color:white
}
.bg-blue{
background-color: blue;
color: white;
}

View File

@ -3,220 +3,49 @@
margin: 0; margin: 0;
} }
@media print { @media print {
html, body { body,html {
width: 210mm; width: 210mm;
height: 297mm; height: 297mm;
max-width: 210mm;
max-height: 297mm;
print-color-adjust: exact;
} }
/* ... the rest of the rules ... */ /* ... the rest of the rules ... */
} }
html,body { html {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
width: 210mm; width: 210mm;
height: 297mm; height: 297mm;
max-width: 210mm; max-width: 210mm;
font-size : 11px;
max-height: 297mm; max-height: 297mm;
background-color: #f9f9f9; background-color: white;
} }
body{ body{
border: 2px solid; border: 0px solid;
padding: 20px; padding: 10px;
max-width: 210mm;
max-height: 297mm;
background-color : white;
} }
.cubierta{
color: #007bff;
}
.encuadernacion{
color: green;
}
.impresion{
color: #ff4000;
}
.container {
width: 100%;
width: 210mm;
height: 297mm;
background: #fff;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border: 2px solid;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
}
.cover{
display: flex;
justify-content: start;
align-items: center;
gap: 10px;
margin-top: 10px;
margin-bottom: 10px;
}
.portada-info{
display: flex;
flex-direction: column;
width: 100%;
}
.portada-row{
display: flex;
align-items: center;
justify-items: center;
justify-content: space-between;
background-color: #4ba0fccc;
width: 100%;
height: 5mm;
border: solid 2px;
margin: 2px;
border-color: black;
}
.portada-row-2{
display: flex;
align-items: center;
justify-items: center;
background-color: #ff4000;
width: 100%;
height: 35mm;
color: white;
margin: 2px;
border: 2px solid;
border-color: black;
}
.portada{
height: 40mm;
}
.presupuesto-title{
color: #007bff;
font-size: medium;
line-height: 0;
}
.pl-2{
padding-left: 0.5rem;
}
.pr-2{
padding-right: 0.5rem;
}
.pt-2{
padding-top: 0.5rem;
}
.flex-row{
display: flex;
width: 100%;
justify-content: start;
align-items: flex-start;
}
.date{
padding-left: 0.5rem;
padding-top: 0px;
width: 100%;
line-height: 0px;
stroke-width: 5px;
font-size: medium;
}
#presupuesto-section{
width: 100%;
}
.flex-col{
display: flex;
padding: 0;
flex-direction: column;
}
.cliente-title{
color: red;
font-size: medium;
stroke-width: 10px;
line-height: 0px;
}
.header .title {
font-size: 24px;
font-weight: bold;
color: #333;
}
.section {
margin-top: 0.5rem;
border-top: 1px solid #ddd;
padding-top: 0.2rem;
}
.section-title {
font-weight: bold;
margin-bottom: 10px;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 5px;
font-size: 12px;
}
table th, table td {
border: 2px solid #000000;
text-align: center;
}
table th {
background-color: #f4f4f4;
font-weight: bold;
}
table td{
font-weight: bold;
}
.comments {
color: #555;
font-style: italic;
margin-top: 0.2rem;
}
.comment-content {
line-height: 0;
width: 100%;
height: 50px;
border: solid;
border-width: 1px;
}
.footer {
text-align: center;
margin-top: 0.5rem;
font-size: 14px;
color: #777;
}
.row-logo-impresion{
text-align: center;
}
.portada-img{ .portada-img{
border: black;
border-style: solid; border-style: solid;
border-width: 2px; height: 100%;
height: 40mm;
width: 100px;
max-width: 30mm;
border: 2px solid; border: 2px solid;
border-color: black;
border-radius: 5%;
} }
.portada-text{ .square{
color: white; font-size: 14px;
} align-items: center;
align-content : center;
.t-header{ justify-content: center;
color: black; font-weight: bold;
width: 25%;
}
.t-cell{
background-color: white;
color: black;
text-align: start;
padding-left: 0.2rem;
}
.t-row{
font-size: 10px;
} }
.esquema{ .esquema{
display: flex; display: flex;
justify-content:flex-end; justify-content:center;
width: 100%; width: 100%;
justify-items: flex-end; justify-items: center;
} }
.pagina-imposicion-outer-start{ .pagina-imposicion-outer-start{
@ -258,72 +87,77 @@ table td{
justify-content: center; justify-content: center;
} }
.square-wrapper{
display: grid;
grid-template-columns: repeat(2,1fr);
margin-left: 10px;
}
.square{
width: 100px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
}
.cod{
width: 200px;
height: 100px;
display: flex;
flex-direction: column;
background-color: orange;
margin-left: 10px;
color: white;
align-items: center;
justify-content: space-between;
font-weight: bold;
}
.cod-code{
font-weight: bold;
color: white;
}
.esquema-imposicion-wrapper{ .esquema-imposicion-wrapper{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-left: 2rem;
gap: 10px;
} }
.imposicion{ .imposicion{
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 200px;
} }
.imposicion td{ .section-title {
font-size: large; font-weight: bold;
margin-bottom: 10px;
} }
.cod-barras{ .cubierta{
width: 190px; color: #007bff;
}
.encuadernacion{
color: green;
}
.impresion{
color: #ff4000;
}
.comments {
color: #555;
font-style: italic;
margin-top: 0.2rem;
}
.comment-content {
line-height: 0;
width: 100%;
height: 50px; height: 50px;
margin: 5px; border: solid;
background-color: white; border-width: 1px;
} }
.bg-white{
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 5px;
font-size: 12px;
}
table th, table td {
border: 2px solid #000000;
text-align: center;
}
table th {
background-color: #f4f4f4;
font-weight: bold;
color : black;
}
table td{
font-weight: bold;
}
.comments {
color: #555;
font-style: italic;
margin-top: 0.2rem;
}
.t-header{
color: black;
width: 25%;
}
.t-cell{
background-color: white; background-color: white;
color: black; color: black;
text-align: start;
padding-left: 0.2rem;
} }
.bg-red{ .t-row{
background-color: red; font-size: 10px;
color: white; width : 100%;
} }
.bg-gray{
background-color: gray;
color:white
}
.bg-blue{
background-color: blue;
color: white;
}

File diff suppressed because one or more lines are too long