mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'add/view_logistica_principal' of https://git.imnavajas.es/jjimenez/safekat into add/view_logistica_principal
This commit is contained in:
@ -74,7 +74,7 @@ class OrdenTrabajoEntity extends Entity
|
|||||||
$m = model(OrdenTrabajoTarea::class);
|
$m = model(OrdenTrabajoTarea::class);
|
||||||
return $m->where("orden_trabajo_id", $this->attributes["id"])->findAll();
|
return $m->where("orden_trabajo_id", $this->attributes["id"])->findAll();
|
||||||
}
|
}
|
||||||
public function tareas_impresion() : array
|
public function tareas_impresion(): array
|
||||||
{
|
{
|
||||||
$m = model(OrdenTrabajoTarea::class);
|
$m = model(OrdenTrabajoTarea::class);
|
||||||
return $m->where("orden_trabajo_id", $this->attributes["id"])->where("presupuesto_linea_id IS NOT NULL", NULL, FALSE)->findAll() ?? [];
|
return $m->where("orden_trabajo_id", $this->attributes["id"])->where("presupuesto_linea_id IS NOT NULL", NULL, FALSE)->findAll() ?? [];
|
||||||
@ -144,11 +144,13 @@ class OrdenTrabajoEntity extends Entity
|
|||||||
helper('filesystem');
|
helper('filesystem');
|
||||||
$path = WRITEPATH . 'uploads/' . $this->attributes["portada_path"];
|
$path = WRITEPATH . 'uploads/' . $this->attributes["portada_path"];
|
||||||
$portada_path = null;
|
$portada_path = null;
|
||||||
if ($path) {
|
if ($this->attributes["portada_path"]) {
|
||||||
if (file_exists($path)) {
|
if ($path) {
|
||||||
$portada_path = $path;
|
if (file_exists($path)) {
|
||||||
} else {
|
$portada_path = $path;
|
||||||
$portada_path = null;
|
} else {
|
||||||
|
$portada_path = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $portada_path;
|
return $portada_path;
|
||||||
|
|||||||
@ -32,6 +32,8 @@ class OrdenTrabajoUserEntity extends Entity
|
|||||||
"retractilado5_user_id" => null,
|
"retractilado5_user_id" => null,
|
||||||
"prototipo_user_id" => null,
|
"prototipo_user_id" => null,
|
||||||
"marcapaginas_user_id" => null,
|
"marcapaginas_user_id" => null,
|
||||||
|
"espiral_user_id" => null,
|
||||||
|
|
||||||
//FERRO
|
//FERRO
|
||||||
"pendiente_ferro_user_id" => null,
|
"pendiente_ferro_user_id" => null,
|
||||||
"ferro_en_cliente_user_id" => null,
|
"ferro_en_cliente_user_id" => null,
|
||||||
|
|||||||
@ -36,6 +36,7 @@ class OrdenTrabajoUser extends Model
|
|||||||
"retractilado5_user_id",
|
"retractilado5_user_id",
|
||||||
"prototipo_user_id",
|
"prototipo_user_id",
|
||||||
"marcapaginas_user_id",
|
"marcapaginas_user_id",
|
||||||
|
"espiral_user_id",
|
||||||
//FERRO
|
//FERRO
|
||||||
"pendiente_ferro_user_id",
|
"pendiente_ferro_user_id",
|
||||||
"ferro_en_cliente_user_id",
|
"ferro_en_cliente_user_id",
|
||||||
|
|||||||
@ -188,6 +188,7 @@ class ProductionService extends BaseService
|
|||||||
$this->setPedido($pedido);
|
$this->setPedido($pedido);
|
||||||
$this->defaultMaquinaCorte = $this->maquinaModel->where('nombre', $this->defaultMaquinaCorteName)->first();
|
$this->defaultMaquinaCorte = $this->maquinaModel->where('nombre', $this->defaultMaquinaCorteName)->first();
|
||||||
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["sin_imprimir"];
|
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["sin_imprimir"];
|
||||||
|
$this->updateProgress();
|
||||||
return $this;
|
return $this;
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
throw $th;
|
throw $th;
|
||||||
@ -305,6 +306,7 @@ class ProductionService extends BaseService
|
|||||||
$status = false;
|
$status = false;
|
||||||
if ($this->otDate->where('orden_trabajo_id', $this->ot->id)->countAllResults() == 0) {
|
if ($this->otDate->where('orden_trabajo_id', $this->ot->id)->countAllResults() == 0) {
|
||||||
$status = $this->storeOrdenTrabajoDates();
|
$status = $this->storeOrdenTrabajoDates();
|
||||||
|
$this->resetAllTareas();
|
||||||
}
|
}
|
||||||
return $status;
|
return $status;
|
||||||
}
|
}
|
||||||
@ -1266,7 +1268,7 @@ class ProductionService extends BaseService
|
|||||||
}
|
}
|
||||||
return $pedidoUserDates;
|
return $pedidoUserDates;
|
||||||
}
|
}
|
||||||
public function getTiempoProcesamientoHHMM(): string
|
public function getTiempoProcesamientoHHMM(): ?string
|
||||||
{
|
{
|
||||||
$time_tareas_seconds = array_map(fn($q) => $q->tiempo_estimado ?? 0, $this->ot->tareas());
|
$time_tareas_seconds = array_map(fn($q) => $q->tiempo_estimado ?? 0, $this->ot->tareas());
|
||||||
$seconds = array_sum($time_tareas_seconds);
|
$seconds = array_sum($time_tareas_seconds);
|
||||||
@ -1303,15 +1305,18 @@ class ProductionService extends BaseService
|
|||||||
$status = false;
|
$status = false;
|
||||||
$total = count($userDates) + count($pedidoUserDates);
|
$total = count($userDates) + count($pedidoUserDates);
|
||||||
if ($this->ot->estado != "F") {
|
if ($this->ot->estado != "F") {
|
||||||
foreach ($userDates as $key => $value) {
|
if ($this->ot->dates()) {
|
||||||
if ($this->ot->dates()->{$key} != null) $fill_dates++;
|
|
||||||
}
|
|
||||||
foreach ($pedidoUserDates as $key => $value) {
|
|
||||||
if ($this->pedido->{$key} != null) $fill_dates++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$progreso = (float) $fill_dates / $total * 100;
|
foreach ($userDates as $key => $value) {
|
||||||
$status = $this->otModel->update($this->ot->id, ["progreso" => round($progreso, 2)]);
|
if ($this->ot->dates()->{$key} != null) $fill_dates++;
|
||||||
|
}
|
||||||
|
foreach ($pedidoUserDates as $key => $value) {
|
||||||
|
if ($this->pedido->{$key} != null) $fill_dates++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$progreso = (float) $fill_dates / $total * 100;
|
||||||
|
$status = $this->otModel->update($this->ot->id, ["progreso" => round($progreso, 2)]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$status = $this->otModel->update($this->ot->id, ["progreso" => 100]);
|
$status = $this->otModel->update($this->ot->id, ["progreso" => 100]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<span class="switch-label">Revisar formato</span>
|
<span class="switch-label">Revisar formato</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="switch switch-md">
|
<label class="switch switch-md">
|
||||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_lomo" />
|
<input type="checkbox" class="switch-input ot-preview" name="revisar_lomo" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||||
<span class="switch-toggle-slider">
|
<span class="switch-toggle-slider">
|
||||||
<span class="switch-on">
|
<span class="switch-on">
|
||||||
<i class="ti ti-check"></i>
|
<i class="ti ti-check"></i>
|
||||||
|
|||||||
@ -1,356 +0,0 @@
|
|||||||
<?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">
|
|
||||||
© 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>
|
|
||||||
@ -33,7 +33,7 @@ $settings = $session->get('settings');
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="col-md-12" data-id=<?= $ot->id ?>>
|
<div class="col-md-12 pdf-wrapper" data-id="<?= $ot->id."_"."_".$presupuesto->id."_".$presupuesto->titulo ?>">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 d-flex justify-content-between align-items-center">
|
<div class="col-12 d-flex justify-content-between align-items-center">
|
||||||
<h5><?= $presupuesto->titulo ?></h5>
|
<h5><?= $presupuesto->titulo ?></h5>
|
||||||
@ -44,7 +44,13 @@ $settings = $session->get('settings');
|
|||||||
</div>
|
</div>
|
||||||
<div class="row mb-2 d-flex flex align-items-stretch">
|
<div class="row mb-2 d-flex flex align-items-stretch">
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<img class="portada-img border-secondary img-thumbnail img-fluid" src="<?= $ot->portada_path ? "data:image/png;base64," . base64_encode(file_get_contents(WRITEPATH . "uploads/" . $ot->portada_path)) : '/assets/img/portada_not_found.png' ?>" />
|
<?php if ($ot->full_path): ?>
|
||||||
|
<img class="portada-img border-secondary img-thumbnail img-fluid" src="<?= $ot->full_path ? "data:image/png;base64," . base64_encode(file_get_contents($ot->full_path)) : '/assets/img/portada_not_found.png' ?>" />
|
||||||
|
<?php else: ?>
|
||||||
|
<img class="portada-img border-secondary img-thumbnail img-fluid" src="/assets/img/portada_not_found.png" />
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-10 py-2 rounded border-1 border-secondary" style="background-color: <?= $colors["general"]["bg"] ?>;color:<?= $colors["general"]["color"] ?>;">
|
<div class="col-10 py-2 rounded border-1 border-secondary" style="background-color: <?= $colors["general"]["bg"] ?>;color:<?= $colors["general"]["color"] ?>;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -58,7 +64,7 @@ $settings = $session->get('settings');
|
|||||||
<div class="px-2 d-flex flex justify-content-center align-items-center w-100">
|
<div class="px-2 d-flex flex justify-content-center align-items-center w-100">
|
||||||
<span class="w-100 text-center" style="background-color: <?= $colors["impresion_interior_ppal"]["bg"] ?>;color:<?= $colors["impresion_interior_ppal"]["color"] ?>;">
|
<span class="w-100 text-center" style="background-color: <?= $colors["impresion_interior_ppal"]["bg"] ?>;color:<?= $colors["impresion_interior_ppal"]["color"] ?>;">
|
||||||
<?php if ($isPOD): ?>
|
<?php if ($isPOD): ?>
|
||||||
<strong>ROTATIVA</strong>
|
<strong>POD</strong>
|
||||||
<?php elseif ($presupuesto->presupuestoLineaImpresion()->isRotativa()): ?>
|
<?php elseif ($presupuesto->presupuestoLineaImpresion()->isRotativa()): ?>
|
||||||
<strong>ROTATIVA</strong>
|
<strong>ROTATIVA</strong>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
@ -241,8 +247,8 @@ $settings = $session->get('settings');
|
|||||||
<th>Tiempo</th>
|
<th>Tiempo</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $presupuesto->paginas ?></td>
|
<td><?= $presupuesto->paginas * $presupuesto->tirada ?></td>
|
||||||
<td><?= $presupuesto->tirada ?> </td>
|
<td><?= $presupuesto->tirada ?> </td>
|
||||||
<td>??</td>
|
<td>??</td>
|
||||||
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
|
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
|
||||||
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
|
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
|
||||||
@ -252,7 +258,11 @@ $settings = $session->get('settings');
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"><?= $linea_impresion->papel_impresion ?></td>
|
<td colspan="4"><?= $linea_impresion->papel_impresion ?></td>
|
||||||
<td><?= $linea_impresion->papel_impresion()->gramaje . " " . "gr" ?></td>
|
<td><?= $linea_impresion->papel_impresion()->gramaje . " " . "gr" ?></td>
|
||||||
<td colspan="2"><?= number_format($linea_impresion->rotativa_metros_total, 2, ',', '.') ?> metros</td>
|
<td colspan="2">
|
||||||
|
<?php if ($linea_impresion->isRotativa()): ?>
|
||||||
|
<?= number_format($linea_impresion->rotativa_metros_total, 2, ',', '.') ?> metros
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -16,6 +16,9 @@ class OrdenTrabajo {
|
|||||||
this.tareaCommentModal = new Modal($("#modalCommentTarea"))
|
this.tareaCommentModal = new Modal($("#modalCommentTarea"))
|
||||||
this.alertOrdenTrabajo = this.item.find("#alert-orden-trabajo");
|
this.alertOrdenTrabajo = this.item.find("#alert-orden-trabajo");
|
||||||
this.btnFinalizarPedido = this.item.find("#btn-finalizar-orden-pedido")
|
this.btnFinalizarPedido = this.item.find("#btn-finalizar-orden-pedido")
|
||||||
|
this.btnReactivarOt = this.item.find("#btn-reactivar-orden-pedido")
|
||||||
|
this.isOtFinalizada = false;
|
||||||
|
|
||||||
this.btnResetTareas = this.item.find("#btn-reset-tareas")
|
this.btnResetTareas = this.item.find("#btn-reset-tareas")
|
||||||
this.pedidoEnEsperaCheck = this.item.find("#ot-pedido-espera");
|
this.pedidoEnEsperaCheck = this.item.find("#ot-pedido-espera");
|
||||||
this.pedidoEnEsperaBy = this.item.find("#pedido_espera_by");
|
this.pedidoEnEsperaBy = this.item.find("#pedido_espera_by");
|
||||||
@ -140,6 +143,8 @@ class OrdenTrabajo {
|
|||||||
this.otForm.on("click", "#btn-upload-portada", this.handleUploadPortada.bind(this))
|
this.otForm.on("click", "#btn-upload-portada", this.handleUploadPortada.bind(this))
|
||||||
this.otForm.on("click", "#btn-delete-portada", this.handleDeletePortada.bind(this))
|
this.otForm.on("click", "#btn-delete-portada", this.handleDeletePortada.bind(this))
|
||||||
this.btnFinalizarPedido.on("click", this.handleFinalizarPedido.bind(this))
|
this.btnFinalizarPedido.on("click", this.handleFinalizarPedido.bind(this))
|
||||||
|
this.btnReactivarOt.on("click", this.handleReactivarPedido.bind(this))
|
||||||
|
|
||||||
this.tareasTableItem.on("click", ".ot-tarea-btn-delete", this.handleTareaDeleteConfirmation.bind(this))
|
this.tareasTableItem.on("click", ".ot-tarea-btn-delete", this.handleTareaDeleteConfirmation.bind(this))
|
||||||
this.item.on("click", "#btn-reset-tareas", this.handleResetTareasDeleteConfirmation.bind(this))
|
this.item.on("click", "#btn-reset-tareas", this.handleResetTareasDeleteConfirmation.bind(this))
|
||||||
this.otForm.on("click", ".ot-tarea-comment", this.handleNoteTarea.bind(this))
|
this.otForm.on("click", ".ot-tarea-comment", this.handleNoteTarea.bind(this))
|
||||||
@ -190,14 +195,14 @@ class OrdenTrabajo {
|
|||||||
}
|
}
|
||||||
_renderMaquinaSelectTable(d, t) {
|
_renderMaquinaSelectTable(d, t) {
|
||||||
this.tareasId.push(d.id)
|
this.tareasId.push(d.id)
|
||||||
return `<select id="select-maquina-tarea-${d.id}" data-maquina-id="${d.maquina_id}" data-id="${d.id}" name="maquina_id" class="select2 form-select select-maquina-tarea-datatable ${d.maquina_id ? '' : 'is-invalid'}">
|
return `<select id="select-maquina-tarea-${d.id}" data-maquina-id="${d.maquina_id}" data-id="${d.id}" name="maquina_id" class="select2 form-select select-maquina-tarea-datatable ${d.maquina_id ? '' : 'is-invalid'}" ${this.isOtFinalizada ? "disabled" : ""}>
|
||||||
<option value="${d.maquina_id}" selected="selected">${d.maquina_name ?? ''}</option>
|
<option value="${d.maquina_id}" selected="selected">${d.maquina_name ?? ''}</option>
|
||||||
</select>`
|
</select>`
|
||||||
|
|
||||||
}
|
}
|
||||||
_renderImposicionSelectTable(d, t) {
|
_renderImposicionSelectTable(d, t) {
|
||||||
|
|
||||||
let render = `<select id="select-imposicion-tarea-${d.id}" data-imposicion-id="${d.imposicion_id}" data-id="${d.id}" name="imposicion_id" class="select2 form-select select-imposicion-tarea-datatable ${d.imposicion_id ? '' : 'is-invalid'}">
|
let render = `<select id="select-imposicion-tarea-${d.id}" data-imposicion-id="${d.imposicion_id}" data-id="${d.id}" name="imposicion_id" class="select2 form-select select-imposicion-tarea-datatable ${d.imposicion_id ? '' : 'is-invalid'}" ${this.isOtFinalizada ? "disabled" : ""}>
|
||||||
<option value="${d.imposicion_id}" selected="selected">${d.name ?? ''}</option>
|
<option value="${d.imposicion_id}" selected="selected">${d.name ?? ''}</option>
|
||||||
</select>`
|
</select>`
|
||||||
return render
|
return render
|
||||||
@ -206,8 +211,10 @@ class OrdenTrabajo {
|
|||||||
_renderActionCell(d, t) {
|
_renderActionCell(d, t) {
|
||||||
|
|
||||||
let cell = `<div class="d-flex justify-content-start align-items-center gap-1">
|
let cell = `<div class="d-flex justify-content-start align-items-center gap-1">
|
||||||
<a type="button" class="btn btn-xs ot-tarea-comment" data-id="${d.id}"><i class="ti ti-${d.comment ? "message" : "note"} ti-sm mx-2"></i></a>
|
<a type="button" class="btn btn-xs ot-tarea-comment" data-id="${d.id}">
|
||||||
<a type="button" class="btn btn-xs ot-tarea-btn-delete" data-id="${d.id}"><i class="ti ti-trash ti-sm mx-2"></i></a>
|
<i class="ti ti-${d.comment ? "message" : "note"} ti-sm mx-2"></i>
|
||||||
|
</a>
|
||||||
|
<a type="button" class="btn btn-xs ot-tarea-btn-delete" data-id="${d.id}"><i class="ti ti-trash ti-sm mx-2 ${this.isOtFinalizada ? "d-none" : ""}" ></i></a>
|
||||||
</div>`
|
</div>`
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
@ -215,7 +222,7 @@ class OrdenTrabajo {
|
|||||||
|
|
||||||
return `
|
return `
|
||||||
<div class="d-flex justify-content-between aling-items-center gap-2 orden-tarea-cell">
|
<div class="d-flex justify-content-between aling-items-center gap-2 orden-tarea-cell">
|
||||||
<input type="text" style="min-width:5rem" data-id="${d.id}" class="form-control form-control-sm orden-tarea mr-2" name="orden" value="${d.orden}">
|
<input type="text" style="min-width:5rem" data-id="${d.id}" class="form-control form-control-sm orden-tarea mr-2" name="orden" value="${d.orden}" ${this.isOtFinalizada ? "disabled" : ""}>
|
||||||
<div class="btn-group-vertical">
|
<div class="btn-group-vertical">
|
||||||
<button type="button" class="btn btn-primary btn-outlined btn-xs increase-order"><i class="ti ti-chevron-up ti-xs"></i></button>
|
<button type="button" class="btn btn-primary btn-outlined btn-xs increase-order"><i class="ti ti-chevron-up ti-xs"></i></button>
|
||||||
<button type="button" class="btn btn-primary btn-xs decrease-order" data-id="${d.id}"><i class="ti ti-chevron-down ti-xs"></i></button>
|
<button type="button" class="btn btn-primary btn-xs decrease-order" data-id="${d.id}"><i class="ti ti-chevron-down ti-xs"></i></button>
|
||||||
@ -351,6 +358,7 @@ class OrdenTrabajo {
|
|||||||
this.fillOtDetails()
|
this.fillOtDetails()
|
||||||
this.fillOtDates()
|
this.fillOtDates()
|
||||||
this.fillPreimpresionReview()
|
this.fillPreimpresionReview()
|
||||||
|
this.isOtFinalizada = this.summaryData.ot.estado == "F";
|
||||||
this.datatableTareas.ajax.reload()
|
this.datatableTareas.ajax.reload()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
@ -649,7 +657,7 @@ class OrdenTrabajo {
|
|||||||
this.handleEstadoChangeSuccess.bind(this),
|
this.handleEstadoChangeSuccess.bind(this),
|
||||||
this.handleEstadoChangeError.bind(this)
|
this.handleEstadoChangeError.bind(this)
|
||||||
);
|
);
|
||||||
alertConfirmAction("Esta acción marcará la orden de trabjao como FINALIZADA")
|
alertConfirmAction("Esta acción marcará la orden de trabajo como FINALIZADA")
|
||||||
.then(result => {
|
.then(result => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
ajax.post()
|
ajax.post()
|
||||||
@ -660,8 +668,28 @@ class OrdenTrabajo {
|
|||||||
popSuccessAlert(response.message)
|
popSuccessAlert(response.message)
|
||||||
this.alertOrdenTrabajo.removeClass("alert-info").addClass("alert-success")
|
this.alertOrdenTrabajo.removeClass("alert-info").addClass("alert-success")
|
||||||
this.btnFinalizarPedido.prop("disabled", true);
|
this.btnFinalizarPedido.prop("disabled", true);
|
||||||
|
window.location.reload();
|
||||||
}
|
}
|
||||||
handleEstadoChangeError() { }
|
handleEstadoChangeError() { }
|
||||||
|
handleReactivarPedido() {
|
||||||
|
const ajax = new Ajax(
|
||||||
|
"/produccion/ordentrabajo/update",
|
||||||
|
{
|
||||||
|
orden_trabajo_id: this.modelId,
|
||||||
|
estado: 'I'
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
this.handleEstadoChangeSuccess.bind(this),
|
||||||
|
this.handleEstadoChangeError.bind(this)
|
||||||
|
);
|
||||||
|
alertConfirmAction("Esta acción reactivará la orden de trabajo.")
|
||||||
|
.then(result => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
ajax.post()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
handleTareaDeleteConfirmation(event) {
|
handleTareaDeleteConfirmation(event) {
|
||||||
const orden_tarea_id = $(event.currentTarget).data("id")
|
const orden_tarea_id = $(event.currentTarget).data("id")
|
||||||
alertConfirmationDelete("¿Estás seguro de realizar esta acción?")
|
alertConfirmationDelete("¿Estás seguro de realizar esta acción?")
|
||||||
|
|||||||
@ -173,10 +173,11 @@ table td{
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.cmyk{
|
.cmyk{
|
||||||
background-image: url('/themes/vuexy/img/safekat/presupuestos/cmyk.png')
|
background-image: url('/themes/vuexy/img/safekat/presupuestos/cmyk.png');
|
||||||
background-size: 110px;
|
background-size: 110px;
|
||||||
text-shadow: 0px 0px 1px black;
|
color : white;
|
||||||
stroke:black;
|
text-shadow: 0px 0px 2px black;
|
||||||
|
stroke:white;
|
||||||
}
|
}
|
||||||
.bn{
|
.bn{
|
||||||
background : black;
|
background : black;
|
||||||
|
|||||||
Reference in New Issue
Block a user