mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
papel rotativa
This commit is contained in:
@ -294,6 +294,8 @@ $routes->group('papelesimpresion', ['namespace' => 'App\Controllers\Configuracio
|
||||
$routes->post('menuitems', 'Papelesimpresion::menuItems', ['as' => 'menuItemsOfPapelesImpresion']);
|
||||
$routes->post('duplicate/(:num)', 'Papelesimpresion::duplicate/$1', ['as' => 'duplicatePapelImpresion']);
|
||||
$routes->get('select', 'Papelesimpresion::papel_impresion_select', ['as' => 'papelImpresionSelect']);
|
||||
$routes->get('show/(:num)', 'Papelesimpresion::papel_impresion_find/$1', ['as' => 'showPapelImpresion']);
|
||||
|
||||
|
||||
});
|
||||
$routes->resource('papelesimpresion', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Papelesimpresion', 'except' => 'show,new,create,update']);
|
||||
|
||||
@ -474,4 +474,9 @@ class Papelesimpresion extends \App\Controllers\BaseResourceController
|
||||
$data = $this->model->querySelect($q)->get()->getResultArray();
|
||||
return $this->response->setJSON($data);
|
||||
}
|
||||
public function papel_impresion_find(int $papel_impresion_id)
|
||||
{
|
||||
$piEntity = $this->model->find($papel_impresion_id);
|
||||
return $this->response->setJSON($piEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,14 +132,14 @@ class Ordentrabajo extends BaseController
|
||||
{
|
||||
$logo = config(LogoImpresion::class);
|
||||
|
||||
$q = $this->otModel->getDatatableQuery()->where("ordenes_trabajo.estado","F");
|
||||
$q = $this->otModel->getDatatableQuery()->where("ordenes_trabajo.estado", "F");
|
||||
// return $this->response->setJSON($q->get()->getResultArray());
|
||||
return DataTable::of($q)
|
||||
->add("logo",fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)))
|
||||
->add("logo", fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)))
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => Time::createFromFormat("Y-m-d",$q->fecha_encuadernado_at)->format("d/m/Y")
|
||||
)
|
||||
fn($q) => Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y")
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
}
|
||||
@ -147,14 +147,14 @@ class Ordentrabajo extends BaseController
|
||||
{
|
||||
$logo = config(LogoImpresion::class);
|
||||
|
||||
$q = $this->otModel->getDatatableQuery()->whereIn("ordenes_trabajo.estado",["I","PM"]);
|
||||
$q = $this->otModel->getDatatableQuery()->whereIn("ordenes_trabajo.estado", ["I", "PM"]);
|
||||
// return $this->response->setJSON($q->get()->getResultArray());
|
||||
return DataTable::of($q)
|
||||
->add("logo",fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)))
|
||||
->add("logo", fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)))
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => Time::createFromFormat("Y-m-d",$q->fecha_encuadernado_at)->format("d/m/Y")
|
||||
)
|
||||
fn($q) => Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y")
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
}
|
||||
@ -162,14 +162,14 @@ class Ordentrabajo extends BaseController
|
||||
{
|
||||
$logo = config(LogoImpresion::class);
|
||||
|
||||
$q = $this->otModel->getDatatableQuery()->where("ferro_ok_at",null);
|
||||
$q = $this->otModel->getDatatableQuery()->where("ferro_ok_at", null);
|
||||
// return $this->response->setJSON($q->get()->getResultArray());
|
||||
return DataTable::of($q)
|
||||
->add("logo",fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)))
|
||||
->add("logo", fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)))
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => Time::createFromFormat("Y-m-d",$q->fecha_encuadernado_at)->format("d/m/Y")
|
||||
)
|
||||
fn($q) => Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y")
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
}
|
||||
@ -177,14 +177,14 @@ class Ordentrabajo extends BaseController
|
||||
{
|
||||
$logo = config(LogoImpresion::class);
|
||||
|
||||
$q = $this->otModel->getDatatableQuery()->where("ferro_ok_at is NOT NULL",NULL,FALSE);
|
||||
$q = $this->otModel->getDatatableQuery()->where("ferro_ok_at is NOT NULL", NULL, FALSE);
|
||||
// return $this->response->setJSON($q->get()->getResultArray());
|
||||
return DataTable::of($q)
|
||||
->add("logo",fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)))
|
||||
->add("logo", fn($q) => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)))
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => Time::createFromFormat("Y-m-d",$q->fecha_encuadernado_at)->format("d/m/Y")
|
||||
)
|
||||
fn($q) => Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y")
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
}
|
||||
@ -194,7 +194,8 @@ 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("action" , fn($q) => ["title" => lang('Produccion.datatable.filter_by_task'),'data' => $q])
|
||||
->add("metros", fn($q) => $q->maquina_ancho*$q->totalTirada/1000)
|
||||
->add("action", fn($q) => ["title" => lang('Produccion.datatable.filter_by_task'), 'data' => $q])
|
||||
->toJson(true);
|
||||
}
|
||||
public function reset_tareas(int $orden_trabajo_id)
|
||||
|
||||
@ -23,7 +23,9 @@ return [
|
||||
"tiempo" => "Tiempo",
|
||||
"progreso" => "Progreso",
|
||||
"logo" => "Logo impresion",
|
||||
"filter_by_task" => "Filtrar por tarea"
|
||||
"filter_by_task" => "Filtrar por tarea",
|
||||
"metros" => "Metros"
|
||||
|
||||
|
||||
],
|
||||
"task" => [
|
||||
@ -68,7 +70,7 @@ return [
|
||||
"preview_pdf" => "Previsualizar PDF",
|
||||
"imprimir_codigo_safekat" => "Imprimir código SAFEKAT",
|
||||
"imprimir_ferro" => "Imprimir ferro",
|
||||
"planning_rotativa" => "Planning rotativa",
|
||||
"planning_rotativa" => "Tareas rotativa",
|
||||
"solapa" => "Solapa",
|
||||
"papel_gramajes" => "Papel y gramajes"
|
||||
|
||||
|
||||
@ -376,7 +376,7 @@ class PapelImpresionModel extends \App\Models\BaseModel
|
||||
"nombre as name",
|
||||
]);
|
||||
if ($query) {
|
||||
$q->like("name", $query);
|
||||
$q->orLike("nombre", $query);
|
||||
}
|
||||
return $q;
|
||||
}
|
||||
|
||||
@ -440,6 +440,7 @@ class ProductionService extends BaseService
|
||||
"orden_trabajo_tareas.nombre",
|
||||
"lgmp.nombre as maquina_presupuesto_linea",
|
||||
"orden_trabajo_tareas.maquina_id as maquina_tarea",
|
||||
|
||||
"lg_maquinas.nombre as maquina_nombre",
|
||||
"lg_imposiciones.id as imposicion_id",
|
||||
"orden_trabajo_tareas.tiempo_estimado",
|
||||
@ -467,6 +468,8 @@ class ProductionService extends BaseService
|
||||
"lg_papel_impresion.nombre as papelImpresionNombre",
|
||||
"lg_papel_impresion.gramaje as papelImpresionGramaje",
|
||||
"COUNT(orden_trabajo_tareas.id) as tareasCount",
|
||||
"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",
|
||||
"SUM(ordenes_trabajo.total_tirada) as totalTirada",
|
||||
"SUM(orden_trabajo_tareas.tiempo_real) as tiempoReal"
|
||||
])
|
||||
@ -474,7 +477,8 @@ class ProductionService extends BaseService
|
||||
->join("presupuesto_linea", "presupuesto_linea.id = orden_trabajo_tareas.presupuesto_linea_id", "left")
|
||||
->join("lg_papel_impresion","presupuesto_linea.papel_impresion_id = lg_papel_impresion.id","left")
|
||||
->where("orden_trabajo_tareas.deleted_at", null)
|
||||
->where("orden_trabajo_tareas.presupuesto_linea_id IS NOT NULL", NULL,FALSE);
|
||||
->where("orden_trabajo_tareas.presupuesto_linea_id IS NOT NULL", NULL,FALSE)
|
||||
->groupBy('lg_papel_impresion.id');
|
||||
|
||||
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
<th><?= lang('Produccion.datatable.gramaje') ?> (gr)</th>
|
||||
<th><?= lang('Produccion.datatable.tareas') ?></th>
|
||||
<th><?= lang('Produccion.datatable.tiradas') ?></th>
|
||||
<th><?= lang('Produccion.datatable.metros') ?></th>
|
||||
<th><?= lang('Produccion.datatable.tiempo') ?>(HH:MM)</th>
|
||||
<th></th>
|
||||
|
||||
@ -15,5 +16,14 @@
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="4" style="text-align:right">Total:</th>
|
||||
<th id="total-metros"></th>
|
||||
<th id="total-tiempo-papel"></th>
|
||||
<th></th>
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
@ -25,7 +25,7 @@
|
||||
<th></th>
|
||||
<th><input type="text" class="form-control planning-filter" name="maquina_ancho" placeholder="Ancho"></th>
|
||||
<th><input type="text" class="form-control planning-filter" name="maquina_alto" placeholder="Alto"></th>
|
||||
<th><select class="select2 form-select select-maquina" id="papel-impresion-select-filter" name="maquina_planning_nombre"></select></th>
|
||||
<th><select class="select2 form-select select-maquina" id="papel-impresion-select-filter" name="papel_impresion"></select></th>
|
||||
<th><input type="text" class="form-control planning-filter" name=""></th>
|
||||
<th></th>
|
||||
|
||||
@ -34,5 +34,6 @@
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
@ -50,6 +50,7 @@
|
||||
<div id="accordionPlanningRotativaContainer" class="accordion-collapse collapse show"
|
||||
data-bs-parent="#accordionPlanningRotativa">
|
||||
<div class="accordion-body">
|
||||
<h6 id="papel-impresion-name-header" class="text-secondary "></h6>
|
||||
<?= view("themes/vuexy/components/tables/planning_rot_table.php", ["id" => "planning-rotativa-datatable"]) ?>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user