From cf4c4df80a94614339972ecfc7251a5843f0f329 Mon Sep 17 00:00:00 2001 From: amazuecos Date: Wed, 30 Apr 2025 09:23:37 +0200 Subject: [PATCH] =?UTF-8?q?Features:=20=20-=20Prototipo=20PDF=20=20-=20Fer?= =?UTF-8?q?ro=20PDF=20=20-=20Ferro=20OK=20fecha=20cambiado=20a=20Ferro/Pro?= =?UTF-8?q?totipo=20OK=20=20-=20Comentarios=20para=20orden,impresion,cubie?= =?UTF-8?q?rta,encuadernacion=20y=20logistica=20=20-=20Migraci=C3=B3n=20pa?= =?UTF-8?q?ra=20comentarios=20=20-=20Tarifas=20acabado=20migraciones=20con?= =?UTF-8?q?=20campos=20para=20identificar=20mejor=20si=20es=20plastificado?= =?UTF-8?q?,plakene,retractilado=20y=20el=20tipo=20de=20cada=20uno?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ci4/app/Config/Routes.php | 2 + .../Controllers/Produccion/Ordentrabajo.php | 8 + ...0_AlterOrdenesTrabajoAddCommentColumns.php | 39 ++ .../Produccion/OrdenTrabajoEntity.php | 10 +- ci4/app/Language/es/Produccion.php | 9 +- .../Models/OrdenTrabajo/OrdenTrabajoModel.php | 4 + ci4/app/Services/ProductionService.php | 8 + .../vuexy/form/produccion/ot/otComments.php | 172 ++++- .../vuexy/form/produccion/ot/otHeader.php | 14 +- .../form/produccion/viewOrdenTrabajoEdit.php | 12 +- ci4/app/Views/themes/vuexy/pdfs/ferro.php | 305 ++++++++ .../Views/themes/vuexy/pdfs/orden_trabajo.php | 660 +++++++++--------- ci4/app/Views/themes/vuexy/pdfs/prototipo.php | 410 +++++++++++ .../assets/js/safekat/pages/pdf/otDownload.js | 18 +- .../assets/js/safekat/pages/produccion/ot.js | 15 +- httpdocs/themes/vuexy/css/pdf.ot.css | 32 +- 16 files changed, 1343 insertions(+), 375 deletions(-) create mode 100755 ci4/app/Database/Migrations/2025-04-30_083700_AlterOrdenesTrabajoAddCommentColumns.php create mode 100755 ci4/app/Views/themes/vuexy/pdfs/ferro.php create mode 100755 ci4/app/Views/themes/vuexy/pdfs/prototipo.php diff --git a/ci4/app/Config/Routes.php b/ci4/app/Config/Routes.php index 4ac5ac81..de724146 100755 --- a/ci4/app/Config/Routes.php +++ b/ci4/app/Config/Routes.php @@ -783,6 +783,8 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func * PDF *========================**/ $routes->get('pdf/(:num)', 'Ordentrabajo::get_pdf/$1'); + $routes->get('pdf/ferro/(:num)', 'Ordentrabajo::get_ferro_pdf/$1'); + $routes->get('pdf/prototipo/(:num)', 'Ordentrabajo::get_prototipo_pdf/$1'); $routes->get('portada/(:num)', 'Ordentrabajo::get_portada_img/$1'); $routes->group('planning', ['namespace' => 'App\Controllers\Produccion'], function ($routes) { $routes->get('select/maquina/rotativa', 'Ordentrabajo::select_maquina_planning_rot'); diff --git a/ci4/app/Controllers/Produccion/Ordentrabajo.php b/ci4/app/Controllers/Produccion/Ordentrabajo.php index 61741e33..366ec0d5 100755 --- a/ci4/app/Controllers/Produccion/Ordentrabajo.php +++ b/ci4/app/Controllers/Produccion/Ordentrabajo.php @@ -313,6 +313,14 @@ class Ordentrabajo extends BaseController { return $this->produccionService->init($orden_trabajo_id)->getPdf(); } + public function get_ferro_pdf($orden_trabajo_id) + { + return $this->produccionService->init($orden_trabajo_id)->getFerroPdf(); + } + public function get_prototipo_pdf($orden_trabajo_id) + { + return $this->produccionService->init($orden_trabajo_id)->getPrototipoPdf(); + } public function upload_orden_trabajo_portada() { try { diff --git a/ci4/app/Database/Migrations/2025-04-30_083700_AlterOrdenesTrabajoAddCommentColumns.php b/ci4/app/Database/Migrations/2025-04-30_083700_AlterOrdenesTrabajoAddCommentColumns.php new file mode 100755 index 00000000..626e7fc1 --- /dev/null +++ b/ci4/app/Database/Migrations/2025-04-30_083700_AlterOrdenesTrabajoAddCommentColumns.php @@ -0,0 +1,39 @@ + [ + 'type' => 'LONGTEXT', + 'null' => true + ], + 'comment_cubierta' => [ + 'type' => 'LONGTEXT', + 'null' => true + ], + 'comment_encuadernacion' => [ + 'type' => 'LONGTEXT', + 'null' => true + ], + 'comment_logistica' => [ + 'type' => 'LONGTEXT', + 'null' => true + ], + ]; + public function up() + { + + $this->forge->addColumn('ordenes_trabajo',$this->COLUMNS); + + } + + public function down() + { + $this->forge->dropColumn('ordenes_trabajo',array_keys($this->COLUMNS)); + + } +} diff --git a/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php b/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php index b5d9216c..b3f38e26 100755 --- a/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php +++ b/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php @@ -30,6 +30,10 @@ class OrdenTrabajoEntity extends Entity "progreso" => 0.00, "estado" => "I", "comentarios" => null, + "comment_interior"=> null, + "comment_cubierta"=> null, + "comment_encuadernacion"=> null, + "comment_logistica"=> null, "revisar_formato" => null, "revisar_lomo" => null, "revisar_solapa" => null, @@ -52,7 +56,11 @@ class OrdenTrabajoEntity extends Entity "tipo_entrada" => "string", "progreso" => "float", "estado" => "string", - "comentarios" => "string", + "comentarios" => "?string", + "comment_interior"=> "?string", + "comment_cubierta"=> "?string", + "comment_encuadernacion"=> "?string", + "comment_logistica"=> "?string", "revisar_formato" => "bool", "revisar_lomo" => "bool", "revisar_solapa" => "bool", diff --git a/ci4/app/Language/es/Produccion.php b/ci4/app/Language/es/Produccion.php index a511f03e..dada2238 100755 --- a/ci4/app/Language/es/Produccion.php +++ b/ci4/app/Language/es/Produccion.php @@ -48,7 +48,7 @@ return [ "finalizadas" => "Finalizadas", "pendiente_ferro" => "Ferro pendiente", "pendientes" => "Pendientes", - "ferro_ok" => "Ferro ok", + "ferro_ok" => "Ferro/Prototipo ok", "envio" => "Envío", "ferro" => "Ferro", "ot" => "Orden trabajo", @@ -80,6 +80,7 @@ return [ "preview_pdf" => "Previsualizar PDF", "imprimir_codigo_safekat" => "Imprimir código SAFEKAT", "imprimir_ferro" => "Imprimir ferro", + "imprimir_prototipo" => "Prototipo", "planning_rotativa" => "Planificación rotativa", "planning_plana" => "Planificación plana", "solapa" => "Solapa", @@ -144,6 +145,12 @@ return [ 'print_label' => "Imprimir etiqueta", 'click_init' => "Clicks al inicio", 'click_end' => "Clicks al final", + "comentarios" => "Comentarios", + "comentariosOt" => "Comentarios orden", + "comentariosImpresionInterior" => "Comentarios interior", + "comentariosCubierta" => "Comentarios cubierta", + "comentariosEncuadernacion" => "Comentarios encuadernación", + "comentariosLogistica" => "Comentarios logística", ]; \ No newline at end of file diff --git a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php index d7a1f37a..b9a0cddf 100755 --- a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php +++ b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php @@ -25,6 +25,10 @@ class OrdenTrabajoModel extends Model "progreso", "estado", "comentarios", + "comment_interior", + "comment_cubierta", + "comment_encuadernacion", + "comment_logistica", "revisar_formato", "revisar_lomo", "revisar_solapa", diff --git a/ci4/app/Services/ProductionService.php b/ci4/app/Services/ProductionService.php index 006949c2..dc5bfe80 100755 --- a/ci4/app/Services/ProductionService.php +++ b/ci4/app/Services/ProductionService.php @@ -585,6 +585,14 @@ class ProductionService extends BaseService { return view("themes/vuexy/pdfs/orden_trabajo", $this->getDataPdf()); } + public function getFerroPdf() + { + return view("themes/vuexy/pdfs/ferro", $this->getDataPdf()); + } + public function getPrototipoPdf() + { + return view("themes/vuexy/pdfs/prototipo", $this->getDataPdf()); + } /** * Query para mostrar en datatable * diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otComments.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otComments.php index 222d64f9..f2aff0f7 100755 --- a/ci4/app/Views/themes/vuexy/form/produccion/ot/otComments.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otComments.php @@ -1,6 +1,168 @@ +
+
+

+ +

-
- - - -
\ No newline at end of file +
+
+ +
+
+
+
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php index 2777d260..469decd9 100755 --- a/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php @@ -42,9 +42,17 @@ Pedido - "> - - PDF + ferro == 1): ?> + dates()->ferro_ok_at != null): ?> + "> + + PDF + + + "> + + PDF + diff --git a/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php b/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php index 474445ce..c57b532f 100755 --- a/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php @@ -45,9 +45,17 @@ href=""> + ferro): ?> + "> + + + prototipo): ?> - + "> + + get('settings'); +?> + + + + + + + + + + + + + + + + + + +<?= $presupuesto->titulo ?>[OT:<?= $ot->id ?>] + + + + + +
id . "_" . $presupuesto->titulo ?>"> +
+
+
titulo ?>
+ format("d/m/Y H:i:s") ?> +
+
+ +
+
+
+ full_path): ?> + full_path)) : '/assets/img/portada_not_found.png' ?>" /> + + + + + +
+
;color:;"> +
+
+
;color:;"> + fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?> + Comercial: first_name . " " . $cliente->comercial()->last_name ?> +
+
+
+
+ ;color:;"> + + POD + presupuestoLineaImpresion()->isRotativa()): ?> + ROTATIVA + + GENERAL + + + + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
IN
PORT.
ACABAD.
ENCUAD.
MANIPUL.
+
+ +
+
+
+
;color:;"> + +
+
+
+
;color:;"> + papel_impresion()->papel_code_ot ?> +
+
"> + +
+
;color:;"> + papel_impresion()->papel_code_ot ?> +
+
;color:;"> + tarifa()->code : "" ?> +
+ $acabado): ?> + tarifa()->isUVI()): ?> +
;color:white;"> + + tarifa()->code ?> +
+ + +
+
+
"> +
+
+ ;">id ?> +
+
+ barcode +
+ +
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
IDSK + +
CLIENTE + alias ?> +
TITULO + titulo ?> +
ISBNisbn ?>
PEDIDO CLIENTEid ?>
+
+
+
+ + + imposicion_esquema()): ?> + imposicion_esquema()->svg_schema ?> + + + +
+
+
+ + + + + +
Imposicionfull_name ?? "" ?>
+
+
+
+
+
+
IMP. INTERIOR
+
+
+ + + + + + + + + + + +
ancho ?>xalto ?> 1 tipo_presupuesto()?->codigo ?? "" ?> lomo_cubierta, 2, ',', '.') ?>
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
PáginasEjemplaresTintasFormasMáquinaClicsTiempo
paginas ?> 1 tinta() ?>formas)->formas ?>maquina()->nombre ?>rotativa_clicks_libro ?>horas_maquina * 3600 / $presupuesto->tirada) ?>
papel_impresion ?>papel_impresion()->gramaje . " " . "gr" ?> + isRotativa()): ?> + rotativa_metros_libro, 2, ',', '.') ?> metros + +
+
+
+
Comentarios impresión interior
+
+

+ comment_interior ?> +

+
+
+
+
+
+
LOGISTICA
+
+ + + + + + + + + + + +
Peso UnidadPeso PedidoCorte Pie
gr 1000 ? number_format($peso_unidad / 1000, 2, ',', '.') . " kg" : number_format($peso_unidad, 2, ',', '.') . " gr" ?> -
+
+
Comentarios logistica:
+
+

+ comment_logistica ?> +

+
+
+
+
+
+ © 2024 SAFEKAT. Todos los derechos reservados. +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php b/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php index 408ce733..926d822f 100755 --- a/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php +++ b/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php @@ -32,378 +32,382 @@ $settings = $session->get('settings'); - -
id . "_" . $presupuesto->titulo ?>"> -
-
-
titulo ?>
- format("d/m/Y H:i:s") ?> -
-
- -
-
-
- full_path): ?> - full_path)) : '/assets/img/portada_not_found.png' ?>" /> - - - - - -
-
;color:;"> +
+
id . "_" . $presupuesto->titulo ?>">
-
-
;color:;"> - fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?> - Comercial: first_name . " " . $cliente->comercial()->last_name ?> -
-
-
-
- ;color:;"> - - POD - presupuestoLineaImpresion()->isRotativa()): ?> - ROTATIVA - - GENERAL - - - - -
-
-
- -
-
-
-
- ;">fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "" ?> -
-
-
- - - - - - - - - - - - - - - - - - - - - -
IN
PORT.
ACABAD.
ENCUAD.
MANIPUL.
-
- -
-
-
-
;color:;"> - -
-
-
-
;color:;"> - papel_impresion()->papel_code_ot ?> -
-
"> - -
-
;color:;"> - papel_impresion()->papel_code_ot ?> -
-
;color:;"> - tarifa()->code : "" ?> -
- $acabado): ?> - tarifa()->isUVI()): ?> -
;color:white;"> - + tarifa()->code ?> -
- - -
-
-
"> -
-
- ;">id ?> -
-
- barcode -
- -
+
+
titulo ?>
+ format("d/m/Y H:i:s") ?>
-
-
-
- - - - - - - - - - - - - - - - - - - - - - -
IDSK +
+
+ full_path): ?> + full_path)) : '/assets/img/portada_not_found.png' ?>" /> + + -
CLIENTE - alias ?> -
TITULO - titulo ?> -
ISBNisbn ?>
PEDIDO CLIENTEid ?>
-
-
-
- - - imposicion_esquema()): ?> - imposicion_esquema()->svg_schema ?> -
-
-
- - - - - -
Imposicionfull_name ?? "" ?>
+
;color:;"> +
+
+
;color:;"> + fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?> + Comercial: first_name . " " . $cliente->comercial()->last_name ?> +
+
+
+
+ ;color:;"> + + POD + presupuestoLineaImpresion()->isRotativa()): ?> + ROTATIVA + + GENERAL + + + + +
+
+ +
+
+
+
+ ;">fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "" ?> +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
IN
PORT.
ACABAD.
ENCUAD.
MANIPUL.
+
+ +
+
+
+
;color:;"> + +
+
+
+
;color:;"> + papel_impresion()->papel_code_ot ?> +
+
"> + +
+
;color:;"> + papel_impresion()->papel_code_ot ?> +
+
;color:;"> + tarifa()->code : "" ?> +
+ $acabado): ?> + tarifa()->isUVI()): ?> +
;color:white;"> + + tarifa()->code ?> +
+ + +
+
+
"> +
+
+ ;">id ?> +
+
+ barcode +
+ +
+
+
+
-
-
-
IMP. INTERIOR
-
-
- +
+
+
- - - - - - - - - -
ancho ?>xalto ?> tirada ?> + merma ?> tipo_presupuesto()?->codigo ?? "" ?> lomo_cubierta, 2, ',', '.') ?>
- - - - - - - - - - + + - - - - - - - + + - - - + + + + + + + + +
PáginasEjemplaresTintasFormasMáquinaClicsTiempoIDSK + +
paginas ?> tirada ?> tinta() ?>formas)->formas ?>maquina()->nombre ?>rotativa_clicks_total ?>horas_maquina * 3600) ?>CLIENTE + alias ?> +
papel_impresion ?>papel_impresion()->gramaje . " " . "gr" ?> - isRotativa()): ?> - rotativa_metros_total, 2, ',', '.') ?> metros - + TITULO + titulo ?>
ISBNisbn ?>
PEDIDO CLIENTEid ?>
-
-
Comentarios impresión interior
-
-

-

-
-

-

+
+
+ + + imposicion_esquema()): ?> + imposicion_esquema()->svg_schema ?> + + + +
+
+
+ + + + + +
Imposicionfull_name ?? "" ?>
+
-
-
-
IMP. CUBIERTA
+
IMP. INTERIOR
+
+ + + + + + + + + + + +
ancho ?>xalto ?> tirada ?> + merma ?> tipo_presupuesto()?->codigo ?? "" ?> lomo_cubierta, 2, ',', '.') ?>
+ + + + + + + + + + + + + + + + + + + + + + + + + +
PáginasEjemplaresTintasFormasMáquinaClicsTiempo
paginas ?> tirada ?> tinta() ?>formas)->formas ?>maquina()->nombre ?>rotativa_clicks_total ?>horas_maquina * 3600) ?>
papel_impresion ?>papel_impresion()->gramaje . " " . "gr" ?> + isRotativa()): ?> + rotativa_metros_total, 2, ',', '.') ?> metros + +
+
+
+
+
+

+ comment_interior ?> +

+
+
+
+
+ +
+
IMP. CUBIERTA
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
TintasEjemplaresMaquinaMarcapaginasTiempo
tinta() ?>tirada ?>maquina()->nombre ?>marcapaginas ? "SI" : "NO" ?>horas_maquina * 3600) ?>
formas)->maquina_ancho ?>xformas)->maquina_alto ?>ancho ?>xalto ?>papel_impresion ?>papel_impresion()->gramaje . " " . "gr" ?>
+
+
+ +
+

+ comment_cubierta ?> +

+
+
+
+ +
+ +
+
ACABADOS/ENCUADERNACIÓN
+
+
;color:;"> + +
+ + $acabado): ?> + + + + + + + + + + + + + + + + + +
Plastificadotarifa()->nombre ?>UVI EXTERNO:proveedor() ? $acabado->proveedor()->nombre : "" ?>
Meter datos de solapas y preparación guillotinaCORTE PIE:
+ + $encuadernacion) { + $encuadernacion_code = $encuadernacion->tarifa()->code; + try { + if ($encuadernacion_code) { + echo view("/themes/vuexy/pdfs/encuadernados/$encuadernacion_code.php", ["encuadernacion" => $encuadernacion]); + } else { + echo view("/themes/vuexy/pdfs/encuadernados/default.php", ["encuadernacion" => $encuadernacion]); + } + } catch (\Throwable $th) { + $error_message = $th->getMessage(); + echo "No se ha podido renderizar la tabla de encuadernación"; + // echo "
$error_message"; + } + } + ?> + 0): ?> + +
+
+
+

+ comment_encuadernacion ?> +

+
+
+ + +
+ +
+
+
LOGISTICA
+
- - - - - - + + + + - - - - - - - - - - - - + + + +
TintasEjemplaresMaquinaMarcapaginasTiempoPeso UnidadPeso PedidoCajasCorte Pie
tinta() ?>tirada ?>maquina()->nombre ?>marcapaginas ? "SI" : "NO" ?>horas_maquina * 3600) ?>
formas)->maquina_ancho ?>xformas)->maquina_alto ?>ancho ?>xalto ?>papel_impresion ?>papel_impresion()->gramaje . " " . "gr" ?> gr 1000 ? number_format($peso_pedido / 1000, 2, ',', '.') . " kg" : number_format($peso_pedido, 2, ',', '.') . " gr" ?> --
-
Comentarios cubierta
-
+
+ +

+ comment_logistica ?>

-
- -
-
ACABADOS/ENCUADERNACIÓN
-
-
;color:;"> - -
- - $acabado): ?> - - - - - - - - - - - - - - - - - -
Plastificadotarifa()->nombre ?>UVI EXTERNO:proveedor() ? $acabado->proveedor()->nombre : "" ?>
Meter datos de solapas y preparación guillotinaCORTE PIE:
- - $encuadernacion) { - $encuadernacion_code = $encuadernacion->tarifa()->code; - try { - if ($encuadernacion_code) { - echo view("/themes/vuexy/pdfs/encuadernados/$encuadernacion_code.php", ["encuadernacion" => $encuadernacion]); - } else { - echo view("/themes/vuexy/pdfs/encuadernados/default.php", ["encuadernacion" => $encuadernacion]); - } - } catch (\Throwable $th) { - $error_message = $th->getMessage(); - echo "No se ha podido renderizar la tabla de encuadernación"; - // echo "
$error_message"; - } - } - ?> - 0): ?> - -
-
Comentarios encuadernacion:
-
-

-

-
-
- - +
+ © 2024 SAFEKAT. Todos los derechos reservados.
-
-
-
LOGISTICA
-
- - - - - - - - - - - - - -
Peso UnidadPeso PedidoCajasCorte Pie
gr 1000 ? number_format($peso_pedido / 1000, 2, ',', '.') . " kg" : number_format($peso_pedido, 2, ',', '.') . " gr" ?> --
-
-
Comentarios logistica:
-
-

-

-
-
-
-
-
- © 2024 SAFEKAT. Todos los derechos reservados. -
- - - - - - - - - - +
+ + + + + + + + + \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/pdfs/prototipo.php b/ci4/app/Views/themes/vuexy/pdfs/prototipo.php new file mode 100755 index 00000000..3c6a04ad --- /dev/null +++ b/ci4/app/Views/themes/vuexy/pdfs/prototipo.php @@ -0,0 +1,410 @@ +get('settings'); +?> + + + + + + + + + + + + + + + + + + +<?= $presupuesto->titulo ?>[OT:<?= $ot->id ?>] + + + + + +
id . "_" . $presupuesto->titulo ?>"> +
+
+
titulo ?>
+ format("d/m/Y H:i:s") ?> +
+
+ +
+
+
+ full_path): ?> + full_path)) : '/assets/img/portada_not_found.png' ?>" /> + + + + + +
+
;color:;"> +
+
+
;color:;"> + fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?> + Comercial: first_name . " " . $cliente->comercial()->last_name ?> +
+
+
+
+ ;color:;"> + + POD + presupuestoLineaImpresion()->isRotativa()): ?> + ROTATIVA + + GENERAL + + + + +
+
+
+ +
+
+
+
+ ;">fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "" ?> +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
IN
PORT.
ACABAD.
ENCUAD.
MANIPUL.
+
+ +
+
+
+
;color:;"> + +
+
+
+
;color:;"> + papel_impresion()->papel_code_ot ?> +
+
"> + +
+
;color:;"> + papel_impresion()->papel_code_ot ?> +
+
;color:;"> + tarifa()->code : "" ?> +
+ $acabado): ?> + tarifa()->isUVI()): ?> +
;color:white;"> + + tarifa()->code ?> +
+ + +
+
+
"> +
+
+ ;">id ?> +
+
+ barcode +
+ +
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
IDSK + +
CLIENTE + alias ?> +
TITULO + titulo ?> +
ISBNisbn ?>
PEDIDO CLIENTEid ?>
+
+
+
+ + + imposicion_esquema()): ?> + imposicion_esquema()->svg_schema ?> + + + +
+
+
+ + + + + +
Imposicionfull_name ?? "" ?>
+
+
+
+
+
+
IMP. INTERIOR
+
+
+ + + + + + + + + + + +
ancho ?>xalto ?> tirada/$presupuesto->tirada ?> tipo_presupuesto()?->codigo ?? "" ?> lomo_cubierta, 2, ',', '.') ?>
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
PáginasEjemplaresTintasFormasMáquinaClicsTiempo
paginas ?> tirada / $presupuesto->tirada ?> tinta() ?>formas)->formas ?>maquina()->nombre ?>rotativa_clicks_libro ?>horas_maquina * 3600 / $presupuesto->tirada) ?>
papel_impresion ?>papel_impresion()->gramaje . " " . "gr" ?> + isRotativa()): ?> + rotativa_metros_libro, 2, ',', '.') ?> metros + +
+
+
+
+
+

+ comment_interior ?> +

+
+
+
+
+ +
+
IMP. CUBIERTA
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
TintasEjemplaresMaquinaMarcapaginasTiempo
tinta() ?>tirada/$presupuesto->tirada ?>maquina()->nombre ?>marcapaginas ? "SI" : "NO" ?>horas_maquina * 3600/$presupuesto->tirada) ?>
formas)->maquina_ancho ?>xformas)->maquina_alto ?>ancho ?>xalto ?>papel_impresion ?>papel_impresion()->gramaje . " " . "gr" ?>
+
+
+ +
+

+ comment_cubierta ?> +

+
+
+
+ +
+ +
+
ACABADOS/ENCUADERNACIÓN
+
+
;color:;"> + +
+ + $acabado): ?> + + + + + + + + + + + + + + + + + +
Plastificadotarifa()->nombre ?>UVI EXTERNO:proveedor() ? $acabado->proveedor()->nombre : "" ?>
Meter datos de solapas y preparación guillotinaCORTE PIE:
+ + $encuadernacion) { + $encuadernacion_code = $encuadernacion->tarifa()->code; + try { + if ($encuadernacion_code) { + echo view("/themes/vuexy/pdfs/encuadernados/$encuadernacion_code.php", ["encuadernacion" => $encuadernacion]); + } else { + echo view("/themes/vuexy/pdfs/encuadernados/default.php", ["encuadernacion" => $encuadernacion]); + } + } catch (\Throwable $th) { + $error_message = $th->getMessage(); + echo "No se ha podido renderizar la tabla de encuadernación"; + // echo "
$error_message"; + } + } + ?> + 0): ?> + +
+
+
+

+ comment_encuadernacion ?> +

+
+
+ + +
+ +
+
+
LOGISTICA
+
+ + + + + + + + + + + +
Peso UnidadPeso PedidoCorte Pie
gr 1000 ? number_format($peso_unidad / 1000, 2, ',', '.') . " kg" : number_format($peso_unidad, 2, ',', '.') . " gr" ?> -
+
+
+ +
+

+ comment_logistica ?> +

+
+
+
+
+
+ © 2024 SAFEKAT. Todos los derechos reservados. +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/httpdocs/assets/js/safekat/pages/pdf/otDownload.js b/httpdocs/assets/js/safekat/pages/pdf/otDownload.js index 1e80622d..da577046 100644 --- a/httpdocs/assets/js/safekat/pages/pdf/otDownload.js +++ b/httpdocs/assets/js/safekat/pages/pdf/otDownload.js @@ -1,11 +1,11 @@ $(() => { - // var opt = { - // margin: 2, - // filename: "PDF_OrdenTrabajo_" + $(".pdf-wrapper").data("id") + ".pdf", - // image: { type: 'jpeg', quality: 1 }, - // html2canvas: { scale: 4 }, - // jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' } - // }; - // let elementToPdf = $('body')[0] - // html2pdf().set(opt).from(elementToPdf).save() + var opt = { + margin: 2, + filename: $(".pdf-wrapper").data("id") + ".pdf", + image: { type: 'jpeg', quality: 1 }, + html2canvas: { scale: 4 }, + jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' } + }; + let elementToPdf = $('body')[0] + html2pdf().set(opt).from(elementToPdf).save() }) \ No newline at end of file diff --git a/httpdocs/assets/js/safekat/pages/produccion/ot.js b/httpdocs/assets/js/safekat/pages/produccion/ot.js index 0f1702f1..c6ec547f 100644 --- a/httpdocs/assets/js/safekat/pages/produccion/ot.js +++ b/httpdocs/assets/js/safekat/pages/produccion/ot.js @@ -153,7 +153,7 @@ class OrdenTrabajo { this.item.on("click", "#btn-reset-tareas", this.handleResetTareasDeleteConfirmation.bind(this)) this.otForm.on("click", ".ot-tarea-comment", this.handleNoteTarea.bind(this)) $("#btn-update-tarea-comment").on("click", this.handleTareaNoteSubmit.bind(this)) - this.otForm.on("change", "#ot-comment", this.handleOtComment.bind(this)) + this.otForm.on("change", ".ot-comment", this.handleOtComment.bind(this)) $("#btn-update-pliegos").on('click', this.handleUpdatePliegos.bind(this)) this._handleGetData() @@ -485,17 +485,18 @@ class OrdenTrabajo { } handleTareaChangeError(error) { } handleOtComment(event) { + let name = $(event.currentTarget).attr("name") + let data = { + "orden_trabajo_id": this.modelId, + "name": name, + } + data[name] = $(event.currentTarget).val() const ajax = new Ajax( "/produccion/ordentrabajo/update", - { - "orden_trabajo_id": this.modelId, - "name": $(event.currentTarget).attr("name"), - "comentarios": $(event.currentTarget).val() - }, + data, null, (response) => { - this._handleGetData(); alertSuccess(response.message).fire() }, null diff --git a/httpdocs/themes/vuexy/css/pdf.ot.css b/httpdocs/themes/vuexy/css/pdf.ot.css index f7da222a..1a4dd39a 100644 --- a/httpdocs/themes/vuexy/css/pdf.ot.css +++ b/httpdocs/themes/vuexy/css/pdf.ot.css @@ -18,7 +18,7 @@ html { width: 210mm; height: 297mm; max-width: 210mm; - font-size: 11px; + font-size: 8px; max-height: 297mm; background-color: white; } @@ -91,7 +91,7 @@ body { } .section-title { font-weight: bold; - margin-bottom: 10px; + margin-bottom: 4px; } .cubierta { color: #007bff; @@ -105,31 +105,29 @@ body { .comments { color: #555; font-style: italic; + font-size : 12px; margin-top: 0.2rem; } .comment-content { - line-height: 0; width: 100%; - height: 50px; - border: solid; - border-width: 1px; + margin-left : 0.2rem; + font-style: normal; + color : black; + font-size: 10px; } table { width: 100%; - margin-bottom: 5px; + margin-bottom: 2px; font-size: 10px; } - +th, td { + border: 0.01px solid black; +} table td { text-align: center; } -table, -th, -td { - border: 0.1px solid rgb(0, 0, 0); - border-collapse: collapse; -} + table th { font-weight: bold; @@ -139,11 +137,7 @@ table th { table td { font-weight: bold; } -.comments { - color: #555; - font-style: italic; - margin-top: 0.2rem; -} + .t-header { color: black; width: 25%;