From 8c64b678fe5a8434bfe652ada622a284093cf433 Mon Sep 17 00:00:00 2001 From: amazuecos Date: Sat, 29 Mar 2025 11:07:36 +0100 Subject: [PATCH] planning plana --- ci4/app/Config/RBAC/permissionMatrix.php | 2 + ci4/app/Config/Routes.php | 3 + .../Controllers/Produccion/Ordentrabajo.php | 22 +- .../Presupuestos/PresupuestoLineaEntity.php | 4 + ci4/app/Language/es/App.php | 2 + ci4/app/Language/es/Produccion.php | 7 +- .../Models/OrdenTrabajo/OrdenTrabajoDate.php | 10 +- .../Maquinas/TarifaExtraMaquinaModel.php | 2 +- ci4/app/Services/ChatService.php | 2 +- ci4/app/Services/ProductionService.php | 128 ++++++++- .../tables/planning_papel_gramaje_table.php | 2 +- .../tables/planning_papel_pliego_table.php | 29 ++ .../tables/planning_plana_table.php | 43 +++ .../components/tables/planning_rot_table.php | 16 +- .../vuexy/form/produccion/ot/otCosts.php | 5 +- .../vuexy/form/produccion/ot/otDates.php | 5 +- .../vuexy/form/produccion/ot/otDetails.php | 94 +++++-- .../vuexy/form/produccion/ot/otHeader.php | 45 ++++ .../vuexy/form/produccion/ot/otPortada.php | 6 +- .../vuexy/form/produccion/ot/otProgress.php | 5 +- .../vuexy/form/produccion/ot/otTask.php | 5 +- .../produccion/ot/viewPlanningRotativa.php | 64 ++++- .../form/produccion/viewOrdenTrabajoEdit.php | 73 +----- .../vuexy/main/menus/produccion_menu.php | 2 +- httpdocs/assets/img/cortadora_bobinas.png | Bin 0 -> 9888 bytes httpdocs/assets/img/guillotina.png | Bin 0 -> 10150 bytes .../assets/js/safekat/pages/produccion/ot.js | 40 +-- .../planning_rotativa/planning_rotativa.js | 248 ++++++++++++++---- 28 files changed, 655 insertions(+), 209 deletions(-) create mode 100644 ci4/app/Views/themes/vuexy/components/tables/planning_papel_pliego_table.php create mode 100644 ci4/app/Views/themes/vuexy/components/tables/planning_plana_table.php create mode 100644 ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php create mode 100644 httpdocs/assets/img/cortadora_bobinas.png create mode 100644 httpdocs/assets/img/guillotina.png diff --git a/ci4/app/Config/RBAC/permissionMatrix.php b/ci4/app/Config/RBAC/permissionMatrix.php index e0b0fec1..c60bd757 100644 --- a/ci4/app/Config/RBAC/permissionMatrix.php +++ b/ci4/app/Config/RBAC/permissionMatrix.php @@ -194,6 +194,8 @@ const SK_PERMISSION_MATRIX = [ "pedidos-cancelados.menu", "pedidos-todos.view", "pedidos-todos.menu", + "pedidos-gestion.toprod", + "pedidos-gestion.menu", "tarifa-preimpresion.create", "tarifa-preimpresion.edit", "tarifa-preimpresion.menu", diff --git a/ci4/app/Config/Routes.php b/ci4/app/Config/Routes.php index a894926d..f0336fbe 100644 --- a/ci4/app/Config/Routes.php +++ b/ci4/app/Config/Routes.php @@ -1001,7 +1001,10 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func $routes->group('planning', ['namespace' => 'App\Controllers\Produccion'], function ($routes) { $routes->get('rotativa', 'Ordentrabajo::index_planning_rotativa'); $routes->get('papel/datatable', 'Ordentrabajo::papel_gramaje_datatable'); + $routes->get('papel/plana/datatable', 'Ordentrabajo::papel_pliego_datatable'); $routes->get('rotativa/datatable', 'Ordentrabajo::planning_rotativa_datatable'); + $routes->get('plana/datatable', 'Ordentrabajo::planning_plana_datatable'); + }); }); }); diff --git a/ci4/app/Controllers/Produccion/Ordentrabajo.php b/ci4/app/Controllers/Produccion/Ordentrabajo.php index 6834ecf0..cfb354c7 100755 --- a/ci4/app/Controllers/Produccion/Ordentrabajo.php +++ b/ci4/app/Controllers/Produccion/Ordentrabajo.php @@ -193,8 +193,16 @@ class Ordentrabajo extends BaseController $q = $this->produccionService->papelGramajeDatatableQuery(); return DataTable::of($q) - ->edit("tiempoReal", fn($q) => float_seconds_to_hhmm_string($q->tiempoReal * 3600)) - ->add("metros", fn($q) => $q->papel_ancho*$q->totalTirada/1000) + ->edit("tiempoReal", fn($q) => $q->tiempoReal * 3600) + ->add("action", fn($q) => ["title" => lang('Produccion.datatable.filter_by_task'), 'data' => $q]) + ->toJson(true); + } + public function papel_pliego_datatable() + { + + $q = $this->produccionService->papelPliegoDatatableQuery(); + return DataTable::of($q) + ->edit("tiempoReal", fn($q) => $q->tiempoReal * 3600) ->add("action", fn($q) => ["title" => lang('Produccion.datatable.filter_by_task'), 'data' => $q]) ->toJson(true); } @@ -266,9 +274,17 @@ class Ordentrabajo extends BaseController ->edit("fecha_entrega_real_at", fn($q) => $q->fecha_entrega_real_at ? Time::createFromFormat("Y-m-d", $q->fecha_entrega_real_at)->format("d/m/Y") : "") ->add("metros_check", fn($q) => $q->otId) ->add("corte", fn($q) => $q->otId) - ->add("metros", fn($q) => $q->papel_ancho*$q->ot_tirada/1000) ->add("action", fn($q) => $q) ->toJson(true); } + public function planning_plana_datatable() + { + $q = $this->produccionService->planningPlanaQueryDatatable(); + return DataTable::of($q) + ->edit("fecha_entrega_real_at", fn($q) => $q->fecha_entrega_real_at ? Time::createFromFormat("Y-m-d", $q->fecha_entrega_real_at)->format("d/m/Y") : "") + ->add("pliegos_check", fn($q) => $q->otId) + ->add("action", fn($q) => $q) + ->toJson(true); + } } diff --git a/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php index f0705d98..247a12ec 100755 --- a/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php +++ b/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php @@ -221,4 +221,8 @@ class PresupuestoLineaEntity extends \CodeIgniter\Entity\Entity return $nombre; } + public function isRotativa() : bool + { + return in_array($this->attributes['tipo'],['lp_rot_color','lp_rot_bn']); + } } diff --git a/ci4/app/Language/es/App.php b/ci4/app/Language/es/App.php index db627a10..d1875d70 100755 --- a/ci4/app/Language/es/App.php +++ b/ci4/app/Language/es/App.php @@ -791,6 +791,8 @@ return [ "menu_orden_trabajo_finalizados" => "OTs finalizados", "menu_orden_trabajo_pendientes" => "OTs pendientes", "menu_planning_rotativa" => "Planning rotativa", + "menu_planning" => "Plannings", + "menu_ordentrabajomaquetacion" => "Orden de trabajo maquetación", "menu_ordenmaquina" => "Orden máquina", diff --git a/ci4/app/Language/es/Produccion.php b/ci4/app/Language/es/Produccion.php index fdceace1..da69474a 100644 --- a/ci4/app/Language/es/Produccion.php +++ b/ci4/app/Language/es/Produccion.php @@ -25,7 +25,9 @@ return [ "logo" => "Logo impresion", "filter_by_task" => "Filtrar por tarea", "metros" => "Metros", - "corte" => "Corte" + "corte" => "Corte", + "pliegos" => "Pliegos", + "pliegos_libro" => "Pliegos" ], @@ -71,7 +73,8 @@ return [ "preview_pdf" => "Previsualizar PDF", "imprimir_codigo_safekat" => "Imprimir código SAFEKAT", "imprimir_ferro" => "Imprimir ferro", - "planning_rotativa" => "Tareas rotativa", + "planning_rotativa" => "Planificación rotativa", + "planning_plana" => "Planificación plana", "solapa" => "Solapa", "papel_gramajes" => "Papel y gramajes" diff --git a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoDate.php b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoDate.php index bd7ff3a0..d6a7d7c1 100644 --- a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoDate.php +++ b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoDate.php @@ -61,9 +61,9 @@ class OrdenTrabajoDate extends Model // Callbacks protected $allowCallbacks = true; protected $beforeInsert = []; - protected $afterInsert = ["updateOrdenTrabajoUser"]; + protected $afterInsert = []; protected $beforeUpdate = []; - protected $afterUpdate = ["updateOrdenTrabajoUser"]; + protected $afterUpdate = []; protected $beforeFind = []; protected $afterFind = []; protected $beforeDelete = []; @@ -102,7 +102,7 @@ class OrdenTrabajoDate extends Model } return $data; } - protected function updateUserDateMap($data,$values){ + public function updateUserDateMap($orden_trabajo_id,$data){ $mapping = [ "fecha_encuadernado_at" => "encuadernacion_user_id", // "fecha_externo_at" => "null", @@ -121,10 +121,10 @@ class OrdenTrabajoDate extends Model ]; $otUser = model(OrdenTrabajoUser::class); $auth_user_id = auth()->user()->id; - foreach ($values as $key => $value) { + foreach ($data as $key => $value) { if(isset($mapping[$key])){ if($value){ - $otUser->where('orden_trabajo_id',$data['orden_trabajo_id']) + $otUser->where('orden_trabajo_id',$orden_trabajo_id) ->set([$mapping[$key] => $auth_user_id]) ->update(); } diff --git a/ci4/app/Models/Tarifas/Maquinas/TarifaExtraMaquinaModel.php b/ci4/app/Models/Tarifas/Maquinas/TarifaExtraMaquinaModel.php index 1ee4be1e..8cb8d36d 100644 --- a/ci4/app/Models/Tarifas/Maquinas/TarifaExtraMaquinaModel.php +++ b/ci4/app/Models/Tarifas/Maquinas/TarifaExtraMaquinaModel.php @@ -9,7 +9,7 @@ use CodeIgniter\Model; class TarifaExtraMaquinaModel extends Model { - protected $table = 'tarifa_acabado_maquinas'; + protected $table = 'tarifa_extra_maquinas'; protected $primaryKey = 'id'; protected $useAutoIncrement = true; protected $returnType = TarifaExtraMaquinaEntity::class; diff --git a/ci4/app/Services/ChatService.php b/ci4/app/Services/ChatService.php index 97d88a65..4a91bf92 100644 --- a/ci4/app/Services/ChatService.php +++ b/ci4/app/Services/ChatService.php @@ -22,7 +22,7 @@ use CodeIgniter\Email\Email; class ChatService extends BaseService { protected ?ChatEntity $chatEntity; - protected Email $emailService; + protected EmailService $emailService; protected UserModel $userModel; protected ChatModel $chatModel; protected ChatMessageModel $chatMessageModel; diff --git a/ci4/app/Services/ProductionService.php b/ci4/app/Services/ProductionService.php index 70b5b11f..6f9ea0c6 100644 --- a/ci4/app/Services/ProductionService.php +++ b/ci4/app/Services/ProductionService.php @@ -13,10 +13,14 @@ use App\Models\OrdenTrabajo\OrdenTrabajoTarea; use App\Models\OrdenTrabajo\OrdenTrabajoUser; use App\Models\Usuarios\UserModel; use CodeIgniter\Config\BaseService; +use App\Entities\Configuracion\Maquina as MaquinaEntity; +use App\Entities\Produccion\OrdenTrabajoTareaEntity; +use App\Models\Configuracion\MaquinaModel; use CodeIgniter\Database\BaseBuilder; use CodeIgniter\Database\BaseResult; use CodeIgniter\Database\Exceptions\DatabaseException; use CodeIgniter\I18n\Time; +use CodeIgniter\Model; use Dompdf\Dompdf; /** @@ -24,12 +28,19 @@ use Dompdf\Dompdf; */ class ProductionService extends BaseService { + public array $TIPOS_PLANA = ['lp_bn','lp_color','lp_colorhq']; + public array $TIPOS_ROTATIVA = ['lp_rot_bn','lp_rot_color']; + protected OrdenTrabajoModel $otModel; + protected OrdenTrabajoTarea $otTarea; protected OrdenTrabajoDate $otDate; protected OrdenTrabajoUser $otUser; protected OrdenTrabajoEntity $ot; protected UserModel $userModel; + protected string $defaultMaquinaCorteName = 'HT-1000'; + protected MaquinaEntity $defaultMaquinaCorte; + protected MaquinaModel $maquinaModel; protected array $MAPPING_DATE_USER = [ "fecha_encuadernado_at" => "encuadernacion_user_id", // "fecha_externo_at" => "null", @@ -70,10 +81,12 @@ class ProductionService extends BaseService } public function init(int $orden_trabajo_id): self { + $this->maquinaModel = model(MaquinaModel::class); $this->otModel = model(OrdenTrabajoModel::class); $this->ot = $this->otModel->find($orden_trabajo_id); $pedido = $this->ot->pedido(); $this->setPedido($pedido); + $this->defaultMaquinaCorte = $this->maquinaModel->where('nombre',$this->defaultMaquinaCorteName)->first(); return $this; } /** @@ -140,14 +153,17 @@ class ProductionService extends BaseService $fecha_encuadernado = Time::now()->addDays(2)->format("Y-m-d"); $fecha_entrega_real = Time::now()->addDays(5)->format("Y-m-d"); $fecha_embalaje_at = Time::now()->addDays(4)->format("Y-m-d"); - return $this->otDate->insert([ + $data = [ "orden_trabajo_id" => $this->ot->id, "fecha_encuadernado_at" => $fecha_encuadernado, "fecha_entrega_real_at" => $fecha_entrega_real, "fecha_impresion_at" => Time::now()->format("Y-m-d"), "embalaje_at" => $fecha_embalaje_at, "fecha_entrega_externo" => $this->pedido->fecha_entrega_externo, - ]); + ]; + $otDateId = $this->otDate->insert($data); + $this->otDate->updateUserDateMap($this->ot->id,$data); + return $otDateId; } protected function storeOrdenTrabajoUsers(): int|bool|string { @@ -171,7 +187,7 @@ class ProductionService extends BaseService return $r; } /** - * Inserta las tareas de la orden de trabajo. + * Inserta las tareas de la orden de trabajo.p * Acepta como argumento una entidad de la orden de trabajo OrdenTrabajoEntity * * @@ -196,9 +212,28 @@ class ProductionService extends BaseService $ot_tareas["tiempo_real"] = $p_linea->horas_maquina; //? Tiempo real se inserta manual? $insert_query_result = $this->otTarea->insert($ot_tareas); $ot_tareas = []; + $this->storeTareaCorte($p_linea); } return $insert_query_result; } + protected function storeTareaCorte(PresupuestoLineaEntity $pLinea): ?OrdenTrabajoTareaEntity + { + $otCorte = null; + if($pLinea->isRotativa()){ + $tareaId = $this->otTarea->insert([ + 'orden_trabajo_id' => $this->ot->id, + 'presupuesto_linea_id' => $pLinea->id, + 'nombre' => 'Corte', + 'maquina_id' => $this->defaultMaquinaCorte->id, + 'orden' => $this->defaultMaquinaCorte->orden_planning, + 'tiempo_estimado' => $pLinea->rotativa_tiempo_corte, + 'tiempo_real' => $pLinea->rotativa_tiempo_corte + ]); + $otCorte = $this->otTarea->find($tareaId); + } + return $otCorte; + } + protected function storeOrdenTrabajoAcabadoTareas(): bool { $p_lineas = $this->presupuesto_lineas_acabado(); @@ -404,6 +439,7 @@ class ProductionService extends BaseService "ordenes_trabajo.total_tirada as ot_tirada", "lg_papel_formato.ancho as papel_ancho", "lg_papel_formato.alto as papel_alto", + "presupuesto_linea.rotativa_metros_total as metros", // "JSON_EXTRACT(presupuesto_linea.formas,'$.maquina_ancho') as maquina_ancho", // "JSON_EXTRACT(presupuesto_linea.formas,'$.maquina_alto') as maquina_alto", "lg_papel_impresion.nombre as papel_impresion", @@ -422,7 +458,49 @@ class ProductionService extends BaseService ->join("lg_maquinas as lgmp", "lgmp.id = presupuesto_linea.maquina_id", "left") ->join("lg_imposiciones", "lg_imposiciones.id = orden_trabajo_tareas.imposicion_id", "left") // ->where("orden_trabajo_tareas.orden_trabajo_id", $this->ot->id) - ->whereIn("presupuesto_linea.tipo", ["lp_rot_bn", "lp_rot_color"]) + ->whereIn("presupuesto_linea.tipo", $this->TIPOS_ROTATIVA) + ->where('lg_maquinas.is_rotativa',true) + ->where("orden_trabajo_tareas.deleted_at", null) + ->orderBy("orden_trabajo_tareas.orden", "ASC"); + return $q; + } + /** + * Query para mostrar en datatable + * + * @return BaseBuilder + */ + public function planningPlanaQueryDatatable(): BaseBuilder + { + $q = $this->otModel->builder()->select([ + "ordenes_trabajo.id as otId", + "orden_trabajo_dates.fecha_entrega_real_at", + "presupuestos.titulo as presupuesto_titulo", + "orden_trabajo_tareas.maquina_id", + "lg_maquinas.nombre as maquina_planning_nombre", + "ordenes_trabajo.total_tirada as ot_tirada", + "lg_papel_formato.ancho as papel_ancho", + "lg_papel_formato.alto as papel_alto", + "presupuesto_linea.pliegos_pedido as pliegosPedido", + // "JSON_EXTRACT(presupuesto_linea.formas,'$.maquina_ancho') as maquina_ancho", + // "JSON_EXTRACT(presupuesto_linea.formas,'$.maquina_alto') as maquina_alto", + "lg_papel_impresion.nombre as papel_impresion", + "presupuesto_linea.gramaje as papel_gramaje", + + + + ]) + ->join("orden_trabajo_tareas", "orden_trabajo_tareas.orden_trabajo_id = ordenes_trabajo.id", "left") + ->join("orden_trabajo_dates", "orden_trabajo_dates.orden_trabajo_id = ordenes_trabajo.id", "left") + ->join("presupuesto_linea", "presupuesto_linea.id = orden_trabajo_tareas.presupuesto_linea_id", "left") + ->join("presupuestos", "presupuestos.id = presupuesto_linea.presupuesto_id", "right") + ->join("lg_papel_formato", "lg_papel_formato.id = presupuestos.papel_formato_id", "left") + ->join("lg_maquinas", "lg_maquinas.id = orden_trabajo_tareas.maquina_id", "left") + ->join("lg_papel_impresion", "lg_papel_impresion.id = presupuesto_linea.papel_impresion_id", "left") + ->join("lg_maquinas as lgmp", "lgmp.id = presupuesto_linea.maquina_id", "left") + ->join("lg_imposiciones", "lg_imposiciones.id = orden_trabajo_tareas.imposicion_id", "left") + // ->where("orden_trabajo_tareas.orden_trabajo_id", $this->ot->id) + ->whereIn("presupuesto_linea.tipo", $this->TIPOS_PLANA) + ->where('lg_maquinas.is_rotativa',false) ->where("orden_trabajo_tareas.deleted_at", null) ->orderBy("orden_trabajo_tareas.orden", "ASC"); return $q; @@ -472,6 +550,7 @@ class ProductionService extends BaseService "lg_papel_formato.alto as papel_alto", // "CAST(JSON_EXTRACT(presupuesto_linea.formas,'$.maquina_ancho') AS DOUBLE) as maquina_ancho", // "CAST(JSON_EXTRACT(presupuesto_linea.formas,'$.maquina_alto') AS DOUBLE) as maquina_alto", + "presupuesto_linea.rotativa_metros_total as metros", "SUM(ordenes_trabajo.total_tirada) as totalTirada", "SUM(orden_trabajo_tareas.tiempo_real) as tiempoReal" ]) @@ -482,6 +561,34 @@ class ProductionService extends BaseService ->join("lg_papel_formato", "lg_papel_formato.id = presupuestos.papel_formato_id", "left") ->where("orden_trabajo_tareas.deleted_at", null) ->where("orden_trabajo_tareas.presupuesto_linea_id IS NOT NULL", NULL, FALSE) + ->whereIn("presupuesto_linea.tipo", $this->TIPOS_ROTATIVA) + ->groupBy('lg_papel_impresion.id'); + + + + return $q; + } + public function papelPliegoDatatableQuery(): BaseBuilder + { + $q = $this->otModel->builder()->select([ + "lg_papel_impresion.id as papelImpresionId", + "lg_papel_impresion.nombre as papelImpresionNombre", + "lg_papel_impresion.gramaje as papelImpresionGramaje", + "COUNT(orden_trabajo_tareas.id) as tareasCount", + "lg_papel_formato.ancho as papel_ancho", + "lg_papel_formato.alto as papel_alto", + "presupuesto_linea.pliegos_pedido as pliegosPedido", + "SUM(ordenes_trabajo.total_tirada) as totalTirada", + "SUM(orden_trabajo_tareas.tiempo_real) as tiempoReal" + ]) + ->join("orden_trabajo_tareas", "orden_trabajo_tareas.orden_trabajo_id = ordenes_trabajo.id", "left") + ->join("presupuesto_linea", "presupuesto_linea.id = orden_trabajo_tareas.presupuesto_linea_id", "left") + ->join("presupuestos", "presupuestos.id = presupuesto_linea.presupuesto_id", "right") + ->join("lg_papel_impresion", "presupuesto_linea.papel_impresion_id = lg_papel_impresion.id", "left") + ->join("lg_papel_formato", "lg_papel_formato.id = presupuestos.papel_formato_id", "left") + ->where("orden_trabajo_tareas.deleted_at", null) + ->where("orden_trabajo_tareas.presupuesto_linea_id IS NOT NULL", NULL, FALSE) + ->whereIn("presupuesto_linea.tipo", $this->TIPOS_PLANA) ->groupBy('lg_papel_impresion.id'); @@ -614,18 +721,23 @@ class ProductionService extends BaseService public function updateOrdenTrabajoDate($data) { - // // return $this->otDate->find($this->ot->id); + $result = []; $otDate = $this->otDate->where('orden_trabajo_id', $this->ot->id) ->set([$data['name'] => $data[$data['name']]]) ->update($data); + $this->otDate->updateUserDateMap($this->ot->id,$data); $ot_users = $this->ot->users(); - if($this->MAPPING_DATE_USER[$data["name"]]){ + if(isset($this->MAPPING_DATE_USER[$data["name"]])){ $user_id = $ot_users->{$this->MAPPING_DATE_USER[$data["name"]]}; $user = $this->userModel->find($user_id); - return ["user" => $user, "status" => $otDate]; + if($user_id){ + $result = ["user" => null, "status" => false]; + } + $result = ["user" => $user, "status" => $otDate]; }else{ - return ["user" => null, "status" => false]; + $result = ["user" => null, "status" => false]; } + return $result; } public function updateOrdenTrabajo($data): bool diff --git a/ci4/app/Views/themes/vuexy/components/tables/planning_papel_gramaje_table.php b/ci4/app/Views/themes/vuexy/components/tables/planning_papel_gramaje_table.php index cc71352d..e8427765 100644 --- a/ci4/app/Views/themes/vuexy/components/tables/planning_papel_gramaje_table.php +++ b/ci4/app/Views/themes/vuexy/components/tables/planning_papel_gramaje_table.php @@ -19,7 +19,7 @@ Total: - (m) + diff --git a/ci4/app/Views/themes/vuexy/components/tables/planning_papel_pliego_table.php b/ci4/app/Views/themes/vuexy/components/tables/planning_papel_pliego_table.php new file mode 100644 index 00000000..51a75dca --- /dev/null +++ b/ci4/app/Views/themes/vuexy/components/tables/planning_papel_pliego_table.php @@ -0,0 +1,29 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
(gr)(HH:MM)
Total:
+
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/components/tables/planning_plana_table.php b/ci4/app/Views/themes/vuexy/components/tables/planning_plana_table.php new file mode 100644 index 00000000..e0e9aac3 --- /dev/null +++ b/ci4/app/Views/themes/vuexy/components/tables/planning_plana_table.php @@ -0,0 +1,43 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/components/tables/planning_rot_table.php b/ci4/app/Views/themes/vuexy/components/tables/planning_rot_table.php index 7cb8e213..f12d2c00 100644 --- a/ci4/app/Views/themes/vuexy/components/tables/planning_rot_table.php +++ b/ci4/app/Views/themes/vuexy/components/tables/planning_rot_table.php @@ -19,16 +19,16 @@ - - - - - - + + + + + + - @@ -39,7 +39,7 @@ - + diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otCosts.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otCosts.php index c6d7826b..874d4a23 100644 --- a/ci4/app/Views/themes/vuexy/form/produccion/ot/otCosts.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otCosts.php @@ -3,7 +3,10 @@

diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otDates.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otDates.php index 26d44620..59aeb8cf 100644 --- a/ci4/app/Views/themes/vuexy/form/produccion/ot/otDates.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otDates.php @@ -3,7 +3,10 @@

diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otDetails.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otDetails.php index 3c2279e5..e8c94487 100644 --- a/ci4/app/Views/themes/vuexy/form/produccion/ot/otDetails.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otDetails.php @@ -3,37 +3,79 @@

-
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - +
+
+
+
+
+
+
+ +
+
+
papel_formato()->ancho?>xpapel_formato()->alto?>
+ +
+
+
+
+
+
+ +
+
+
merma?>
+ +
+
+
+
+
+
+ +
+
+
solapas?>
+ + +
+
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+
merma?>
+ + +
+
+
+
+
diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php new file mode 100644 index 00000000..08c29f9a --- /dev/null +++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php @@ -0,0 +1,45 @@ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+

[id ?>]titulo ?>

+

nombre ?>

+

OT : id ?>

+
+
+

progreso ?> %

+ Progreso +
+
+
+
+ +
+
+
+
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otPortada.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otPortada.php index 508202ff..8e13bdc7 100644 --- a/ci4/app/Views/themes/vuexy/form/produccion/ot/otPortada.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otPortada.php @@ -2,8 +2,10 @@

diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otProgress.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otProgress.php index 1cbcb577..3abb1ac0 100644 --- a/ci4/app/Views/themes/vuexy/form/produccion/ot/otProgress.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otProgress.php @@ -3,7 +3,10 @@

diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otTask.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otTask.php index 113178d8..40eb9437 100644 --- a/ci4/app/Views/themes/vuexy/form/produccion/ot/otTask.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otTask.php @@ -3,7 +3,10 @@

diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/viewPlanningRotativa.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/viewPlanningRotativa.php index 48b56fb7..2c84a148 100644 --- a/ci4/app/Views/themes/vuexy/form/produccion/ot/viewPlanningRotativa.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/viewPlanningRotativa.php @@ -12,11 +12,24 @@
-
- -
endSection() ?> section('css') ?> diff --git a/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php b/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php index 59191045..5340bde6 100644 --- a/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php +++ b/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php @@ -5,79 +5,8 @@ extend('themes/vuexy/main/defaultlayout') ?> section('content'); ?>
-
-
-
-
-
-
-
-
-
+ - -
-
- - -
- -
diff --git a/ci4/app/Views/themes/vuexy/main/menus/produccion_menu.php b/ci4/app/Views/themes/vuexy/main/menus/produccion_menu.php index b59fd6ac..399ff4a3 100644 --- a/ci4/app/Views/themes/vuexy/main/menus/produccion_menu.php +++ b/ci4/app/Views/themes/vuexy/main/menus/produccion_menu.php @@ -33,7 +33,7 @@ if (auth()->user()->inGroup('beta')) { --> diff --git a/httpdocs/assets/img/cortadora_bobinas.png b/httpdocs/assets/img/cortadora_bobinas.png new file mode 100644 index 0000000000000000000000000000000000000000..e802a0f3518878c2fb498b37bc7ee5c58c11c1b9 GIT binary patch literal 9888 zcmb`NWm6qZw}xlq?(P!Y-QC@tAi)XlK{sx}-7UDgdxE=5um=c)4Z+I$Nl`3^(gnqJ^%1p_{hJcgsPrf1Zv){>pp2lP6kLE zk-z|n!vJ>vFbh8S)I=0eU~W+;yPjuE)Q|5(@`6gi4G zZ?R$!6@V~}xz_9FT_@sqhoj%?>p6Z4S}(Nv(pn@2RF|uRaT2XEvX1zbT$o<7Q#XBboSU#dVL1nLHu38EI!j7pgjk+dxF=XL0J6LO5@I}8oz&?HkSJ%as84^Byk9WZ?dwX7hFk*KZ5Ue-5`vAN)mS1W z68WHz^gDzkpzWH|Y68de?eXY*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*cwh3p{%XVtmXHrA~l7N zyU?~dGJu+Sf^Lr9-SqRsw_-V@;v`^WUoG|%#*^UHnUTxPih7zmU`~#{LJ@i8IZOob zUQ85}z^d+sGd(6VI(jyUr_ur#HG{~J5Lo~NO;cHtoC=U1+6^DB#00`ZaZ=_Y5rAZN zpFJ0Q7+{a$*QXmwDDWo~6aHKxkT}0Q2V%fS*A-$YK3e(z^YnLkwrt;x1Z$Y7kIpkd NK}J=&PSPyo{{TE738w%6 literal 0 HcmV?d00001 diff --git a/httpdocs/assets/img/guillotina.png b/httpdocs/assets/img/guillotina.png new file mode 100644 index 0000000000000000000000000000000000000000..3e6343ae66530e828a2c26b8bf7d6265a73519e5 GIT binary patch literal 10150 zcmW-ncRUr|8^_PR?zOj!%qv?$_IB-&P?=d*nGv$LYlQ3~D>IV4CHvY$X7-HiY_j?J z{{A@U{B{0#UgvqepU?9-&pT~R6(W3Ed;kEEnyTW{+Y|lY!o|Mb+hxrA06+jWML8W$ z(``RIPu;P)e=;u40zs2{GuN-02Dh(_jEc6$pnBrJtWmVOz^xI4O+cYrk zQ+8asdoh0Dw`Ih>!oy%#2M=ri?PT_8>hr0uOsBobefI{F{jeZg>A+r#2rlY(iZ8A; z-K0xC*}Oe+>s;VyW=yoao3r+QBDFzuL4Ka^4*om$-wT%xRZ|K4GL&q^zPq0zwMrJg z`>#K^I%jy@+mOpmH&a-kUVBi_Hgi_+^F;%ik9zOCBXYlCVoO&;FEU@a8OzA4$Ysa+ zXCQhas9uvJ+`v^Hw;Xu!hQdnj^lR#m2{Uu~Q(yLT2&{uN=P zIXWpva>H261x=MHv9LcNKH@qQh1!&PKUD)q6>Y>MZ|`k}PyBi}_DZ)6hRw)BL&z;s zrDnX);^;Ui<9F^#4=h$zl}@2@WgHNDLql;UZmL5s?Kex)`soabmS?>Iuy@y)QcMeu z6`_IWGp8;GyWf4f3bR>R^lymIy&q$I=TDEi%;mD>@&&oAxgMbn&o#tWmS)I?1HgH{SU`b;FX8D%QXOAg4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eNyZBwGI~xQ;xoAYjy8RNz3|dF1@1B!l zNLfiiA$Pjq*WAZF`4&X3dMOx=49}&BXL*_dF%0YbI3159N&og@zX^_EW7<`*`AEG$ z;FCt}HXYYcoATf@*+Y9Bd}1kep4-M<5dJZ!3#KEI{LL+dMzrXJ?wPj8yqwWrY!y=fWhrYq&|-=k&#kfak?_Enn05TGKq%kE%;%%47c|6@Und z`8EFYotEr})q}VvO;+K!B2jxo`%*eE`Rh9bOS>b|N92g99<5qlL*BcwU?;RNYiqxBrb$;|>cHYnL;@|e6_oK`Lwv|EdTQgHjSD%DN^i{v+`VM_e z5WNo-9eUXyU)P<`YY#vl9^m8O<7p2KZWDE}B>DkFttk3gAz27oe!?qM7yDwp)+C{J zSsuTl&=^d}HrM_$b#J5~+bMe9RO&fh{qCU;X>IPy(FZ=`khq;-w~vyN4~F3As?mY9 czb4nR)7IGLU!5%pZ|CoTnv$kssXQv^e|6J>)Bpeg literal 0 HcmV?d00001 diff --git a/httpdocs/assets/js/safekat/pages/produccion/ot.js b/httpdocs/assets/js/safekat/pages/produccion/ot.js index 616b8a4e..23a52461 100644 --- a/httpdocs/assets/js/safekat/pages/produccion/ot.js +++ b/httpdocs/assets/js/safekat/pages/produccion/ot.js @@ -1,7 +1,7 @@ import Ajax from "../../components/ajax.js" import ClassSelect from "../../components/select2.js"; import DatePicker from "../../components/datepicker.js"; -import { alertConfirmationDelete } from "../../components/alerts/sweetAlert.js"; +import { alertConfirmationDelete, alertSuccess } from "../../components/alerts/sweetAlert.js"; import Modal from "../../components/modal.js" class OrdenTrabajo { @@ -100,7 +100,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("keyup","#ot-comment",this.handleOtComment.bind(this)) + this.otForm.on("change", "#ot-comment", this.handleOtComment.bind(this)) this._handleGetData() this.handleGetPortada() @@ -116,7 +116,7 @@ class OrdenTrabajo { bottomEnd: 'paging' }, serverSide: true, - responsive : true, + responsive: true, createdRow: this.filterCreatedRow.bind(this), pageLength: 10, language: { @@ -231,10 +231,10 @@ class OrdenTrabajo { } fillOtDetails() { const progreso = this.summaryData.ot.progreso - this.otForm.find("#ot-progress-bar").attr('aria-valuenow',progreso).text(progreso + "%").css("width",progreso + "%") - this.otForm.find("#ot-paginas").val(this.summaryData.presupuesto.paginas) - this.otForm.find("#ot-tirada").val(this.summaryData.presupuesto.tirada) - this.otForm.find("#ot-merma").val(this.summaryData.presupuesto.merma) + this.otForm.find("#ot-progress-bar").attr('aria-valuenow', progreso).text(progreso + "%").css("width", progreso + "%") + this.otForm.find("#ot-paginas").text(this.summaryData.presupuesto.paginas) + this.otForm.find("#ot-tirada").text(this.summaryData.presupuesto.tirada) + this.otForm.find("#ot-merma").text(this.summaryData.presupuesto.merma) } fillOtDates() { this.fechaImpresion.setDate(this.summaryData.dates.fecha_impresion_at) @@ -275,7 +275,7 @@ class OrdenTrabajo { handleTareaNoteSubmit(event) { const data = {} data["comment"] = $("#comment-tarea").val() - data["orden_trabajo_tarea_id"] = $("#comment-tarea").data("id") + data["orden_trabajo_tarea_id"] = this.tareaIdComment const ajax = new Ajax( "/produccion/ordentrabajo/update/tarea", data, @@ -291,17 +291,19 @@ class OrdenTrabajo { this._handleGetData(); } handleTareaChangeError(error) { } - handleOtComment(event){ + handleOtComment(event) { console.log($(event.currentTarget).val()) const ajax = new Ajax( "/produccion/ordentrabajo/update", { - "orden_trabajo_id" : this.modelId, - "name" : $(event.currentTarget).attr("name"), - "comentarios" : $(event.currentTarget).val() + "orden_trabajo_id": this.modelId, + "name": $(event.currentTarget).attr("name"), + "comentarios": $(event.currentTarget).val() }, null, - null, + (response) => { + alertSuccess(response.message).fire() + }, null ) ajax.post(); @@ -326,7 +328,11 @@ class OrdenTrabajo { } handleDateChangeSuccess(formItem, response) { formItem.addClass("is-valid") - formItem.parent().append(`
${[response.user.first_name, response.user.last_name].join(" ")}
`) + alertSuccess(response.message).fire() + if (response.user) { + formItem.parent().find(".form-text").remove() + formItem.parent().append(`
${[response.user.first_name, response.user.last_name].join(" ")}
`) + } } handleDateChangeError(errors) { } handlePreimpresionReviewChange(event) { @@ -455,10 +461,10 @@ class OrdenTrabajo { } handleDeleteTareaError() { } handleNoteTarea(event) { - let tarea_id = $(event.currentTarget).data("id"); - const tarea = this.summaryData.tasks.find(task => task.id == tarea_id) + this.tareaIdComment = $(event.currentTarget).data("id"); + const tarea = this.summaryData.tasks.find(task => task.id == this.tareaIdComment) if (tarea) { - $("#comment-tarea").attr("data-id", tarea_id) + $("#comment-tarea").attr("data-id", this.tareaIdComment) $("#comment-type").text(tarea.nombre ?? "") $("#comment-tarea").val(tarea.comment) this.tareaCommentModal.toggle() diff --git a/httpdocs/assets/js/safekat/pages/produccion/planning_rotativa/planning_rotativa.js b/httpdocs/assets/js/safekat/pages/produccion/planning_rotativa/planning_rotativa.js index 8b3225fc..e590a591 100644 --- a/httpdocs/assets/js/safekat/pages/produccion/planning_rotativa/planning_rotativa.js +++ b/httpdocs/assets/js/safekat/pages/produccion/planning_rotativa/planning_rotativa.js @@ -6,24 +6,45 @@ class PlanningRotativa { constructor(domItem) { this.item = domItem this.tablePlanningRot = this.item.find("#planning-rotativa-datatable") + this.tablePlanningPlana = this.item.find("#planning-plana-datatable") this.papelGramajeTablePlanning = this.item.find("#planning-papel-datatable") + this.papelPliegoTablePlanning = this.item.find("#planning-pliego-datatable") this.papelImpresionHeader = this.item.find('#papel-impresion-name-header') + this.papelImpresionPlanaHeader = this.item.find('#papel-impresion-name-plana-header') + this.checkAllMetros = this.item.find("#metros-check-all") + this.checkAllPliegos = this.item.find("#pliegos-check-all") + this.datatableColumns = [ - { data: 'otId', searchable: false, sortable: false }, - { data: 'fecha_entrega_real_at', searchable: true, sortable: false }, - { data: 'presupuesto_titulo', searchable: true, sortable: false }, - { data: 'maquina_planning_nombre', searchable: true, sortable: false }, - { data: 'ot_tirada', searchable: false, sortable: false, }, - { data: 'papel_ancho', searchable: false, sortable: false, render: d => `${d}` }, - { data: 'papel_alto', searchable: false, sortable: false, render: d => `${d}` }, + { data: 'otId', searchable: false, sortable: false, width: "3rem" }, + { data: 'fecha_entrega_real_at', searchable: true, sortable: false, width: "15rem" }, + { data: 'presupuesto_titulo', searchable: true, sortable: false, width: "20rem" }, + { data: 'maquina_planning_nombre', searchable: true, sortable: false, width: "10rem" }, + { data: 'ot_tirada', searchable: false, sortable: false, width: "5rem" }, + { data: 'papel_ancho', searchable: false, sortable: false, width: "5rem", render: d => `${d}` }, + { data: 'papel_alto', searchable: false, sortable: false, width: "5rem", render: d => `${d}` }, { data: 'papel_impresion', searchable: false, sortable: false }, - { data: 'papel_gramaje', searchable: false, sortable: false, render: d => `${d}` }, - { data: 'corte', searchable: false, sortable: false, render: d => d }, + { data: 'papel_gramaje', searchable: false, sortable: false, width: "5rem", render: d => `${d}` }, + { data: 'corte', searchable: false, sortable: false, render: this.renderCorteImage.bind(this), width: "10rem" }, { data: 'metros_check', searchable: false, sortable: false, render: d => `` }, { data: 'metros', searchable: false, sortable: false, render: d => `${d}` }, { data: 'action', searchable: false, sortable: false, render: this._renderBtnAction }, + ] + this.datatablePlanaColumns = [ + { data: 'otId', searchable: false, sortable: false, width: "3rem" }, + { data: 'fecha_entrega_real_at', searchable: true, sortable: false, width: "15rem" }, + { data: 'presupuesto_titulo', searchable: true, sortable: false, width: "20rem" }, + { data: 'maquina_planning_nombre', searchable: true, sortable: false, width: "10rem" }, + { data: 'ot_tirada', searchable: false, sortable: false, width: "5rem" }, + { data: 'papel_ancho', searchable: false, sortable: false, width: "5rem", render: d => `${d}` }, + { data: 'papel_alto', searchable: false, sortable: false, width: "5rem", render: d => `${d}` }, + { data: 'papel_impresion', searchable: false, sortable: false }, + { data: 'papel_gramaje', searchable: false, sortable: false, width: "5rem", render: d => `${d}` }, + { data: 'pliegos_check', searchable: false, sortable: false, render: d => `` }, + { data: 'pliegosPedido', searchable: false, sortable: false, render: d => `${d}` }, + { data: 'action', searchable: false, sortable: false, render: this._renderBtnAction }, + ] this.papelGramajeDatatableColumns = [ { data: 'papelImpresionNombre', searchable: true, sortable: true }, @@ -31,7 +52,7 @@ class PlanningRotativa { { data: 'tareasCount', searchable: true, sortable: true }, { data: 'totalTirada', searchable: false, sortable: false }, { data: 'metros', searchable: false, sortable: false, render: d => `${d}` }, - { data: 'tiempoReal', searchable: false, sortable: false }, + { data: 'tiempoReal', searchable: false, sortable: false, render: d => this.formatSeconds(d) }, { data: 'action', searchable: false, sortable: false, render: (d) => { return `` @@ -40,32 +61,82 @@ class PlanningRotativa { ] - this.maquinaSelectFilter = new ClassSelect($("#maquina-select-filter"), `/maquinas/select`, "Seleccione una maquina", true, {}, $('body')); - this.papelImpresionFilter = new ClassSelect($("#papel-impresion-select-filter"), `/papelesimpresion/select`, "Seleccione un papel", true, {}, $('body')); + this.papelPliegoDatatableColumns = [ + { data: 'papelImpresionNombre', searchable: true, sortable: true }, + { data: 'papelImpresionGramaje', searchable: true, sortable: true }, + { data: 'tareasCount', searchable: true, sortable: true }, + { data: 'totalTirada', searchable: false, sortable: false }, + { data: 'pliegosPedido', searchable: false, sortable: false, render: d => `${d}` }, + { data: 'tiempoReal', searchable: false, sortable: false, render: d => this.formatSeconds(d) }, + { + data: 'action', searchable: false, sortable: false, render: (d) => { + return `` + } + }, + + + ] + this.maquinaSelectFilter = new ClassSelect( + this.tablePlanningRot.find(".planning-maquina-select"), + `/maquinas/select`, + "Seleccione una maquina", + true, { + dropdownCssClass: "h-2" + }, $('body')); + this.papelImpresionFilter = new ClassSelect(this.tablePlanningRot.find(".planning-papel-select"), `/papelesimpresion/select`, "Seleccione un papel", true, {}, $('body')); + this.maquinaSelectFilterPlana = new ClassSelect(this.tablePlanningPlana.find(".planning-maquina-select"), `/maquinas/select`, "Seleccione una maquina", true, {}, $('body')); + this.papelImpresionFilterPlana = new ClassSelect(this.tablePlanningPlana.find(".planning-papel-select"), `/papelesimpresion/select`, "Seleccione un papel", true, {}, $('body')); this.maquinaSelectFilter.config.dropdownParent = this.item } init() { + const autoNumericOptions = { + digitGroupSeparator: ".", + decimalCharacter: ",", + allowDecimalPadding: 'floats', + currencySymbol: '(m)', + currencySymbolPlacement: 's', + decimalPlaces: 2, + unformatOnSubmit: true, + + } + const autoNumericPliegosOptions = { + digitGroupSeparator: ".", + decimalCharacter: ",", + allowDecimalPadding: 'floats', + decimalPlaces: 0, + unformatOnSubmit: true, + + } + this.totalMetros = new AutoNumeric(this.item.find('#total-metros')[0], autoNumericOptions); + this.totalMetrosSel = new AutoNumeric(this.item.find('#metros-sel-total')[0], autoNumericOptions); + this.totalPliegos = new AutoNumeric(this.item.find('#total-pliegos')[0], autoNumericPliegosOptions); + this.totalPliegosSel = new AutoNumeric(this.item.find('#pliegos-sel-total')[0], autoNumericPliegosOptions); this.maquinaSelectFilter.init() this.papelImpresionFilter.init() + this.maquinaSelectFilterPlana.init() + this.papelImpresionFilterPlana.init() this.checkAllMetros.on('change', () => { let isChecked = this.checkAllMetros.prop('checked') this.item.find(".metros-check").prop('checked', isChecked).trigger("change") }) + this.checkAllPliegos.on('change', () => { + let isChecked = this.checkAllPliegos.prop('checked') + this.item.find(".pliegos-check").prop('checked', isChecked).trigger("change") + }) this.papelGramajeTablePlanning.on('click', '.papel-gramaje-btn', this.filterPapelGramaje.bind(this)) + this.papelPliegoTablePlanning.on('click', '.papel-pliego-btn', this.filterPapelGramajePlana.bind(this)) + this.papelImpresionFilter.onChange(() => { this.papelImpresionHeader.text(this.papelImpresionFilter.getText()) }) + this.papelImpresionFilterPlana.onChange(() => { + this.papelImpresionPlanaHeader.text(this.papelImpresionFilter.getText()) + }) this.datatablePlanningRot = this.tablePlanningRot.DataTable({ processing: true, orderCellsTop: true, - layout: { - topStart: 'info', - topEnd: null, - bottomStart: 'pageLength', - bottomEnd: 'paging' - }, - + dom: 'lrtip', serverSide: true, responsive: true, pageLength: 10, @@ -75,17 +146,23 @@ class PlanningRotativa { columns: this.datatableColumns, ajax: '/produccion/ordentrabajo/planning/rotativa/datatable' }); + this.datatablePlanningPlana = this.tablePlanningPlana.DataTable({ + processing: true, + orderCellsTop: true, + dom: 'lrtip', + serverSide: true, + responsive: true, + pageLength: 10, + language: { + url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json" + }, + columns: this.datatablePlanaColumns, + ajax: '/produccion/ordentrabajo/planning/plana/datatable' + }); this.papelGramajeDatatable = this.papelGramajeTablePlanning.DataTable({ processing: true, orderCellsTop: true, - - layout: { - topStart: 'info', - topEnd: null, - bottomStart: 'pageLength', - bottomEnd: 'paging' - }, - + dom: 'lrtip', serverSide: true, responsive: true, pageLength: 10, @@ -95,22 +172,58 @@ class PlanningRotativa { columns: this.papelGramajeDatatableColumns, ajax: '/produccion/ordentrabajo/planning/papel/datatable' }); - this.item.on("keyup", ".planning-filter", (event) => { + this.papelPliegoDatatable = this.papelPliegoTablePlanning.DataTable({ + processing: true, + orderCellsTop: true, + dom: 'lrtip', + serverSide: true, + responsive: true, + pageLength: 10, + language: { + url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json" + }, + columns: this.papelPliegoDatatableColumns, + ajax: '/produccion/ordentrabajo/planning/papel/plana/datatable' + }); + /** + * PLANNING ROTATIVA + */ + this.tablePlanningRot.on("keyup", ".planning-filter", (event) => { console.log(this.datatablePlanningRot.column($(event.currentTarget).attr("name"))) let columnIndex = this.datatableColumns.findIndex((element) => element.data == $(event.currentTarget).attr("name")) this.datatablePlanningRot.column(columnIndex).search($(event.currentTarget).val()).draw() }) - this.item.on("change", "#maquina-select-filter", (event) => { + this.tablePlanningRot.on("change", ".planning-maquina-select", (event) => { let columnIndex = this.datatableColumns.findIndex((element) => element.data == $(event.currentTarget).attr("name")) this.datatablePlanningRot.column(columnIndex).search(this.maquinaSelectFilter.getText()).draw() }) - this.item.on("change", "#papel-impresion-select-filter", (event) => { + this.tablePlanningRot.on("change", ".planning-papel-select", (event) => { let columnIndex = this.datatableColumns.findIndex((element) => element.data == $(event.currentTarget).attr("name")) this.datatablePlanningRot.column(columnIndex).search(this.papelImpresionFilter.getText()).draw() }) this.papelGramajeDatatable.on('draw', this.addTotalFooter.bind(this)) + this.tablePlanningRot.on('change', ".metros-check", this.calcMetrosCheck.bind(this)) + /** + * PLANNING PLANA + */ + this.tablePlanningPlana.on("keyup", ".planning-filter", (event) => { + console.log(this.datatablePlanningRot.column($(event.currentTarget).attr("name"))) + let columnIndex = this.datatablePlanaColumns.findIndex((element) => element.data == $(event.currentTarget).attr("name")) + this.datatablePlanningPlana.column(columnIndex).search($(event.currentTarget).val()).draw() + }) + this.tablePlanningPlana.on("change", ".planning-maquina-select", (event) => { + let columnIndex = this.datatablePlanaColumns.findIndex((element) => element.data == $(event.currentTarget).attr("name")) + this.datatablePlanningPlana.column(columnIndex).search(this.maquinaSelectFilterPlana.getText()).draw() + }) + this.tablePlanningPlana.on("change", ".planning-papel-select", (event) => { + let columnIndex = this.datatablePlanaColumns.findIndex((element) => element.data == $(event.currentTarget).attr("name")) + this.datatablePlanningPlana.column(columnIndex).search(this.papelImpresionFilterPlana.getText()).draw() + }) + this.papelPliegoDatatable.on('draw', this.addTotalFooterPliego.bind(this)) + + this.tablePlanningPlana.on('change', ".pliegos-check", this.calcPliegosCheck.bind(this)) } _renderBtnAction(d) { return `` @@ -123,6 +236,10 @@ class PlanningRotativa { const papelImpresionId = $(event.currentTarget).data('id') this.getPapelImpresion(papelImpresionId) } + filterPapelGramajePlana(event) { + const papelImpresionId = $(event.currentTarget).data('id') + this.getPapelImpresionPlana(papelImpresionId) + } getPapelImpresion(papelImpresionId) { let ajax = new Ajax('/papelesimpresion/show/' + papelImpresionId, null, @@ -132,43 +249,74 @@ class PlanningRotativa { ) ajax.get() } + getPapelImpresionPlana(papelImpresionId) { + let ajax = new Ajax('/papelesimpresion/show/' + papelImpresionId, + null, + null, + this.getPapelImpresionPlanaSuccess.bind(this), + this.getPapelImpresionPlanaError.bind(this) + ) + ajax.get() + } getPapelImpresionSuccess(response) { this.papelImpresionFilter.setOption(response.id, response.nombre) + this.tablePlanningRot.find('input[name=gramaje]').val(response.gramaje).trigger("change") this.papelImpresionHeader.text(response.nombre) } getPapelImpresionError(response) { } + getPapelImpresionPlanaSuccess(response) { + this.papelImpresionFilterPlana.setOption(response.id, response.nombre) + this.tablePlanningPlana.find('input[name=gramaje]').val(response.gramaje).trigger("change") + this.papelImpresionPlanaHeader.text(response.nombre) + } + getPapelImpresionPlanaError(response) { } formatSeconds(s) { return [parseInt(s / 60 / 60), parseInt(s / 60 % 60)].join(':').replace(/\b(\d)\b/g, '0$1'); } addTotalFooter() { - const data = this.papelGramajeDatatable.column(5).data().reduce((a, b) => { - let sa = a.split(":") - let ha = parseInt(sa[0]) * 3600 - let ma = parseInt(sa[1]) * 60 - let sb = b.split(":") - let hb = parseInt(sb[0]) * 3600 - let mb = parseInt(sb[1]) * 60 - return hb + mb + ha + ma - }) - const metros = this.papelGramajeDatatable.column(4).data().reduce((a, b) => { + const seconds = this.papelGramajeDatatable.column(5).data().reduce((a, b) => { + return parseFloat(a) + parseFloat(b) + }, 0) + const metros = this.papelGramajeDatatable.column(4).data().map((e) => parseFloat(e)) + $('#total-tiempo-papel').text(this.formatSeconds(seconds)) + this.totalMetros.set(metros.reduce((a, b) => a + b, 0)) + + + } + addTotalFooterPliego() { + const seconds = this.papelPliegoDatatable.column(5).data().reduce((a, b) => { + return parseFloat(a) + parseFloat(b) + }, 0) + const pliegos = this.papelPliegoDatatable.column(4).data().map((e) => parseFloat(e)) + $('#total-tiempo-pliego').text(this.formatSeconds(seconds)) + this.totalPliegos.set(pliegos.reduce((a, b) => a + b, 0)) - return a + b - }) - $('#total-tiempo-papel').text(this.formatSeconds(data)) - $('#total-metros').text(metros) } calcMetrosCheck() { const metros_sel = this.datatablePlanningRot.rows((idx, data, node) => { return $(node).find('input[type="checkbox"]').prop('checked'); - }).data().toArray().reduce((a, b) => { - a = a?.metros ?? 0 - b = b?.metros ?? 0 - return a + b - }, null) - this.item.find('#metros-sel-total').text(metros_sel) + }).data().toArray().map((e) => parseFloat(e.metros)) + this.totalMetrosSel.set(metros_sel.reduce((a, b) => a + b, 0)) } + calcPliegosCheck() { + const metros_sel = this.datatablePlanningPlana.rows((idx, data, node) => { + return $(node).find('input[type="checkbox"]').prop('checked'); + }).data().toArray().map((e) => parseInt(e.pliegosPedido)) + this.totalPliegosSel.set(metros_sel.reduce((a, b) => a + b, 0)) + + } + renderCorteImage() { + return ` + +
+ Guillotina +
+
+ ` + } + }