mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Compare commits
20 Commits
feat/sk-38
...
feat/impos
| Author | SHA1 | Date | |
|---|---|---|---|
| 969966ac78 | |||
| b318721b90 | |||
| a137ede1a7 | |||
| 5eaa5fea0b | |||
| f2ea93ddb6 | |||
| 31524dcf61 | |||
| c3d38e29a4 | |||
| 52a4e7d37b | |||
| 972d0c4ec8 | |||
| 36f5d42d03 | |||
| c28753e1f1 | |||
| 8e97e7b58c | |||
| f19d2b7ffe | |||
| 2a8c4b9da6 | |||
| 173afe403e | |||
| c76f4428a6 | |||
| 6a4e753a06 | |||
| 7ee844fb0c | |||
| 5dbb40af1d | |||
| c6db000057 |
@ -25,6 +25,7 @@ class OrdenTrabajo extends BaseConfig
|
||||
"retractilado5_at" => "retractilado5_user_id",
|
||||
"prototipo_at" => "prototipo_user_id",
|
||||
"marcapaginas_at" => "marcapaginas_user_id",
|
||||
"espiral_at" => "espiral_user_id",
|
||||
//FERRO
|
||||
"pendiente_ferro_at" => "pendiente_ferro_user_id",
|
||||
"ferro_en_cliente_at" => "ferro_en_cliente_user_id",
|
||||
@ -57,12 +58,66 @@ class OrdenTrabajo extends BaseConfig
|
||||
"cosido" => "#FF0B55",
|
||||
"grapado" => "#FEBA17",
|
||||
"encuadernado" => "#FEBA17",
|
||||
"corte" => "#67AE6E"
|
||||
"corte" => "#67AE6E"
|
||||
];
|
||||
public array $OT_WEEK_COLOR_DAY = [
|
||||
["bg" => "#FFFFFF", "color" => "black"],
|
||||
["bg" => "yellow", "color" => "black"],
|
||||
["bg" => "purple", "color" => "white"],
|
||||
["bg" => "orange", "color" => "white"],
|
||||
["bg" => "blue", "color" => "black"],
|
||||
["bg" => "pink", "color" => "black"],
|
||||
["bg" => "#FFFFFF", "color" => "black"],
|
||||
];
|
||||
public array $OT_ENCUADERNACION_COLOR = [
|
||||
"RF" => ["bg" => "#FF9900", "color" => "white"],
|
||||
"RFS" => ["bg" => "#FF9900", "color" => "white"],
|
||||
"RCHV" => ["bg" => "#FF9900", "color" => "blue"],
|
||||
"RCHVS" => ["bg" => "#FF9900", "color" => "blue"],
|
||||
"CC2" => ["bg" => "#104861", "color" => "yellow"],
|
||||
"CC2S" => ["bg" => "#104861", "color" => "yellow"],
|
||||
"TDF" => ["bg" => "#E49EDD", "color" => "white"],
|
||||
"TDC" => ["bg" => "#E49EDD", "color" => "blue"],
|
||||
"default" => ["bg" => "#FFFF00", "color" => "red"],
|
||||
];
|
||||
public array $OT_BACKGROUND_COLOR = [
|
||||
"ferro_digital" => ["bg" => "#BFBFBF","color" => "black"],
|
||||
"ferro" => ["bg" => "#BFBFBF","color" => "black"],
|
||||
"prototipo" => ["bg" => "#BFBFBF","color" => "black"],
|
||||
"pod" => ["bg" => "#47D359","color" => "black"],
|
||||
"inaplazable" => ["bg" => "red","color" => "white"],
|
||||
"default" => ["bg" => "#FFFFFF","color" => "black"]
|
||||
];
|
||||
public array $OT_PAPEL_COLOR =
|
||||
[
|
||||
"blanco" => ["bg" => "#FFFFFF", "color" => "black"],
|
||||
"ahuesado" => ["bg" => "#FFF2CC", "color" => "black"],
|
||||
"marfil" => ["bg" => "#FFD966", "color" => "black"],
|
||||
"volumen_ahuesado" => ["bg" => "#BF8F00", "color" => "black"],
|
||||
"estucado_mate" => ["bg" => "#BDD7EE", "color" => "black"],
|
||||
"cartulina" => ["bg" => "#C6E0B4", "color" => "black"],
|
||||
"default" => ["bg" => "#FFCCFF", "color" => "black"],
|
||||
];
|
||||
public array $OT_PLASTIFICADO_COLOR =
|
||||
[
|
||||
"BRIL" => ["bg" => "#00B0F0", "color" => "white"],
|
||||
"MATE" => ["bg" => "#FF0000", "color" => "white"],
|
||||
"SOFT_TOUCH" => ["bg" => "#00B050", "color" => "white"],
|
||||
"SANDY" => ["bg" => "#782170", "color" => "white"],
|
||||
"ANTIRAYADO" => ["bg" => "#E97132", "color" => "white"],
|
||||
"GOFRADO" => ["bg" => "#FFFF00", "color" => "black"],
|
||||
"default" => ["bg" => "#FFFFFF", "color" => "black"],
|
||||
];
|
||||
public array $OT_IMPRESION_INTERIOR_PPAL_COLOR =
|
||||
[
|
||||
"ROTATIVA" => ["bg" => "white", "color" => "red"],
|
||||
"POD" => ["bg" => "white", "color" => "#47D359"],
|
||||
"GENERAL" => ["bg" => "white", "color" => "#A02B93"],
|
||||
"default" => ["bg" => "white", "color" => "black"],
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ $routes->group('activity', ['namespace' => 'App\Controllers\Sistema'], function
|
||||
* --------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Carga archivos de rutas por dominio
|
||||
// Carga archivos de rutas por dominio
|
||||
foreach (glob(APPPATH . 'Config/Routes/*Routes.php') as $routeFile) {
|
||||
require $routeFile;
|
||||
}
|
||||
@ -146,17 +146,24 @@ $routes->group('tipologiaslibros', ['namespace' => 'App\Controllers\Configuracio
|
||||
$routes->group('imposiciones', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
|
||||
$routes->get('', 'Imposiciones::index', ['as' => 'imposicionList']);
|
||||
$routes->get('add', 'Imposiciones::add', ['as' => 'newImposicion']);
|
||||
$routes->post('add', 'Imposiciones::add', ['as' => 'createImposicion']);
|
||||
$routes->get('add/esquema', 'Imposiciones::add_esquema', ['as' => 'newImposicionEsquema']);
|
||||
$routes->get('find/(:num)', 'Imposiciones::find_imposicion/$1', ['as' => 'findImposicion']);
|
||||
$routes->get('esquema/find/(:num)', 'Imposiciones::find_imposicion_esquema/$1', ['as' => 'findImposicionEsquema']);
|
||||
$routes->post('create', 'Imposiciones::create', ['as' => 'ajaxCreateImposicion']);
|
||||
$routes->put('(:num)/update', 'Imposiciones::update/$1', ['as' => 'ajaxUpdateImposicion']);
|
||||
$routes->post('(:num)/edit', 'Imposiciones::edit/$1', ['as' => 'updateImposicion']);
|
||||
$routes->post('datatable', 'Imposiciones::datatable', ['as' => 'dataTableOfImposiciones']);
|
||||
$routes->post('esquema/create', 'Imposiciones::create_imposicion_esquema', ['as' => 'ajaxCreateImposicionEsquema']);
|
||||
$routes->post('(:num)', 'Imposiciones::update/$1', ['as' => 'ajaxUpdateImposicion']);
|
||||
$routes->post('esquema/(:num)', 'Imposiciones::update_imposicion_esquema/$1', ['as' => 'ajaxUpdateImposicionEsquema']);
|
||||
$routes->delete('(:num)', 'Imposiciones::delete/$1', ['as' => 'deleteImposicion']);
|
||||
$routes->delete('esquema/(:num)', 'Imposiciones::delete_imposicion_esquema/$1', ['as' => 'deleteImposicionEsquema']);
|
||||
$routes->get('edit/(:num)', 'Imposiciones::edit/$1', ['as' => 'updateImposicionForm']);
|
||||
$routes->get('esquema/edit/(:num)', 'Imposiciones::edit_imposicion_esquema/$1', ['as' => 'updateImposicionEsquemaForm']);
|
||||
$routes->get('datatable', 'Imposiciones::datatable', ['as' => 'dataTableOfImposiciones']);
|
||||
$routes->get('esquema/datatable', 'Imposiciones::datatable_imposicion_esquema', ['as' => 'dataTableOfEsquemaImposiciones']);
|
||||
$routes->post('allmenuitems', 'Imposiciones::allItemsSelect', ['as' => 'select2ItemsOfImposiciones']);
|
||||
$routes->post('menuitems', 'Imposiciones::menuItems', ['as' => 'menuItemsOfImposiciones']);
|
||||
$routes->get('select', 'Imposiciones::selectImposicion', ['as' => 'selectImposicion']);
|
||||
|
||||
$routes->get('esquema/select', 'Imposiciones::selectImposicionEsquema', ['as' => 'selectImposicionEsquema']);
|
||||
});
|
||||
$routes->resource('imposiciones', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Imposiciones', 'except' => 'show,new,create,update']);
|
||||
|
||||
$routes->group('papelimpresiontipologias', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
|
||||
$routes->get('add', 'Papelimpresiontipologias::add', ['as' => 'newPapelImpresionTipologia']);
|
||||
@ -753,6 +760,7 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func
|
||||
*========================**/
|
||||
$routes->post('get_files', 'Ordentrabajo::get_files');
|
||||
$routes->post('upload_files', 'Ordentrabajo::upload_files');
|
||||
$routes->get('barcode/(:num)', 'Ordentrabajo::imprimir_codigo_safekat/$1',['as' => "getOrdenTrabajoBarCode"]);
|
||||
/**======================
|
||||
* PDF
|
||||
*========================**/
|
||||
@ -770,15 +778,17 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func
|
||||
$routes->get('rotativa/datatable', 'Ordentrabajo::planning_rotativa_datatable');
|
||||
$routes->get('plana/datatable', 'Ordentrabajo::planning_plana_datatable');
|
||||
$routes->post('tarea/toggle/corte/(:num)', 'Ordentrabajo::tarea_toggle_corte/$1');
|
||||
});
|
||||
|
||||
|
||||
$routes->group('maquinista', ['namespace' => 'App\Controllers\Produccion'], function ($routes) {
|
||||
$routes->get('maquinas/view', 'Ordentrabajo::maquinista_maquinas_view', ['as' => 'viewProduccionMaquinistaMaquinas']);
|
||||
$routes->get('colas/view', 'Ordentrabajo::maquinista_colas_view', ['as' => 'viewProduccionMaquinistaColas']);
|
||||
});
|
||||
});
|
||||
});
|
||||
$routes->group('logistica', ['namespace' => 'App\Controllers\Logistica'], function ($routes) {
|
||||
|
||||
$routes->get('print/label/test', 'LogisticaController::print_test_label');
|
||||
|
||||
});
|
||||
|
||||
/*
|
||||
|
||||
@ -2,37 +2,41 @@
|
||||
|
||||
namespace App\Controllers\Configuracion;
|
||||
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Controllers\BaseResourceController;
|
||||
|
||||
use App\Models\Collection;
|
||||
|
||||
use App\Entities\Configuracion\Imposicion;
|
||||
|
||||
use App\Models\Configuracion\ImposicionEsquemaModel;
|
||||
use App\Models\Configuracion\ImposicionModel;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use CodeIgniter\Validation\Validation;
|
||||
use Hermawan\DataTables\DataTable;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class Imposiciones extends \App\Controllers\BaseResourceController
|
||||
class Imposiciones extends BaseController
|
||||
{
|
||||
|
||||
protected $modelName = ImposicionModel::class;
|
||||
protected $format = 'json';
|
||||
|
||||
protected static $singularObjectName = 'Imposicion';
|
||||
protected static $singularObjectNameCc = 'imposicion';
|
||||
protected static $pluralObjectName = 'Imposiciones';
|
||||
protected static $pluralObjectNameCc = 'imposiciones';
|
||||
|
||||
protected ImposicionModel $model;
|
||||
protected ImposicionEsquemaModel $imposicionEsquemaModel;
|
||||
protected static $controllerSlug = 'imposiciones';
|
||||
protected $format = 'json';
|
||||
|
||||
protected static $viewPath = 'themes/vuexy/form/configuracion/imposiciones/';
|
||||
|
||||
protected $indexRoute = 'imposicionList';
|
||||
protected array $viewData = [];
|
||||
protected Validation $validation;
|
||||
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
$this->viewData['pageTitle'] = lang('Imposiciones.moduleTitle');
|
||||
$this->viewData['usingSweetAlert'] = true;
|
||||
$this->model = model($this->modelName);
|
||||
$this->validation = service("validation");
|
||||
$this->imposicionEsquemaModel = model(ImposicionEsquemaModel::class);
|
||||
parent::initController($request, $response, $logger);
|
||||
}
|
||||
|
||||
@ -47,7 +51,10 @@ class Imposiciones extends \App\Controllers\BaseResourceController
|
||||
'usingServerSideDataTable' => true,
|
||||
|
||||
];
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_imposiciones"), 'route' => route_to("imposicionList"), 'active' => true],
|
||||
|
||||
];
|
||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||
|
||||
return view(static::$viewPath . 'viewImposicionList', $viewData);
|
||||
@ -56,234 +63,153 @@ class Imposiciones extends \App\Controllers\BaseResourceController
|
||||
|
||||
public function add()
|
||||
{
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_imposiciones"), 'route' => route_to("imposicionList"), 'active' => true],
|
||||
|
||||
|
||||
|
||||
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
|
||||
if ($this->canValidate()) :
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->save($sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['errorMessage'] = lang('Basic.global.formErr1', [lang('Basic.global.record')]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
endif;
|
||||
|
||||
$thenRedirect = true; // Change this to false if you want your user to stay on the form after submission
|
||||
endif;
|
||||
if ($noException && $successfulResult) :
|
||||
|
||||
$id = $this->model->db->insertID();
|
||||
|
||||
$message = lang('Basic.global.saveSuccess', [lang('Basic.global.record')]) . '.';
|
||||
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
return redirect()->to(route_to($this->indexRoute))->with('sweet-success', $message);
|
||||
else:
|
||||
return $this->redirect2listView('sweet-success', $message);
|
||||
endif;
|
||||
else:
|
||||
$this->session->setFlashData('sweet-success', $message);
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['imposicion'] = isset($sanitizedData) ? new Imposicion($sanitizedData) : new Imposicion();
|
||||
$this->viewData['orientacionList'] = $this->getOrientacionOptions();
|
||||
|
||||
$this->viewData['formAction'] = route_to('createImposicion');
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . lang('Imposiciones.moduleTitle') . ' ' . lang('Basic.global.addNewSuffix');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__);
|
||||
} // end function add()
|
||||
|
||||
public function edit($requestedId = null)
|
||||
];
|
||||
return view(static::$viewPath . 'viewImposicionNewForm', $this->viewData);
|
||||
}
|
||||
public function add_esquema()
|
||||
{
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_imposiciones"), 'route' => route_to("imposicionList"), 'active' => true],
|
||||
];
|
||||
$this->viewData["imposicion_esquema"] = null;
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
endif;
|
||||
$id = filter_var($requestedId, FILTER_SANITIZE_URL);
|
||||
$imposicion = $this->model->find($id);
|
||||
return view(static::$viewPath . 'viewImposicionEsquemaForm', $this->viewData);
|
||||
}
|
||||
public function edit($imposicion_id = null)
|
||||
{
|
||||
if ($imposicion_id) {
|
||||
$this->viewData["imposicion"] = $this->model->find($imposicion_id);
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_imposiciones"), 'route' => route_to("imposicionList"), 'active' => false],
|
||||
['title' => $this->viewData["imposicion"]->full_name, 'route' => route_to("updateImposicionForm", $imposicion_id), 'active' => true],
|
||||
|
||||
if ($imposicion == false) :
|
||||
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Imposiciones.imposicion')), $id]);
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
];
|
||||
}
|
||||
return view(static::$viewPath . 'viewImposicionForm', $this->viewData);
|
||||
}
|
||||
public function edit_imposicion_esquema($imposicion_esquema_id = null)
|
||||
{
|
||||
if ($imposicion_esquema_id) {
|
||||
$this->viewData["imposicion_esquema"] = $this->imposicionEsquemaModel->find($imposicion_esquema_id);
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_imposiciones"), 'route' => route_to("imposicionList"), 'active' => false],
|
||||
['title' => $this->viewData["imposicion_esquema"]->name, 'route' => route_to("updateImposicionEsquemaForm", $imposicion_esquema_id), 'active' => true],
|
||||
|
||||
|
||||
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
|
||||
if ($this->canValidate()) :
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->update($id, $sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['warningMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Imposiciones.imposicion'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
|
||||
endif;
|
||||
|
||||
$imposicion->fill($sanitizedData);
|
||||
|
||||
$thenRedirect = false;
|
||||
endif;
|
||||
if ($noException && $successfulResult) :
|
||||
$id = $imposicion->id ?? $id;
|
||||
$message = lang('Basic.global.updateSuccess', [lang('Basic.global.record')]) . '.';
|
||||
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
return redirect()->to(route_to($this->indexRoute))->with('sweet-success', $message);
|
||||
else:
|
||||
return $this->redirect2listView('sweet-success', $message);
|
||||
endif;
|
||||
else:
|
||||
$this->session->setFlashData('sweet-success', $message);
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['imposicion'] = $imposicion;
|
||||
$this->viewData['orientacionList'] = $this->getOrientacionOptions();
|
||||
|
||||
$this->viewData['formAction'] = route_to('updateImposicion', $id);
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . lang('Imposiciones.moduleTitle') . ' ' . lang('Basic.global.edit3');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__, $id);
|
||||
} // end function edit(...)
|
||||
];
|
||||
}
|
||||
return view(static::$viewPath . 'viewImposicionEsquemaForm', $this->viewData);
|
||||
}
|
||||
public function update($imposicion_id = null)
|
||||
{
|
||||
if ($imposicion_id) {
|
||||
$bodyData = $this->request->getPost();
|
||||
if(isset($bodyData["imposicion_esquema_id"])){
|
||||
if($bodyData["imposicion_esquema_id"] == ""){
|
||||
$bodyData["imposicion_esquema_id"] = null;
|
||||
}
|
||||
}
|
||||
$status = $this->model->update($imposicion_id, $bodyData);
|
||||
if ($status) {
|
||||
$imposicionEntity = $this->model->find($imposicion_id);
|
||||
} else {
|
||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_error"), "errors" => $this->model->errors(), "status" => true])->setStatusCode(400);
|
||||
}
|
||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "status" => $status, "data" => $imposicionEntity]);
|
||||
} else {
|
||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_error"), "message" => "", "status" => false])->setStatusCode(400);
|
||||
}
|
||||
}
|
||||
public function update_imposicion_esquema($imposicion_esquema_id = null)
|
||||
{
|
||||
if ($imposicion_esquema_id) {
|
||||
$bodyData = $this->request->getPost();
|
||||
$status = $this->imposicionEsquemaModel->update($imposicion_esquema_id, $bodyData);
|
||||
if ($status) {
|
||||
$imposicionEsquemaEntity = $this->imposicionEsquemaModel->find($imposicion_esquema_id);
|
||||
} else {
|
||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_error"), "errors" => $this->imposicionEsquemaModel->errors(), "status" => true])->setStatusCode(400);
|
||||
}
|
||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "status" => $status, "data" => $imposicionEsquemaEntity]);
|
||||
} else {
|
||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_error"), "message" => "", "status" => false])->setStatusCode(400);
|
||||
}
|
||||
}
|
||||
public function delete($imposicion_id = null)
|
||||
{
|
||||
$status = $this->model->delete($imposicion_id);
|
||||
return $this->response->setJSON(["message" => lang("App.user_alert_delete"), "status" => true]);
|
||||
}
|
||||
public function delete_imposicion_esquema($imposicion_esquema_id = null)
|
||||
{
|
||||
$status = $this->imposicionEsquemaModel->delete($imposicion_esquema_id);
|
||||
return $this->response->setJSON(["message" => lang("App.user_alert_delete"), "status" => $status]);
|
||||
}
|
||||
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
if ($this->request->isAJAX()) {
|
||||
$reqData = $this->request->getPost();
|
||||
if (!isset($reqData['draw']) || !isset($reqData['columns'])) {
|
||||
$errstr = 'No data available in response to this specific request.';
|
||||
$response = $this->respond(Collection::datatable([], 0, 0, $errstr), 400, $errstr);
|
||||
return $response;
|
||||
}
|
||||
$start = $reqData['start'] ?? 0;
|
||||
$length = $reqData['length'] ?? 5;
|
||||
$search = $reqData['search']['value'];
|
||||
$requestedOrder = $reqData['order']['0']['column'] ?? 1;
|
||||
$order = ImposicionModel::SORTABLE[$requestedOrder > 0 ? $requestedOrder : 1];
|
||||
$dir = $reqData['order']['0']['dir'] ?? 'asc';
|
||||
|
||||
$resourceData = $this->model->getResource($search)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject();
|
||||
|
||||
return $this->respond(Collection::datatable(
|
||||
$resourceData,
|
||||
$this->model->getResource()->countAllResults(),
|
||||
$this->model->getResource($search)->countAllResults()
|
||||
));
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
$q = $this->model->queryDatatable();
|
||||
return DataTable::of($q)
|
||||
->add('esquema', fn($q) => ["imposicionId" => $q->id,"esquemaId" => $q->esquemaId, "esquemaName" => $q->esquemaName])
|
||||
->add(
|
||||
'action',
|
||||
fn($q) => "<div class='btn-group btn-group-md gap-2 w-100 d-flex justify-space-between'>" . ImposicionModel::datatable_buttons($q->id) . "</div>"
|
||||
)
|
||||
->toJson(true);
|
||||
}
|
||||
|
||||
public function allItemsSelect()
|
||||
public function datatable_imposicion_esquema()
|
||||
{
|
||||
if ($this->request->isAJAX()) {
|
||||
$onlyActiveOnes = true;
|
||||
$reqVal = $this->request->getPost('val') ?? 'id';
|
||||
$menu = $this->model->getAllForMenu($reqVal . ', ancho', 'ancho', $onlyActiveOnes, false);
|
||||
$nonItem = new \stdClass;
|
||||
$nonItem->id = '';
|
||||
$nonItem->ancho = '- ' . lang('Basic.global.None') . ' -';
|
||||
array_unshift($menu, $nonItem);
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'menu' => $menu,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
public function menuItems()
|
||||
{
|
||||
if ($this->request->isAJAX()) {
|
||||
$searchStr = goSanitize($this->request->getPost('searchTerm'))[0];
|
||||
$reqId = goSanitize($this->request->getPost('id'))[0];
|
||||
$reqText = goSanitize($this->request->getPost('text'))[0];
|
||||
$onlyActiveOnes = false;
|
||||
$columns2select = [$reqId ?? 'id', $reqText ?? 'ancho'];
|
||||
$onlyActiveOnes = false;
|
||||
$menu = $this->model->getSelect2MenuItems($columns2select, $columns2select[1], $onlyActiveOnes, $searchStr);
|
||||
$nonItem = new \stdClass;
|
||||
$nonItem->id = '';
|
||||
$nonItem->text = '- ' . lang('Basic.global.None') . ' -';
|
||||
array_unshift($menu, $nonItem);
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'menu' => $menu,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
$q = $this->imposicionEsquemaModel->queryDatatable();
|
||||
return DataTable::of($q)
|
||||
->add(
|
||||
'action',
|
||||
fn($q) => "<div class='btn-group btn-group-md gap-2'>" . ImposicionEsquemaModel::datatable_buttons($q->id) . "</div>"
|
||||
)
|
||||
->toJson(true);
|
||||
}
|
||||
|
||||
|
||||
protected function getOrientacionOptions()
|
||||
{
|
||||
$orientacionOptions = [
|
||||
'' => lang('Basic.global.pleaseSelect'),
|
||||
'H' => 'H',
|
||||
'V' => 'V',
|
||||
];
|
||||
return $orientacionOptions;
|
||||
}
|
||||
public function selectImposicion()
|
||||
{
|
||||
$data = $this->model->querySelect($this->request->getGet('q'));
|
||||
return $this->response->setJSON($data);
|
||||
}
|
||||
public function selectImposicionEsquema()
|
||||
{
|
||||
$data = $this->imposicionEsquemaModel->querySelect($this->request->getGet('q'));
|
||||
return $this->response->setJSON($data);
|
||||
}
|
||||
public function find_imposicion(int $imposicion_id)
|
||||
{
|
||||
$imposicionEntity = $this->model->find($imposicion_id)->withImposicionEsquema();
|
||||
return $this->response->setJSON($imposicionEntity);
|
||||
}
|
||||
public function find_imposicion_esquema(int $imposicion_esquema_id)
|
||||
{
|
||||
$imposicionEsquemaEntity = $this->imposicionEsquemaModel->find($imposicion_esquema_id);
|
||||
return $this->response->setJSON($imposicionEsquemaEntity);
|
||||
}
|
||||
public function create()
|
||||
{
|
||||
$bodyData = $this->request->getPost();
|
||||
$createdId = $this->model->insert($bodyData);
|
||||
if ($createdId) {
|
||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "status" => true]);
|
||||
} else {
|
||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_error"), "errors" => $this->model->errors(), "status" => true])->setStatusCode(400);
|
||||
}
|
||||
}
|
||||
public function create_imposicion_esquema()
|
||||
{
|
||||
$bodyData = $this->request->getPost();
|
||||
$createdId = $this->imposicionEsquemaModel->insert($bodyData);
|
||||
if ($createdId) {
|
||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "status" => true]);
|
||||
} else {
|
||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_error"), "errors" => $this->imposicionEsquemaModel->errors(), "status" => true])->setStatusCode(400);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,11 +147,18 @@ class Ordentrabajo extends BaseController
|
||||
];
|
||||
$this->viewData["modelId"] = $orden_trabajo_id;
|
||||
$this->produccionService->init($orden_trabajo_id);
|
||||
$this->produccionService->reInsertOrdenTrabajoDates();
|
||||
$this->produccionService->reInsertOrdenTrabajoUsers();
|
||||
$this->viewData["presupuesto"] = $this->produccionService->getPresupuesto();
|
||||
$this->viewData["cliente"] = $this->produccionService->getCliente();
|
||||
$this->viewData["ot"] = $this->produccionService->getOrdenTrabajo();
|
||||
$this->viewData["is_finalizada"] = $this->produccionService->getOrdenTrabajo()->estado == "F";
|
||||
$this->viewData["user_dates"] = $this->produccionService->userDates();
|
||||
$this->viewData["pedido_user_dates"] = $this->produccionService->pedidoUserDates();
|
||||
$this->viewData["colors"] = $this->produccionService->getPdfColors();
|
||||
$this->viewData["tiempo_estimado"] = $this->produccionService->getTiempoProcesamientoHHMM();
|
||||
$this->viewData["flags"] = $this->produccionService->getFlags();
|
||||
|
||||
|
||||
return view(static::$viewPath . $this->editRoute, $this->viewData);
|
||||
}
|
||||
@ -166,7 +173,7 @@ class Ordentrabajo extends BaseController
|
||||
->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name,"color" => $this->produccionService->init($q->id)->getOtColorStatus()])
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
@ -181,7 +188,7 @@ class Ordentrabajo extends BaseController
|
||||
->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name,"color" => $this->produccionService->init($q->id)->getOtColorStatus()])
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
@ -196,7 +203,7 @@ class Ordentrabajo extends BaseController
|
||||
->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name,"color" => $this->produccionService->init($q->id)->getOtColorStatus()])
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
@ -211,7 +218,7 @@ class Ordentrabajo extends BaseController
|
||||
->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name,"color" => $this->produccionService->init($q->id)->getOtColorStatus()])
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
@ -436,4 +443,16 @@ class Ordentrabajo extends BaseController
|
||||
$color = $this->produccionService->init($orden_trabajo_id)->getOtColorStatus();
|
||||
return $this->response->setJSON(["color" => $color]);
|
||||
}
|
||||
public function imprimir_codigo_safekat(int $orden_trabajo_id)
|
||||
{
|
||||
helper('file');
|
||||
$barcode = $this->produccionService->init($orden_trabajo_id)->getFileBarCode();
|
||||
return $this->response
|
||||
->setHeader('Content-Type', 'image/png')
|
||||
->setHeader('Content-Disposition', "attachment; filename=CodigoBarrasOT_{$orden_trabajo_id}.png")
|
||||
->setBody($barcode);
|
||||
}
|
||||
public function maquinista_maquinas_view(){}
|
||||
public function maquinista_colas_view(){}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class AddEspiralOrdenTrabajoDates extends Migration
|
||||
{
|
||||
protected array $DATES = [
|
||||
"espiral_at" => [
|
||||
"type" => "DATE",
|
||||
"null" => true,
|
||||
],
|
||||
];
|
||||
protected array $USERS = [
|
||||
"espiral_user_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"constraint" => 10,
|
||||
"null" => true,
|
||||
],
|
||||
];
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addColumn("orden_trabajo_dates", $this->DATES);
|
||||
$this->forge->addColumn("orden_trabajo_users", $this->USERS);
|
||||
foreach ($this->USERS as $key => $value) {
|
||||
$this->forge->addForeignKey([$key],"users",["id"]);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropColumn("orden_trabajo_dates", array_keys($this->DATES));
|
||||
$this->forge->dropColumn("orden_trabajo_users", array_keys($this->USERS));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class AddTableImposicionEsquemas extends Migration
|
||||
{
|
||||
protected array $COLUMNS = [
|
||||
"id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"auto_increment" => true
|
||||
],
|
||||
"name" => [
|
||||
"type" => "VARCHAR",
|
||||
"constraint" => 255,
|
||||
],
|
||||
"rows" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"default" => 0,
|
||||
],
|
||||
"columns" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"default" => 0,
|
||||
],
|
||||
"orientacion" => [
|
||||
"type" => "ENUM",
|
||||
"constraint" => ["H","V"],
|
||||
"default" => "H",
|
||||
],
|
||||
"rotativa" => [
|
||||
"type" => "BOOLEAN",
|
||||
"default" => false,
|
||||
],
|
||||
"cosido" => [
|
||||
"type" => "BOOLEAN",
|
||||
"default" => false,
|
||||
],
|
||||
"svg_schema" => [
|
||||
"type" => "LONGTEXT",
|
||||
"null" => true
|
||||
],
|
||||
];
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
$this->forge->addField($this->COLUMNS);
|
||||
$currenttime = new RawSql("CURRENT_TIMESTAMP");
|
||||
$this->forge->addField([
|
||||
"created_at" => [
|
||||
"type" => "TIMESTAMP",
|
||||
"default" => $currenttime,
|
||||
|
||||
],
|
||||
"updated_at" => [
|
||||
"type" => "TIMESTAMP",
|
||||
"null" => true,
|
||||
|
||||
],
|
||||
"deleted_at" => [
|
||||
"type" => "TIMESTAMP",
|
||||
"null" => true,
|
||||
],
|
||||
]);
|
||||
$this->forge->addPrimaryKey("id");
|
||||
$this->forge->createTable("imposicion_esquemas");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropTable("imposicion_esquemas",true);
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class AddFkEsquemaImposiciones extends Migration
|
||||
{
|
||||
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addColumn("lg_imposiciones", [
|
||||
"imposicion_esquema_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"null" => true
|
||||
]
|
||||
]);
|
||||
$this->forge->addForeignKey(["imposicion_esquema_id"],"imposicion_esquemas",["id"],'SET NULL','SET NULL');
|
||||
$this->forge->processIndexes("lg_imposiciones");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropForeignKey("lg_imposiciones","lg_imposiciones_imposicion_esquema_id_foreign");
|
||||
$this->forge->dropColumn("lg_imposiciones","imposicion_esquema_id");
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Configuracion;
|
||||
|
||||
use App\Models\Configuracion\ImposicionEsquemaModel;
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class Imposicion extends \CodeIgniter\Entity\Entity
|
||||
@ -13,19 +15,36 @@ class Imposicion extends \CodeIgniter\Entity\Entity
|
||||
"orientacion" => null,
|
||||
"maquina" => null,
|
||||
"etiqueta" => null,
|
||||
"imposicion_esquema_id" => null
|
||||
];
|
||||
protected $casts = [
|
||||
"ancho" => "int",
|
||||
"alto" => "int",
|
||||
"unidades" => "?int",
|
||||
"imposicion_esquema_id" => "?int"
|
||||
|
||||
];
|
||||
|
||||
public function getFullName() : string
|
||||
public function getFullName(): string
|
||||
{
|
||||
$ancho_x_alto = $this->attributes["ancho"] ."x". $this->attributes["alto"];
|
||||
$ancho_x_alto = $this->attributes["ancho"] . "x" . $this->attributes["alto"];
|
||||
$unidades = $this->attributes["unidades"] ?? "";
|
||||
$orientacion = $this->attributes["orientacion"] ?? "";
|
||||
return implode("_",[$ancho_x_alto,$unidades,$orientacion]);
|
||||
return implode("_", [$ancho_x_alto, $unidades, $orientacion]);
|
||||
}
|
||||
public function withImposicionEsquema(): self
|
||||
{
|
||||
|
||||
$this->attributes["imposicion_esquema"] = $this->imposicion_esquema();
|
||||
return $this;
|
||||
}
|
||||
public function imposicion_esquema(): ?ImposicionEsquemaEntity
|
||||
{
|
||||
$esquema = null;
|
||||
if ($this->attributes["imposicion_esquema_id"]) {
|
||||
$m = model(ImposicionEsquemaModel::class);
|
||||
$esquema = $m->find($this->attributes["imposicion_esquema_id"]);
|
||||
}
|
||||
return $esquema;
|
||||
}
|
||||
}
|
||||
|
||||
26
ci4/app/Entities/Configuracion/ImposicionEsquemaEntity.php
Normal file
26
ci4/app/Entities/Configuracion/ImposicionEsquemaEntity.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Configuracion;
|
||||
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
class ImposicionEsquemaEntity extends Entity
|
||||
{
|
||||
protected $attributes = [
|
||||
"name" => null,
|
||||
"rows" => null,
|
||||
"columns" => null,
|
||||
"orientacion"=> null,
|
||||
"rotativa"=> null,
|
||||
"cosido"=> null,
|
||||
"svg_schema"=> null
|
||||
];
|
||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||
protected $casts = [
|
||||
"name" => "string",
|
||||
"rows" => "integer",
|
||||
"columns" => "integer",
|
||||
"rotativa"=> "boolean",
|
||||
"cosido"=> "boolean",
|
||||
];
|
||||
}
|
||||
@ -54,4 +54,5 @@ class PresupuestoAcabadosEntity extends \CodeIgniter\Entity\Entity
|
||||
$m = model(TarifaAcabadoModel::class);
|
||||
return $m->find($this->attributes["tarifa_acabado_id"]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,8 +4,10 @@ namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Entities\Clientes\ClienteEntity;
|
||||
use App\Entities\Configuracion\PapelFormatoEntity;
|
||||
use App\Entities\Configuracion\TipoPresupuestoEntity;
|
||||
use App\Models\Clientes\ClienteModel;
|
||||
use App\Models\Configuracion\PapelFormatoModel;
|
||||
use App\Models\Configuracion\TipoPresupuestoModel;
|
||||
use App\Models\Presupuestos\PresupuestoAcabadosModel;
|
||||
use App\Models\Presupuestos\PresupuestoEncuadernacionesModel;
|
||||
use App\Models\Presupuestos\PresupuestoFicheroModel;
|
||||
@ -300,4 +302,15 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
$files = $m->where('presupuesto_id',$this->attributes['id'])->findAll();
|
||||
return $files ?? [];
|
||||
}
|
||||
public function tipo_presupuesto() : ?TipoPresupuestoEntity
|
||||
{
|
||||
$tipo_presupuesto = null;
|
||||
$m = model(TipoPresupuestoModel::class);
|
||||
if($this->attributes["tipo_impresion_id"]){
|
||||
$tipo_presupuesto = $m->find($this->attributes['tipo_impresion_id']);
|
||||
}
|
||||
return $tipo_presupuesto;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -23,11 +23,12 @@ class OrdenTrabajoDateEntity extends Entity
|
||||
"entrada_manipulado_at" => null,
|
||||
"cosido_at" => null,
|
||||
"solapa_at" => null,
|
||||
"cosido_at" => null,
|
||||
"grapado_at" => null,
|
||||
"retractilado_at"=> null,
|
||||
"retractilado5_at"=> null,
|
||||
"prototipo_at"=> null,
|
||||
"marcapaginas_at"=> null,
|
||||
"espiral_at"=> null,
|
||||
//FERRO
|
||||
"pendiente_ferro_at" => null,
|
||||
"ferro_en_cliente_at" => null,
|
||||
|
||||
@ -74,6 +74,11 @@ class OrdenTrabajoEntity extends Entity
|
||||
$m = model(OrdenTrabajoTarea::class);
|
||||
return $m->where("orden_trabajo_id", $this->attributes["id"])->findAll();
|
||||
}
|
||||
public function tareas_impresion(): array
|
||||
{
|
||||
$m = model(OrdenTrabajoTarea::class);
|
||||
return $m->where("orden_trabajo_id", $this->attributes["id"])->where("presupuesto_linea_id IS NOT NULL", NULL, FALSE)->findAll() ?? [];
|
||||
}
|
||||
/**
|
||||
* Devuelve el pedido de la orden de trabajo
|
||||
*
|
||||
@ -116,6 +121,14 @@ class OrdenTrabajoEntity extends Entity
|
||||
$barcodeData = $barcode->getBarcode($this->pedido()->presupuesto()->id);
|
||||
return base64_encode($renderer->render($barcodeData, 200, 50));
|
||||
}
|
||||
public function getBarCodeFile()
|
||||
{
|
||||
$barcode = new TypeCode128();
|
||||
$renderer = new PngRenderer();
|
||||
$renderer->setBackgroundColor([255, 255, 255]); // Give a color blue for the background, default is transparent. Give it as 3 times 0-255 values for red, green and blue.
|
||||
$barcodeData = $barcode->getBarcode($this->pedido()->presupuesto()->id);
|
||||
return ($renderer->render($barcodeData, 200, 50));
|
||||
}
|
||||
public function files(): array
|
||||
{
|
||||
$m = model(OrdenTrabajoFileModel::class);
|
||||
@ -139,13 +152,25 @@ class OrdenTrabajoEntity extends Entity
|
||||
helper('filesystem');
|
||||
$path = WRITEPATH . 'uploads/' . $this->attributes["portada_path"];
|
||||
$portada_path = null;
|
||||
if ($path) {
|
||||
if (file_exists($path)) {
|
||||
$portada_path = $path;
|
||||
} else {
|
||||
$portada_path = null;
|
||||
if ($this->attributes["portada_path"]) {
|
||||
if ($path) {
|
||||
if (file_exists($path)) {
|
||||
$portada_path = $path;
|
||||
} else {
|
||||
$portada_path = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $portada_path;
|
||||
}
|
||||
public function getEstadoText(): string
|
||||
{
|
||||
$estados = [
|
||||
"E" => lang('Produccion.error'),
|
||||
"I" => lang('Produccion.iniciada'),
|
||||
"F" => lang('Produccion.finalizada'),
|
||||
"PM" => lang("Produccion.pendiente_material")
|
||||
];
|
||||
return $estados[$this->attributes["estado"]];
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,6 +32,8 @@ class OrdenTrabajoUserEntity extends Entity
|
||||
"retractilado5_user_id" => null,
|
||||
"prototipo_user_id" => null,
|
||||
"marcapaginas_user_id" => null,
|
||||
"espiral_user_id" => null,
|
||||
|
||||
//FERRO
|
||||
"pendiente_ferro_user_id" => null,
|
||||
"ferro_en_cliente_user_id" => null,
|
||||
|
||||
@ -45,4 +45,9 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity
|
||||
$ta_maquinas = $m->where('tarifa_acabado_id',$this->attributes['id'])->findAll();
|
||||
return array_map(fn(TarifaAcabadoMaquinaEntity $ta_maquina) => $ta_maquina->maquina(),$ta_maquinas);
|
||||
}
|
||||
|
||||
public function isUVI(): bool
|
||||
{
|
||||
return in_array($this->attributes["code"],["R3D","R2D"]);
|
||||
}
|
||||
}
|
||||
|
||||
7
ci4/app/Language/en/Imposiciones.php
Normal file
7
ci4/app/Language/en/Imposiciones.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
|
||||
|
||||
];
|
||||
@ -1,4 +1,47 @@
|
||||
<?php
|
||||
|
||||
// override core en language system validation or define your own en language validation message
|
||||
return [];
|
||||
return [
|
||||
'alpha' => 'The {field} field may only contain alphabetical characters.',
|
||||
'alpha_dash' => 'The {field} field may only contain alphanumeric characters, underscores, and dashes.',
|
||||
'alpha_numeric' => 'The {field} field may only contain alphanumeric characters.',
|
||||
'alpha_numeric_punct' => 'The {field} field may only contain alphanumeric characters, spaces, and punctuation: ~!#$%&*-_+=|:.',
|
||||
'alpha_numeric_space' => 'The {field} field may only contain alphanumeric characters and spaces.',
|
||||
'alpha_space' => 'The {field} field may only contain alphabetical characters and spaces.',
|
||||
'decimal' => 'The {field} field must contain a decimal number.',
|
||||
'differs' => 'The {field} field must differ from the {param} field.',
|
||||
'exact_length' => 'The {field} field must be exactly {param} characters in length.',
|
||||
'field_exists' => 'The {field} field must exist.',
|
||||
'greater_than' => 'The {field} field must be greater than {param}.',
|
||||
'greater_than_equal_to' => 'The {field} field must be greater than or equal to {param}.',
|
||||
'hex' => 'The {field} field may only contain hexadecimal characters.',
|
||||
'if_exist' => 'The {field} field will be validated only if it exists.',
|
||||
'in_list' => 'The {field} field must be one of: {param}.',
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'is_natural' => 'The {field} field must only contain natural numbers.',
|
||||
'is_natural_no_zero' => 'The {field} field must only contain natural numbers greater than zero.',
|
||||
'is_not_unique' => 'The {field} field value already exists in the database.',
|
||||
'is_unique' => 'The {field} field value must be unique.',
|
||||
'less_than' => 'The {field} field must be less than {param}.',
|
||||
'less_than_equal_to' => 'The {field} field must be less than or equal to {param}.',
|
||||
'matches' => 'The {field} field does not match the {param} field.',
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
'min_length' => 'The {field} field must be at least {param} characters in length.',
|
||||
'not_in_list' => 'The {field} field must not be one of: {param}.',
|
||||
'numeric' => 'The {field} field must contain only numeric characters.',
|
||||
'permit_empty' => 'The {field} field may be empty.',
|
||||
'regex_match' => 'The {field} field format is invalid.',
|
||||
'required' => 'The {field} field is required.',
|
||||
'required_with' => 'The {field} field is required when {param} is present.',
|
||||
'required_without' => 'The {field} field is required when {param} is absent.',
|
||||
'string' => 'The {field} field must be a string.',
|
||||
'timezone' => 'The {field} field must be a valid timezone.',
|
||||
'valid_base64' => 'The {field} field must contain a valid Base64 string.',
|
||||
'valid_cc_number' => 'The {field} must be a valid credit card number for the specified provider.',
|
||||
'valid_date' => 'The {field} field must contain a valid date in the format {param}.',
|
||||
'valid_email' => 'The {field} field must contain a valid email address.',
|
||||
'valid_emails' => 'All values in the {field} field must be valid email addresses.',
|
||||
'valid_ip' => 'The {field} field must contain a valid {param} IP address.',
|
||||
'valid_json' => 'The {field} field must contain a valid JSON string.',
|
||||
'valid_url' => 'The {field} field must contain a valid URL.',
|
||||
'valid_url_strict' => 'The {field} field must contain a valid URL using one of these schemas: {param}.',
|
||||
];
|
||||
|
||||
@ -834,4 +834,9 @@ return [
|
||||
"menu_soporte_ticket_list" => "Mis tickets",
|
||||
"me" => "Yo",
|
||||
|
||||
"menu_maquinista" => "Maquinista",
|
||||
"menu_maquinista_maquinas" => "Máquinas",
|
||||
"menu_maquinista_colas" => "Colas",
|
||||
"menu_maquinista_mantenimiento" => "Mantenimiento",
|
||||
|
||||
];
|
||||
38
ci4/app/Language/es/Imposiciones.php
Normal file
38
ci4/app/Language/es/Imposiciones.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
"imposicionList" => "Lista imposiciones",
|
||||
"id" => "id",
|
||||
"ancho" => "Ancho",
|
||||
"alto" => "Alto",
|
||||
"unidades" => "Unidades",
|
||||
"orientacion" => "Orientación",
|
||||
"maquina" => "Máquina",
|
||||
"etiqueta" => "Etiqueta",
|
||||
"imposicion" => "Imposición",
|
||||
"btnNewImposicion" => "Nueva imposición",
|
||||
"btnNewImposicionEsquema" => "Nuevo esquema",
|
||||
"H" => "Horizontal",
|
||||
"V" => "Vertical",
|
||||
"imposicion_esquemas" => "Esquemas",
|
||||
"imposicion_esquema" => "Esquema",
|
||||
"imposicion_esquema_drawing" => "Esquema imposicion dibujo",
|
||||
"imposicion_esquema_link" => "Imposicion esquema link",
|
||||
|
||||
"validation" => [
|
||||
"alto" => [
|
||||
"required" => "Este campo es obligatorio",
|
||||
],
|
||||
"ancho" => [
|
||||
"required" => "Este campo es obligatorio",
|
||||
]
|
||||
],
|
||||
"esquema" => [
|
||||
"name" => "Nombre",
|
||||
"rows" => "Filas",
|
||||
"columns" => "Columnas",
|
||||
"rotativa" => "Rotativa",
|
||||
"cosido" => "Cosido/Grapado"
|
||||
]
|
||||
];
|
||||
@ -71,6 +71,7 @@ return [
|
||||
"tiempo_consumido" => "Tiempo consumido",
|
||||
"tiempo_estimado" => "Tiempo estimado",
|
||||
"finalizar_orden" => "Finalizar orden",
|
||||
"reactivar_orden" => "Reactivar",
|
||||
"comments" => "Comentarios orden trabajo",
|
||||
"preview_pdf" => "Previsualizar PDF",
|
||||
"imprimir_codigo_safekat" => "Imprimir código SAFEKAT",
|
||||
@ -105,13 +106,22 @@ return [
|
||||
"pre_codbarras" => "Revisión código barras",
|
||||
"pre_imposicion" => "Revisión imposición",
|
||||
|
||||
|
||||
"iniciada" => "Iniciada",
|
||||
"finalizada" => "Finalizada",
|
||||
"error" => "Error",
|
||||
"pendiente_material" => "Pendiente material",
|
||||
"empty" => "Vacio",
|
||||
|
||||
"errors" => [
|
||||
"date_not_exist" => "Esta fecha no existe en el modelo",
|
||||
"attr_not_exist" => "El atributo {0,string} no pertenece al modelo Pedido"
|
||||
|
||||
]
|
||||
],
|
||||
|
||||
"progress_preimpresion" => "Preimpresión",
|
||||
"progress_logistica" => "Ferro/Logística",
|
||||
"progress_impresion" => "Impresión",
|
||||
"progress_manipulado" => "Manipulado/Acabado"
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,47 @@
|
||||
<?php
|
||||
|
||||
// override core en language system validation or define your own en language validation message
|
||||
return [];
|
||||
return [
|
||||
'alpha' => 'El campo {field} solo puede contener caracteres alfabéticos.',
|
||||
'alpha_dash' => 'El campo {field} solo puede contener caracteres alfanuméricos, guiones y guiones bajos.',
|
||||
'alpha_numeric' => 'El campo {field} solo puede contener caracteres alfanuméricos.',
|
||||
'alpha_numeric_punct' => 'El campo {field} solo puede contener caracteres alfanuméricos, espacios y los siguientes signos de puntuación: ~!#$%&*-_+=|:.',
|
||||
'alpha_numeric_space' => 'El campo {field} solo puede contener caracteres alfanuméricos y espacios.',
|
||||
'alpha_space' => 'El campo {field} solo puede contener caracteres alfabéticos y espacios.',
|
||||
'decimal' => 'El campo {field} debe contener un número decimal.',
|
||||
'differs' => 'El campo {field} debe ser diferente al campo {param}.',
|
||||
'exact_length' => 'El campo {field} debe tener exactamente {param} caracteres.',
|
||||
'field_exists' => 'El campo {field} debe existir.',
|
||||
'greater_than' => 'El campo {field} debe ser mayor que {param}.',
|
||||
'greater_than_equal_to' => 'El campo {field} debe ser mayor o igual que {param}.',
|
||||
'hex' => 'El campo {field} solo puede contener caracteres hexadecimales.',
|
||||
'if_exist' => 'El campo {field} se validará solo si existe.',
|
||||
'in_list' => 'El campo {field} debe ser uno de los siguientes: {param}.',
|
||||
'integer' => 'El campo {field} debe contener un número entero.',
|
||||
'is_natural' => 'El campo {field} solo puede contener números naturales.',
|
||||
'is_natural_no_zero' => 'El campo {field} solo puede contener números naturales mayores que cero.',
|
||||
'is_not_unique' => 'El valor del campo {field} ya existe en la base de datos.',
|
||||
'is_unique' => 'El valor del campo {field} debe ser único.',
|
||||
'less_than' => 'El campo {field} debe ser menor que {param}.',
|
||||
'less_than_equal_to' => 'El campo {field} debe ser menor o igual que {param}.',
|
||||
'matches' => 'El campo {field} no coincide con el campo {param}.',
|
||||
'max_length' => 'El campo {field} no puede superar los {param} caracteres.',
|
||||
'min_length' => 'El campo {field} debe tener al menos {param} caracteres.',
|
||||
'not_in_list' => 'El campo {field} no debe ser uno de los siguientes: {param}.',
|
||||
'numeric' => 'El campo {field} solo puede contener caracteres numéricos.',
|
||||
'permit_empty' => 'El campo {field} puede estar vacío.',
|
||||
'regex_match' => 'El campo {field} no tiene el formato correcto.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
'required_with' => 'El campo {field} es obligatorio cuando {param} está presente.',
|
||||
'required_without' => 'El campo {field} es obligatorio cuando {param} no está presente.',
|
||||
'string' => 'El campo {field} debe ser una cadena de texto.',
|
||||
'timezone' => 'El campo {field} debe contener una zona horaria válida.',
|
||||
'valid_base64' => 'El campo {field} debe contener una cadena Base64 válida.',
|
||||
'valid_cc_number' => 'El campo {field} debe contener un número de tarjeta de crédito válido para el proveedor especificado.',
|
||||
'valid_date' => 'El campo {field} debe contener una fecha válida con el formato {param}.',
|
||||
'valid_email' => 'El campo {field} debe contener una dirección de correo electrónico válida.',
|
||||
'valid_emails' => 'Todos los valores del campo {field} deben ser direcciones de correo electrónico válidas.',
|
||||
'valid_ip' => 'El campo {field} debe contener una dirección IP válida del tipo {param}.',
|
||||
'valid_json' => 'El campo {field} debe contener una cadena JSON válida.',
|
||||
'valid_url' => 'El campo {field} debe contener una URL válida.',
|
||||
'valid_url_strict' => 'El campo {field} debe contener una URL válida con el esquema: {param}.',
|
||||
];
|
||||
|
||||
123
ci4/app/Models/Configuracion/ImposicionEsquemaModel.php
Normal file
123
ci4/app/Models/Configuracion/ImposicionEsquemaModel.php
Normal file
@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Configuracion;
|
||||
|
||||
use App\Entities\Configuracion\ImposicionEsquemaEntity;
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class ImposicionEsquemaModel extends Model
|
||||
{
|
||||
protected $table = 'imposicion_esquemas';
|
||||
protected $primaryKey = 'id';
|
||||
protected $useAutoIncrement = true;
|
||||
protected $returnType = ImposicionEsquemaEntity::class;
|
||||
protected $useSoftDeletes = true;
|
||||
protected $protectFields = true;
|
||||
protected $allowedFields = [
|
||||
"name",
|
||||
"rows",
|
||||
"columns",
|
||||
"orientacion",
|
||||
"rotativa",
|
||||
"cosido",
|
||||
"svg_schema"
|
||||
];
|
||||
|
||||
protected bool $allowEmptyInserts = false;
|
||||
protected bool $updateOnlyChanged = true;
|
||||
|
||||
protected array $casts = [];
|
||||
protected array $castHandlers = [];
|
||||
|
||||
// Dates
|
||||
protected $useTimestamps = true;
|
||||
protected $dateFormat = 'datetime';
|
||||
protected $createdField = 'created_at';
|
||||
protected $updatedField = 'updated_at';
|
||||
protected $deletedField = 'deleted_at';
|
||||
|
||||
// Validation
|
||||
protected $validationRules = [
|
||||
"name" => [
|
||||
"label" => "Imposiciones.esquema.name",
|
||||
"rules" => "required|alpha_numeric_punct",
|
||||
],
|
||||
"rows" => [
|
||||
"label" => "Imposiciones.esquema.rows",
|
||||
"rules" => "required|integer"
|
||||
],
|
||||
"columns" => [
|
||||
"label" => "Imposiciones.esquema.columns",
|
||||
"rules" => "required|integer"
|
||||
],
|
||||
"orientacion" => [
|
||||
"label" => "Imposiciones.esquema.orientacion",
|
||||
"rules" => "required|in_list[V,H]"
|
||||
],
|
||||
|
||||
];
|
||||
protected $validationMessages = [
|
||||
"name" => [
|
||||
"required" => "Validation.required",
|
||||
],
|
||||
"rows" => [
|
||||
"required" => "Validation.required",
|
||||
"integer" => "Validation.integer",
|
||||
],
|
||||
"columns" => [
|
||||
"required" => "Validation.required",
|
||||
"integer" => "Validation.integer",
|
||||
],
|
||||
"orientacion" => [
|
||||
"required" => "Validation.required",
|
||||
"in_list" => "Validation.in_liust",
|
||||
],
|
||||
];
|
||||
protected $skipValidation = false;
|
||||
protected $cleanValidationRules = true;
|
||||
|
||||
// Callbacks
|
||||
protected $allowCallbacks = true;
|
||||
protected $beforeInsert = [];
|
||||
protected $afterInsert = [];
|
||||
protected $beforeUpdate = [];
|
||||
protected $afterUpdate = [];
|
||||
protected $beforeFind = [];
|
||||
protected $afterFind = [];
|
||||
protected $beforeDelete = [];
|
||||
protected $afterDelete = [];
|
||||
|
||||
public function querySelect(?string $q)
|
||||
{
|
||||
$query = $this->builder()->select([
|
||||
"id",
|
||||
"name",
|
||||
"svg_schema as description"
|
||||
])->where('deleted_at', null);
|
||||
if ($q) {
|
||||
$query->orLike("name", $q);
|
||||
}
|
||||
return $query
|
||||
->orderBy('id', 'ASC')
|
||||
->get()->getResultArray();
|
||||
}
|
||||
public function queryDatatable()
|
||||
{
|
||||
return $this->builder()
|
||||
->select([
|
||||
"id",
|
||||
"name",
|
||||
"svg_schema"
|
||||
|
||||
])->where('deleted_at', null);
|
||||
}
|
||||
public static function datatable_buttons(int $id)
|
||||
{
|
||||
$btn = "";
|
||||
if (auth()->user()->inGroup("admin")) {
|
||||
$btn .= "<a type='button' href='/imposiciones/esquema/edit/{$id}' data-id='{$id}'><i class='ti ti-eye ti-sm'></i></a>";
|
||||
$btn .= "<a type='button'><i class='ti ti-trash ti-sm imposicion-esquema-delete' data-id='{$id}'></i></a>";
|
||||
}
|
||||
return $btn;
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,10 @@
|
||||
|
||||
namespace App\Models\Configuracion;
|
||||
|
||||
class ImposicionModel extends \App\Models\BaseModel
|
||||
use App\Entities\Configuracion\Imposicion;
|
||||
use App\Models\BaseModel;
|
||||
|
||||
class ImposicionModel extends BaseModel
|
||||
{
|
||||
protected $table = "lg_imposiciones";
|
||||
|
||||
@ -23,8 +26,8 @@ class ImposicionModel extends \App\Models\BaseModel
|
||||
7 => "t1.etiqueta",
|
||||
];
|
||||
|
||||
protected $allowedFields = ["ancho", "alto", "unidades", "orientacion", "maquina", "etiqueta"];
|
||||
protected $returnType = "App\Entities\Configuracion\Imposicion";
|
||||
protected $allowedFields = ["ancho", "alto", "unidades", "orientacion", "maquina", "etiqueta","imposicion_esquema_id"];
|
||||
protected $returnType = Imposicion::class;
|
||||
|
||||
public static $labelField = "ancho";
|
||||
|
||||
@ -53,6 +56,10 @@ class ImposicionModel extends \App\Models\BaseModel
|
||||
"label" => "Imposiciones.unidades",
|
||||
"rules" => "integer|permit_empty",
|
||||
],
|
||||
"imposicion_esquema_id" => [
|
||||
"label" => "Imposiciones.imposicion_esquema",
|
||||
"rules" => "integer|permit_empty",
|
||||
],
|
||||
];
|
||||
|
||||
protected $validationMessages = [
|
||||
@ -76,6 +83,9 @@ class ImposicionModel extends \App\Models\BaseModel
|
||||
"unidades" => [
|
||||
"integer" => "Imposiciones.validation.unidades.integer",
|
||||
],
|
||||
"imposicion_esquema_id" => [
|
||||
"integer" => "Imposiciones.validation.unidades.integer",
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
@ -129,4 +139,30 @@ class ImposicionModel extends \App\Models\BaseModel
|
||||
->orderBy('id', 'ASC')
|
||||
->get()->getResultArray();
|
||||
}
|
||||
public function queryDatatable()
|
||||
{
|
||||
return $this->builder()
|
||||
->select([
|
||||
"lg_imposiciones.id",
|
||||
"lg_imposiciones.ancho",
|
||||
"lg_imposiciones.alto",
|
||||
"lg_imposiciones.unidades",
|
||||
"lg_imposiciones.maquina",
|
||||
"lg_imposiciones.orientacion",
|
||||
"lg_imposiciones.etiqueta",
|
||||
"imposicion_esquemas.id as esquemaId",
|
||||
"imposicion_esquemas.name as esquemaName"
|
||||
])
|
||||
->join("imposicion_esquemas","imposicion_esquemas.id = lg_imposiciones.imposicion_esquema_id","left")
|
||||
->where('lg_imposiciones.deleted_at', null);
|
||||
}
|
||||
public static function datatable_buttons(int $id)
|
||||
{
|
||||
$btn = "";
|
||||
if(auth()->user()->inGroup("admin")){
|
||||
$btn.="<a type='button' href='/imposiciones/edit/{$id}' data-id='{$id}'><i class='ti ti-eye ti-sm'></i></a>";
|
||||
$btn.="<a type='button'><i class='ti ti-trash ti-sm imposicion-delete' data-id='{$id}'></i></a>";
|
||||
}
|
||||
return $btn;
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,11 +30,12 @@ class OrdenTrabajoDate extends Model
|
||||
"entrada_manipulado_at",
|
||||
"cosido_at",
|
||||
"solapa_at",
|
||||
"cosido_at",
|
||||
"grapado_at",
|
||||
"retractilado_at",
|
||||
"retractilado5_at",
|
||||
"prototipo_at",
|
||||
"marcapaginas_at",
|
||||
"espiral_at",
|
||||
//FERRO
|
||||
"pendiente_ferro_at",
|
||||
"ferro_en_cliente_at",
|
||||
|
||||
@ -73,7 +73,7 @@ class OrdenTrabajoModel extends Model
|
||||
->select([
|
||||
"ordenes_trabajo.id",
|
||||
"ordenes_trabajo.pedido_id",
|
||||
"orden_trabajo_dates.fecha_encuadernado_at",
|
||||
"pedidos.fecha_encuadernado as fecha_encuadernado_at",
|
||||
"clientes.nombre as cliente_nombre",
|
||||
"presupuestos.titulo as presupuesto_titulo",
|
||||
"ordenes_trabajo.estado",
|
||||
|
||||
@ -36,6 +36,7 @@ class OrdenTrabajoUser extends Model
|
||||
"retractilado5_user_id",
|
||||
"prototipo_user_id",
|
||||
"marcapaginas_user_id",
|
||||
"espiral_user_id",
|
||||
//FERRO
|
||||
"pendiente_ferro_user_id",
|
||||
"ferro_en_cliente_user_id",
|
||||
|
||||
@ -16,6 +16,7 @@ use CodeIgniter\Config\BaseService;
|
||||
use App\Entities\Configuracion\Maquina as MaquinaEntity;
|
||||
use App\Entities\Produccion\OrdenTrabajoFileEntity;
|
||||
use App\Entities\Produccion\OrdenTrabajoTareaEntity;
|
||||
use App\Entities\Tarifas\Acabados\TarifaAcabadoEntity;
|
||||
use App\Models\Configuracion\ConfigVariableModel;
|
||||
use App\Models\Configuracion\MaquinaModel;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoFileModel;
|
||||
@ -34,7 +35,17 @@ use Exception;
|
||||
*/
|
||||
class ProductionService extends BaseService
|
||||
{
|
||||
/**
|
||||
* Tipos de impresion para identificar linea de impresion plana/general
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public array $TIPOS_PLANA = ['lp_bn', 'lp_color', 'lp_colorhq'];
|
||||
/**
|
||||
* Tipos de impresion para idenficiar si es rotativa
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public array $TIPOS_ROTATIVA = ['lp_rot_bn', 'lp_rot_color'];
|
||||
|
||||
protected OrdenTrabajoModel $otModel;
|
||||
@ -46,12 +57,99 @@ class ProductionService extends BaseService
|
||||
protected OrdenTrabajoFileModel $otFileModel;
|
||||
protected PedidoModel $pedidoModel;
|
||||
protected UserModel $userModel;
|
||||
protected string $defaultMaquinaCorteName = 'HT-1000';
|
||||
protected ConfigVariableModel $configVariableModel;
|
||||
protected MaquinaEntity $defaultMaquinaCorte;
|
||||
protected MaquinaModel $maquinaModel;
|
||||
protected OrdenTrabajo $ordenTrabajoConfig;
|
||||
public string $statusColor;
|
||||
|
||||
|
||||
/**
|
||||
* Nombre de la maquina por defecto para realizar la tarea de corte.
|
||||
*
|
||||
* @var string 'HT-1000'
|
||||
*/
|
||||
protected string $defaultMaquinaCorteName = 'HT-1000';
|
||||
/**
|
||||
* Color del header en el formulario de orden de trabajo
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public string $statusColor;
|
||||
/**
|
||||
* Valor límite del POD
|
||||
*
|
||||
* `$this->configVariableModel->getVariable('POD')->value;`
|
||||
* @var integer
|
||||
*/
|
||||
protected int $podValue = 0;
|
||||
/**
|
||||
* Indica si es POD
|
||||
*
|
||||
* `tirada <= podValue`
|
||||
* @var boolean
|
||||
*/
|
||||
protected bool $isPOD = false;
|
||||
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene gofrado
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isGofrado = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene gofrado
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* TODO Hay que implementar un boolean en `lg_tarifa_acabado` para identificar
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isGrapado = true; //TODO
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene espiral
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* TODO Hay que implementar un boolean en `lg_tarifa_manipulado` para identificar
|
||||
* DEFAULT true hasta implementacion
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isEspiral = true; //TODO
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene UVI
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isUVI = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene plastificado
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* TODO Hay que implementar un boolean en `lg_tarifa_acabado` para identificar
|
||||
* DEFAULT true hasta implementacion
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isPlastificado = true; //TODO
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene cubierta
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isCubierta = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si la impresion es en color
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isColor = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si la impresion es en bn
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isBN = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si hay una tarea de corte
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* ! Se añade por defecto siempre en una rotativa una tarea de corte
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isCorte = false; //* CHECK DONE
|
||||
/**
|
||||
* Pedido Entity
|
||||
*
|
||||
@ -76,11 +174,13 @@ class ProductionService extends BaseService
|
||||
$this->pedidoModel = model(PedidoModel::class);
|
||||
$this->ordenTrabajoConfig = config('OrdenTrabajo');
|
||||
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["sin_imprimir"];
|
||||
$this->configVariableModel = model(ConfigVariableModel::class);
|
||||
$this->podValue = $this->configVariableModel->getVariable('POD')->value;
|
||||
}
|
||||
|
||||
public function init(int $orden_trabajo_id): self
|
||||
{
|
||||
try {
|
||||
//code...
|
||||
$this->maquinaModel = model(MaquinaModel::class);
|
||||
$this->otModel = model(OrdenTrabajoModel::class);
|
||||
$this->ot = $this->otModel->find($orden_trabajo_id);
|
||||
@ -88,9 +188,9 @@ class ProductionService extends BaseService
|
||||
$this->setPedido($pedido);
|
||||
$this->defaultMaquinaCorte = $this->maquinaModel->where('nombre', $this->defaultMaquinaCorteName)->first();
|
||||
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["sin_imprimir"];
|
||||
$this->updateProgress();
|
||||
return $this;
|
||||
} catch (\Throwable $th) {
|
||||
dd($orden_trabajo_id);
|
||||
throw $th;
|
||||
}
|
||||
}
|
||||
@ -107,6 +207,7 @@ class ProductionService extends BaseService
|
||||
$this->otModel = model(OrdenTrabajoModel::class);
|
||||
$this->otDate = model(OrdenTrabajoDate::class);
|
||||
$this->otTarea = model(OrdenTrabajoTarea::class);
|
||||
$this->isPOD = $this->presupuesto->tirada <= $this->podValue;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
@ -141,10 +242,10 @@ class ProductionService extends BaseService
|
||||
];
|
||||
$id = $this->otModel->insert($data);
|
||||
$this->init($id);
|
||||
$this->updatePedidoEspera();
|
||||
$this->storeOrdenTrabajoUsers();
|
||||
$this->storeOrdenTrabajoDates();
|
||||
$this->storeAllTareas();
|
||||
$this->updatePedidoEspera();
|
||||
return $this->ot;
|
||||
}
|
||||
|
||||
@ -171,12 +272,49 @@ class ProductionService extends BaseService
|
||||
$this->otDate->updateUserDateMap($this->ot->id, $data);
|
||||
return $otDateId;
|
||||
}
|
||||
/**
|
||||
* Crea un registro en `orden_trabajo_users`
|
||||
*
|
||||
* @return integer|boolean|string
|
||||
*/
|
||||
protected function storeOrdenTrabajoUsers(): int|bool|string
|
||||
{
|
||||
return $this->otUser->insert([
|
||||
"orden_trabajo_id" => $this->ot->id,
|
||||
]);
|
||||
}
|
||||
/**
|
||||
* Crea un registro en `orden_trabajo_users` si no ha sido creado previamente
|
||||
*
|
||||
* @return integer|boolean|string
|
||||
*/
|
||||
public function reInsertOrdenTrabajoUsers(): int|bool|string
|
||||
{
|
||||
$status = false;
|
||||
if ($this->otUser->where('orden_trabajo_id', $this->ot->id)->countAllResults() == 0) {
|
||||
$status = $this->storeOrdenTrabajoUsers();
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
/**
|
||||
* Crea un registro en `orden_trabajo_dates` si no ha sido creado previamente
|
||||
*
|
||||
* @return integer|boolean|string
|
||||
*/
|
||||
public function reInsertOrdenTrabajoDates(): int|bool|string
|
||||
{
|
||||
$status = false;
|
||||
if ($this->otDate->where('orden_trabajo_id', $this->ot->id)->countAllResults() == 0) {
|
||||
$status = $this->storeOrdenTrabajoDates();
|
||||
$this->resetAllTareas();
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
/**
|
||||
* General las correspondientes tareas de la orden de trabajo en la table `orden_trabajo_tareas`
|
||||
*
|
||||
* @return integer|boolean|string
|
||||
*/
|
||||
protected function storeAllTareas()
|
||||
{
|
||||
$this->storeOrdenTrabajoTareas();
|
||||
@ -186,6 +324,12 @@ class ProductionService extends BaseService
|
||||
$this->storeOrdenTrabajoEncuadernacionTareas();
|
||||
// $this->storeOrdenTrabajoExtraTareas();
|
||||
}
|
||||
/**
|
||||
* Regenera las tareas.
|
||||
* !! Se eliminan las que hay previamente sin `softDelete`
|
||||
*
|
||||
* @return integer|boolean|string
|
||||
*/
|
||||
public function resetAllTareas(): BaseResult|bool
|
||||
{
|
||||
$r = $this->otTarea->where("orden_trabajo_id", $this->ot->id)->delete(purge: true);
|
||||
@ -222,6 +366,12 @@ class ProductionService extends BaseService
|
||||
}
|
||||
return $insert_query_result;
|
||||
}
|
||||
/**
|
||||
* Inserta una tarea de corte si la impresion es en `rotativa`
|
||||
*
|
||||
* @param PresupuestoLineaEntity $pLinea
|
||||
* @return OrdenTrabajoTareaEntity|null
|
||||
*/
|
||||
protected function storeTareaCorte(PresupuestoLineaEntity $pLinea): ?OrdenTrabajoTareaEntity
|
||||
{
|
||||
$otCorte = null;
|
||||
@ -242,6 +392,11 @@ class ProductionService extends BaseService
|
||||
return $otCorte;
|
||||
}
|
||||
|
||||
/**
|
||||
* General las tareas de acabado segun las líneas de presupuesto_acabados
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function storeOrdenTrabajoAcabadoTareas(): bool
|
||||
{
|
||||
$p_lineas = $this->presupuesto_lineas_acabado();
|
||||
@ -268,6 +423,11 @@ class ProductionService extends BaseService
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* General las tareas de acabado segun las líneas de presupuesto_manipulados
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function storeOrdenTrabajoManipuladoTareas(): bool
|
||||
{
|
||||
$p_lineas = $this->presupuesto_lineas_manipulado();
|
||||
@ -294,6 +454,11 @@ class ProductionService extends BaseService
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* General las tareas de acabado segun las líneas de presupuesto_preimpresion
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function storeOrdenTrabajoPreimpresionTareas(): bool
|
||||
{
|
||||
$p_lineas = $this->presupuesto_lineas_preimpresion();
|
||||
@ -320,6 +485,11 @@ class ProductionService extends BaseService
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* General las tareas de acabado segun las líneas de presupuesto_encuadernaciones
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function storeOrdenTrabajoEncuadernacionTareas(): bool
|
||||
{
|
||||
$p_lineas = $this->presupuesto_lineas_encuadernaciones();
|
||||
@ -666,6 +836,10 @@ class ProductionService extends BaseService
|
||||
"peso_pedido" => $logistica_data["peso_pedido"],
|
||||
"imposicion" => $this->getImposicionTareaImpresion(),
|
||||
"tiempo_procesamiento" => $this->getTiempoProcesamientoHHMM(),
|
||||
"tiempo_impresion" => $this->getTiempoTareasImpresionHHMM(),
|
||||
"colors" => $this->getPdfColors(),
|
||||
"isPOD" => $this->isPOD,
|
||||
"uvi" => $this->getUVI()
|
||||
|
||||
];
|
||||
}
|
||||
@ -757,8 +931,8 @@ class ProductionService extends BaseService
|
||||
{
|
||||
$result = [];
|
||||
$otDate = $this->otDate->where('orden_trabajo_id', $this->ot->id)
|
||||
->set([$data['name'] => $data[$data['name']]])
|
||||
->update($data);
|
||||
->set($data['name'], $data[$data['name']])
|
||||
->update();
|
||||
$this->otDate->updateUserDateMap($this->ot->id, $data);
|
||||
$ot_users = $this->ot->users();
|
||||
if (isset($this->ordenTrabajoConfig->DATE_USER_MAPPING[$data["name"]])) {
|
||||
@ -1063,7 +1237,7 @@ class ProductionService extends BaseService
|
||||
$status = false;
|
||||
$presupuestoFiles = $this->presupuesto->files();
|
||||
if (count($presupuestoFiles) == 0) {
|
||||
$status = $this->otModel->update($this->ot->id, ['pedido_espera' => true]);
|
||||
$status = $this->otModel->update($this->ot->id, ['is_pedido_espera' => true]);
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
@ -1094,12 +1268,34 @@ class ProductionService extends BaseService
|
||||
}
|
||||
return $pedidoUserDates;
|
||||
}
|
||||
public function getTiempoProcesamientoHHMM(): string
|
||||
public function getTiempoProcesamientoHHMM(): ?string
|
||||
{
|
||||
$time_tareas_seconds = array_map(fn($q) => $q->tiempo_estimado ?? 0, $this->ot->tareas());
|
||||
$seconds = array_sum($time_tareas_seconds);
|
||||
return float_seconds_to_hhmm_string($seconds);
|
||||
}
|
||||
public function getTiempoTareasImpresionHHMM(): string
|
||||
{
|
||||
$tareas_impresion = $this->ot->tareas_impresion();
|
||||
$tiempo_seconds = 0;
|
||||
foreach ($tareas_impresion as $key => $tarea) {
|
||||
if ($tarea->is_corte == false) {
|
||||
$tiempo_seconds += $tarea->tiempo_estimado;
|
||||
}
|
||||
}
|
||||
return float_seconds_to_hhmm_string($tiempo_seconds);
|
||||
}
|
||||
public function getUVI(): ?TarifaAcabadoEntity
|
||||
{
|
||||
$uvi = null;
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
if ($acabado->tarifa()->isUVI()) {
|
||||
$uvi = $acabado->tarifa();
|
||||
}
|
||||
}
|
||||
return $uvi;
|
||||
}
|
||||
public function updateProgress(): bool
|
||||
{
|
||||
$userDates = $this->ordenTrabajoConfig->DATE_USER_MAPPING;
|
||||
@ -1109,15 +1305,18 @@ class ProductionService extends BaseService
|
||||
$status = false;
|
||||
$total = count($userDates) + count($pedidoUserDates);
|
||||
if ($this->ot->estado != "F") {
|
||||
foreach ($userDates as $key => $value) {
|
||||
if ($this->ot->dates()->{$key} != null) $fill_dates++;
|
||||
}
|
||||
foreach ($pedidoUserDates as $key => $value) {
|
||||
if ($this->pedido->{$key} != null) $fill_dates++;
|
||||
}
|
||||
if ($this->ot->dates()) {
|
||||
|
||||
$progreso = (float) $fill_dates / $total * 100;
|
||||
$status = $this->otModel->update($this->ot->id, ["progreso" => round($progreso, 2)]);
|
||||
foreach ($userDates as $key => $value) {
|
||||
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 {
|
||||
$status = $this->otModel->update($this->ot->id, ["progreso" => 100]);
|
||||
}
|
||||
@ -1125,7 +1324,7 @@ class ProductionService extends BaseService
|
||||
}
|
||||
public function getOtColorStatus(): string
|
||||
{
|
||||
if($this->ot->dates()){
|
||||
if ($this->ot->dates()) {
|
||||
$this->updateColor();
|
||||
}
|
||||
return $this->statusColor;
|
||||
@ -1190,7 +1389,8 @@ class ProductionService extends BaseService
|
||||
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["grapado"];
|
||||
};
|
||||
}
|
||||
protected function updateColor(){
|
||||
protected function updateColor()
|
||||
{
|
||||
$this->otSinImprimirColor();
|
||||
$this->otImpresionIntColor();
|
||||
$this->otCosidoColor();
|
||||
@ -1202,4 +1402,222 @@ class ProductionService extends BaseService
|
||||
$this->otEncuadernadoColor();
|
||||
$this->otCorteColor();
|
||||
}
|
||||
public function getEncuadernacionCode(): ?string
|
||||
{
|
||||
$code = "";
|
||||
$encuadernaciones = $this->presupuesto->encuadernaciones();
|
||||
if (isset($encuadernaciones[0])) {
|
||||
$code = $encuadernaciones[0]->tarifa()->code;
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
public function getEncuadernacionColor(): array
|
||||
{
|
||||
$color = $this->ordenTrabajoConfig->OT_ENCUADERNACION_COLOR["default"];
|
||||
$encuadernacion_code = $this->getEncuadernacionCode();
|
||||
if ($encuadernacion_code) {
|
||||
if (isset($this->ordenTrabajoConfig->OT_ENCUADERNACION_COLOR[$encuadernacion_code])) {
|
||||
$color = $this->ordenTrabajoConfig->OT_ENCUADERNACION_COLOR[$encuadernacion_code];
|
||||
}
|
||||
}
|
||||
return $color;
|
||||
}
|
||||
public function getWeekDayColor(): array
|
||||
{
|
||||
$color = $this->ordenTrabajoConfig->OT_WEEK_COLOR_DAY[0];
|
||||
if ($this->ot->pedido()->fecha_encuadernado) {
|
||||
$week_day = Time::createFromFormat("Y-m-d H:i:s", $this->ot->pedido()->fecha_encuadernado)->getDayOfWeek();
|
||||
$color = $this->ordenTrabajoConfig->OT_WEEK_COLOR_DAY[$week_day];
|
||||
}
|
||||
return $color;
|
||||
}
|
||||
public function getGeneralBackgroundColor()
|
||||
{
|
||||
$color = $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['default'];
|
||||
$is_ferro_or_prototipo = ($this->presupuesto->ferro || $this->presupuesto->ferro_digital || $this->presupuesto->prototipo);
|
||||
$color = $is_ferro_or_prototipo ? $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['ferro'] : $color;
|
||||
$color = $this->isPOD ? $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['pod'] : $color;
|
||||
$color = $this->pedido->inaplazable ? $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['inaplazable'] : $color;
|
||||
return $color;
|
||||
}
|
||||
public function getPapelImpresionBackgroundColor()
|
||||
{
|
||||
$papel = $this->presupuesto->presupuestoLineaImpresion()->papel_generico();
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['default'];
|
||||
$papel_code = $papel->code_ot;
|
||||
if ($papel_code) {
|
||||
if (strpos($papel_code, "BCLOF")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['blanco'];
|
||||
}
|
||||
if (strpos($papel_code, "AH") && $papel->code == "OFF2") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['ahuesado'];
|
||||
}
|
||||
if (strpos($papel_code, "MARF")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['marfil'];
|
||||
}
|
||||
if (strpos($papel_code, "VOLAH")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['volumen_ahuesado'];
|
||||
}
|
||||
if ($papel_code == "EM") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['estucado_mate'];
|
||||
}
|
||||
if ($papel_code == "CGE") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['cartulina'];
|
||||
}
|
||||
}
|
||||
|
||||
return $color;
|
||||
}
|
||||
public function getPapelImpresionCubiertaBackgroundColor()
|
||||
{
|
||||
$papel = $this->presupuesto->presupuestoLineaCubierta()->papel_generico();
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['default'];
|
||||
$papel_code = $papel->code_ot;
|
||||
if ($papel_code) {
|
||||
if (strpos($papel_code, "BCLOF")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['blanco'];
|
||||
}
|
||||
if (strpos($papel_code, "AH") && $papel->code == "OFF2") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['ahuesado'];
|
||||
}
|
||||
if (strpos($papel_code, "MARF")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['marfil'];
|
||||
}
|
||||
if (strpos($papel_code, "VOLAH")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['volumen_ahuesado'];
|
||||
}
|
||||
if ($papel_code == "EM") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['estucado_mate'];
|
||||
}
|
||||
if ($papel_code == "CGE") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['cartulina'];
|
||||
}
|
||||
}
|
||||
return $color;
|
||||
}
|
||||
public function getPlastificadoColor()
|
||||
{
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['default'];
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
$tarifa_acabado = $acabado->tarifa();
|
||||
if ($tarifa_acabado->code) {
|
||||
$plastificado_code = $tarifa_acabado->code;
|
||||
if ($plastificado_code == "BRIL") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['BRIL'];
|
||||
}
|
||||
if ($plastificado_code == "MATE") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['MATE'];
|
||||
}
|
||||
if ($plastificado_code == "ANTI") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['ANTIRAYADO'];
|
||||
}
|
||||
if ($plastificado_code == "SAND") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['SANDY'];
|
||||
}
|
||||
if ($plastificado_code == "GOF") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['GOFRADO'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $color;
|
||||
}
|
||||
public function getImpresionInteriorPPALColor()
|
||||
{
|
||||
$isRotativa = $this->presupuesto->presupuestoLineaImpresion()->isRotativa();
|
||||
$color = $isRotativa ? $this->ordenTrabajoConfig->OT_IMPRESION_INTERIOR_PPAL_COLOR['ROTATIVA'] : $this->ordenTrabajoConfig->OT_IMPRESION_INTERIOR_PPAL_COLOR['GENERAL'];
|
||||
$color = $this->isPOD ? $this->ordenTrabajoConfig->OT_IMPRESION_INTERIOR_PPAL_COLOR['POD'] : $color;
|
||||
return $color;
|
||||
}
|
||||
public function getPdfColors(): array
|
||||
{
|
||||
return [
|
||||
"general" => $this->getGeneralBackgroundColor(),
|
||||
"week_day" => $this->getWeekDayColor(),
|
||||
"ot" => $this->getEncuadernacionColor(),
|
||||
"papel_interior" => $this->getPapelImpresionBackgroundColor(),
|
||||
"papel_cubierta" => $this->getPapelImpresionCubiertaBackgroundColor(),
|
||||
"plastificado" => $this->getPlastificadoColor(),
|
||||
"impresion_interior_ppal" => $this->getImpresionInteriorPPALColor()
|
||||
];
|
||||
}
|
||||
|
||||
public function getFlags()
|
||||
{
|
||||
$this->color();
|
||||
return [
|
||||
"isGofrado" => $this->gofrado(),
|
||||
"isEspiral" => $this->isEspiral,
|
||||
"isUVI" => $this->uvi(),
|
||||
"isPlastificado" => $this->isPlastificado,
|
||||
"isCubierta" => $this->cubierta(),
|
||||
"isColor" => $this->isColor,
|
||||
"isBN" => $this->isBN,
|
||||
"isCorte" => $this->corte(),
|
||||
"isGrapado" => $this->isGrapado
|
||||
];
|
||||
}
|
||||
public function gofrado(): bool
|
||||
{
|
||||
$flag = false;
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
$tarifa_acabado = $acabado->tarifa();
|
||||
if ($tarifa_acabado->code) {
|
||||
$plastificado_code = $tarifa_acabado->code;
|
||||
if ($plastificado_code == "GOF") {
|
||||
$flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->isGofrado = $flag;
|
||||
return $this->isGofrado;
|
||||
}
|
||||
public function uvi(): bool
|
||||
{
|
||||
$flag = false;
|
||||
$tarifa_acabado_uvi = $this->getUVI();
|
||||
if ($tarifa_acabado_uvi) {
|
||||
$flag = true;
|
||||
}
|
||||
$this->isUVI = $flag;
|
||||
return $this->isUVI;
|
||||
}
|
||||
public function cubierta(): bool
|
||||
{
|
||||
$lineaCubierta = $this->presupuesto->presupuestoLineaCubierta();
|
||||
if ($lineaCubierta) {
|
||||
$this->isCubierta = true;
|
||||
}
|
||||
return $this->isCubierta;
|
||||
}
|
||||
public function color(): bool
|
||||
{
|
||||
$linea_impresion = $this->presupuesto->presupuestoLineaImpresion();
|
||||
if ($linea_impresion) {
|
||||
if ($linea_impresion->isColor()) {
|
||||
$this->isColor = true;
|
||||
$this->isBN = false;
|
||||
} else {
|
||||
$this->isColor = false;
|
||||
$this->isBN = true;
|
||||
}
|
||||
}
|
||||
return $this->isColor;
|
||||
}
|
||||
public function corte(): bool
|
||||
{
|
||||
$ot_tareas = $this->ot->tareas();
|
||||
foreach ($ot_tareas as $key => $tarea) {
|
||||
if ($tarea->is_corte) {
|
||||
$this->isCorte = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $this->isCorte;
|
||||
}
|
||||
public function getFileBarCode(){
|
||||
return $this->ot->getBarCodeFile();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="modalNewImposicion" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalTitleNew"><?= lang('Imposiciones.btnNewImposicion') ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form class="mb-3 section-block" id="form-imposicion" method="post">
|
||||
<div class="modal-body">
|
||||
<?= view("themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems") ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-label-secondary" data-bs-dismiss="modal"><?= lang('App.global_come_back') ?></button>
|
||||
<button type="button" id="btnSubmitNewImposicion" class="btn btn-primary float-end"><?= lang("Basic.global.Save") ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,12 @@
|
||||
<table id="imposicion-esquema-table" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Imposiciones.id') ?></th>
|
||||
<th><?= lang('Imposiciones.esquema.name') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@ -0,0 +1,64 @@
|
||||
<div class="row">
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.esquema.name') ?>
|
||||
</label>
|
||||
<input type="text" name="name" maxlength="255" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="orientacion" class="form-label">
|
||||
<?= lang('Imposiciones.orientacion') ?>
|
||||
</label>
|
||||
<select id="esquema-orientacion" class="form-control" name="orientacion" data-input>
|
||||
<option value="H" default><?= lang("Imposiciones.H") ?></option>
|
||||
<option value="V"><?= lang("Imposiciones.V") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="esquema-rows"class="form-label">
|
||||
<?= lang('Imposiciones.esquema.rows') ?>
|
||||
</label>
|
||||
<input type="number" id="esquema-rows" name="rows" max="5" value="1" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="esquema-columns" class="form-label">
|
||||
<?= lang('Imposiciones.esquema.columns') ?>
|
||||
</label>
|
||||
<input type="number" id="esquema-columns" name="columns" max="5" class="form-control" value="1" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="col-lg-2 col-md-2 col-xs-12 mb-3">
|
||||
<div class="d-flex flex-column gap-2">
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input" id="esquema-rotativa" name="rotativa" data-input/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
</span>
|
||||
<span class="switch-off">
|
||||
<i class="ti ti-x"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="switch-label">Rotativa</span>
|
||||
</label>
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input" id="esquema-cosido" name="cosido" data-input/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
</span>
|
||||
<span class="switch-off">
|
||||
<i class="ti ti-x"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="switch-label">Cosido/Grapado</span>
|
||||
</label>
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="col-md-12 mt-3">
|
||||
<div class="d-flex justify-content-center w-100 h-100 text-center">
|
||||
<div id="imposicion-esquema-drawing" class="px-2 py-2"></div>
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -1,64 +1,64 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="ancho" class="form-label">
|
||||
<?=lang('Imposiciones.ancho') ?>*
|
||||
</label>
|
||||
<input type="number" id="ancho" name="ancho" required maxLength="11" class="form-control" value="<?=old('ancho', $imposicion->ancho) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="ancho" class="form-label">
|
||||
<?= lang('Imposiciones.ancho') ?>
|
||||
</label>
|
||||
<input type="number" name="ancho" maxLength="11" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="alto" class="form-label">
|
||||
<?=lang('Imposiciones.alto') ?>*
|
||||
</label>
|
||||
<input type="number" id="alto" name="alto" required maxLength="11" class="form-control" value="<?=old('alto', $imposicion->alto) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="alto" class="form-label">
|
||||
<?= lang('Imposiciones.alto') ?>
|
||||
</label>
|
||||
<input type="number" name="alto" maxLength="11" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?=lang('Imposiciones.unidades') ?>
|
||||
</label>
|
||||
<input type="number" id="unidades" name="unidades" maxLength="11" class="form-control" value="<?=old('unidades', $imposicion->unidades) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.unidades') ?>
|
||||
</label>
|
||||
<input type="number" id="unidades" name="unidades" maxLength="11" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.etiqueta') ?>
|
||||
</label>
|
||||
<input type="text" name="etiqueta" maxLength="11" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.maquina') ?>
|
||||
</label>
|
||||
<input type="text" name="maquina" maxLength="11" class="form-control" data-input>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="orientacion" class="form-label">
|
||||
<?=lang('Imposiciones.orientacion') ?>
|
||||
</label>
|
||||
|
||||
<div class="form-check">
|
||||
<label for="h" class="form-check-label">
|
||||
<input type="radio" id="h" name="orientacion" value="H" class="form-check-input" <?= $imposicion->orientacion == 'H' ? 'checked' : '' ?>>
|
||||
<?= lang('Imposiciones.H') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
|
||||
|
||||
<div class="form-check">
|
||||
<label for="v" class="form-check-label">
|
||||
<input type="radio" id="v" name="orientacion" value="V" class="form-check-input" <?= $imposicion->orientacion == 'V' ? 'checked' : '' ?>>
|
||||
<?= lang('Imposiciones.V') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="maquina" class="form-label">
|
||||
<?=lang('Imposiciones.maquina') ?>
|
||||
</label>
|
||||
<input type="text" id="maquina" name="maquina" maxLength="100" class="form-control" value="<?=old('maquina', $imposicion->maquina) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="etiqueta" class="form-label">
|
||||
<?=lang('Imposiciones.etiqueta') ?>
|
||||
</label>
|
||||
<input type="text" id="etiqueta" name="etiqueta" maxLength="100" class="form-control" value="<?=old('etiqueta', $imposicion->etiqueta) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.orientacion') ?>
|
||||
</label>
|
||||
<select name="orientacion" class="form-control" data-input>
|
||||
<option value="H" default><?= lang("Imposiciones.H") ?></option>
|
||||
<option value="V"><?= lang("Imposiciones.V") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class=" col-lg-6 col-md-6 col-xs-12 mb-3">
|
||||
<label for="unidades" class="form-label">
|
||||
<?= lang('Imposiciones.imposicion_esquema') ?>
|
||||
</label>
|
||||
<select name="imposicion_esquema_id" class="form-control" id="imposicion-esquema-select" data-input>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-xs-12 mb-3 section-block-esquema">
|
||||
<div class="d-flex flex-row justify-content-between">
|
||||
|
||||
<label for="imposicion-esquema-render" class="form-label">
|
||||
<?= lang('Imposiciones.imposicion_esquema_drawing') ?>
|
||||
</label>
|
||||
<a href="" target="_blank" class="btn btn-primary btn-sm imposicion-esquema-link" disabled><?= lang("Imposiciones.imposicion_esquema_link") ?></a>
|
||||
</div>
|
||||
<div id="imposicion-esquema-render">
|
||||
<svg width="100%" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- //.row -->
|
||||
@ -0,0 +1,41 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= lang('Imposiciones.imposicion') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form class="mb-3 section-block" id="form-imposicion-esquema" method="post" data-id="<?= $imposicion_esquema?->id ?>">
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= view("themes/vuexy/form/configuracion/imposiciones/_imposicionEsquemaFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer mb-3 py-2">
|
||||
<div class="col-md-12">
|
||||
<?= anchor(route_to("imposicionList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<button type="button" id="btnSubmitUpdateImposicionEsquema" class="btn btn-primary float-end"><?= lang("Basic.global.Save") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url("themes/vuexy/vendor/libs/dropzone/dropzone.css") ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/spinkit/spinkit.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/notiflix/notiflix.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/notiflix/notiflix.js") ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/two/two.js') ?>"></script>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/imposiciones/edit_esquema.js') ?>"></script>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,26 +1,40 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?=$this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="col-12 mb-3">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
<h3 class="card-title"><?= lang('Imposiciones.imposicion') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form id="imposicionForm" method="post" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("imposicionList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<input type="submit" class="btn btn-primary float-end" name="save" value="<?= lang("Basic.global.Save") ?>">
|
||||
</div><!-- /.card-footer -->
|
||||
<form class="mb-3 section-block" id="form-imposicion" method="post" data-id="<?= $imposicion->id ?>">
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= view("themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer mb-3 py-2">
|
||||
<div class="col-md-12">
|
||||
<?= anchor(route_to("imposicionList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<button type="button" id="btnSubmitUpdateImposicion" class="btn btn-primary float-end"><?= lang("Basic.global.Save") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url("themes/vuexy/vendor/libs/dropzone/dropzone.css") ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/spinkit/spinkit.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/notiflix/notiflix.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/notiflix/notiflix.js") ?>"></script>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/imposiciones/edit.js') ?>"></script>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,168 +1,85 @@
|
||||
<?=$this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->include('themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?=$this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?=$this->section('content'); ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section('content'); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-shadow nav-align-top">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<button type="button" class="nav-link active" role="tab" id="navs-top-align-imposicion-tab" data-bs-toggle="tab" data-bs-target="#navs-top-align-imposicion-table"><?= lang("Imposiciones.imposicionList") ?></button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button type="button" class="nav-link" role="tab" id="navs-top-align-esquema-tab" data-bs-toggle="tab" data-bs-target="#navs-top-align-esquema-table"><?= lang("Imposiciones.imposicion_esquemas") ?></button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade show active" id="navs-top-align-imposicion-table">
|
||||
<div class="col-md-12 d-flex justify-content-end">
|
||||
<?= anchor(route_to('newImposicion'), lang('Imposiciones.btnNewImposicion'), ['class' => 'btn btn-primary float-end', "id" => "btnNewImposicion"]); ?>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
<table id="tableOfImposiciones" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Imposiciones.id') ?></th>
|
||||
<th><?= lang('Imposiciones.ancho') ?></th>
|
||||
<th><?= lang('Imposiciones.alto') ?></th>
|
||||
<th><?= lang('Imposiciones.unidades') ?></th>
|
||||
<th><?= lang('Imposiciones.orientacion') ?></th>
|
||||
<th><?= lang('Imposiciones.maquina') ?></th>
|
||||
<th><?= lang('Imposiciones.etiqueta') ?></th>
|
||||
<th><?= lang('Imposiciones.imposicion_esquema') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?=lang('Imposiciones.imposicionList') ?></h3>
|
||||
<?=anchor(route_to('newImposicion'), lang('Basic.global.addNew').' '.lang('Imposiciones.imposicion'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="tableOfImposiciones" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php // <th class="text-nowrap"><?= lang('Basic.global.Action') ?></th> ?>
|
||||
<th><?=lang('Imposiciones.id')?></th>
|
||||
<th><?= lang('Imposiciones.ancho') ?></th>
|
||||
<th><?= lang('Imposiciones.alto') ?></th>
|
||||
<th><?= lang('Imposiciones.unidades') ?></th>
|
||||
<th><?= lang('Imposiciones.orientacion') ?></th>
|
||||
<th><?= lang('Imposiciones.maquina') ?></th>
|
||||
<th><?= lang('Imposiciones.etiqueta') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade show" id="navs-top-align-esquema-table">
|
||||
<div class="col-md-12 d-flex justify-content-end">
|
||||
<?= anchor(route_to('newImposicionEsquema'), lang('Imposiciones.btnNewImposicionEsquema'), ['class' => 'btn btn-primary float-end', "id" => "btnNewImposicionEsquema"]); ?>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<?= view("/themes/vuexy/components/tables/imposicion_esquema_table.php") ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
const lastColNr = $('#tableOfImposiciones').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
return `<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button class="btn btn-sm btn-warning btn-edit me-1" data-id="${data.id}"><?= lang('Basic.global.edit') ?></button>
|
||||
<button class="btn btn-sm btn-danger btn-delete ms-1" data-id="${data.id}"><?= lang('Basic.global.Delete') ?></button>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
theTable = $('#tableOfImposiciones').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
"dom": 'lfBrtip', // 'lfBrtip', // you can try different layout combinations by uncommenting one or the other
|
||||
// "dom": '<"top"lf><"clear">rt<"bottom"ipB><"clear">', // remember to comment this line if you uncomment the above
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[1, 'asc']],
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfImposiciones') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
//{ 'data': actionBtns },
|
||||
{ 'data': 'id' },
|
||||
{ 'data': 'ancho' },
|
||||
{ 'data': 'alto' },
|
||||
{ 'data': 'unidades' },
|
||||
{ 'data': 'orientacion' },
|
||||
{ 'data': 'maquina' },
|
||||
{ 'data': 'etiqueta' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
window.location.href = `<?= route_to('imposicionList') ?>/${$(this).attr('data-id')}/edit`;
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
Swal.fire({
|
||||
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Imposiciones.imposicion'))]) ?>',
|
||||
text: '<?= lang('Basic.global.sweet.sureToDeleteText') ?>',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
confirmButtonText: '<?= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
|
||||
cancelButtonText: '<?= lang('Basic.global.Cancel') ?>',
|
||||
cancelButtonColor: '#d33'
|
||||
})
|
||||
.then((result) => {
|
||||
const dataId = $(this).data('id');
|
||||
const row = $(this).closest('tr');
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: `<?= route_to('imposicionList') ?>/${dataId}`,
|
||||
method: 'DELETE',
|
||||
}).done((data, textStatus, jqXHR) => {
|
||||
Toast.fire({
|
||||
icon: 'success',
|
||||
title: data.msg ?? jqXHR.statusText,
|
||||
});
|
||||
|
||||
theTable.clearPipeline();
|
||||
theTable.row($(row)).invalidate().draw();
|
||||
}).fail((jqXHR, textStatus, errorThrown) => {
|
||||
Toast.fire({
|
||||
icon: 'error',
|
||||
title: jqXHR.responseJSON.messages.error,
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url("themes/vuexy/vendor/libs/dropzone/dropzone.css") ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/spinkit/spinkit.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/notiflix/notiflix.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.css") ?>">
|
||||
<?=$this->endSection() ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/dataTables.buttons.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.html5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.print.min.js") ?>"></script>
|
||||
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/jszip/jszip.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/pdfmake.min.js") ?>" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/vfs_fonts.js") ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/two/two.js') ?>"></script>
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/imposiciones/view.js') ?>"></script>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -0,0 +1,40 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= lang('Imposiciones.imposicion') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<form class="mb-3 section-block" id="form-imposicion" method="post">
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= view("themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer mb-3 py-2">
|
||||
<div class="col-md-12">
|
||||
<?= anchor(route_to("imposicionList"), lang("App.global_come_back"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<button type="button" id="btnSubmitNewImposicion" class="btn btn-primary float-end"><?= lang("Basic.global.Save") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url("themes/vuexy/vendor/libs/dropzone/dropzone.css") ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/spinkit/spinkit.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/notiflix/notiflix.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/notiflix/notiflix.js") ?>"></script>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/imposiciones/new.js') ?>"></script>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2">
|
||||
<label for="ot-fecha-entrega" class="form-label"><?= @lang("Produccion.fecha_impresion") ?></label>
|
||||
<input type="text" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_impresion" id="ot-fecha-impresion" data-input>
|
||||
<input type="text" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_impresion" id="ot-fecha-impresion" data-input <?= $is_finalizada ? "disabled": "" ?> >
|
||||
<div class="form-text"><?= $pedido_user_dates["fecha_impresion"] ?></div>
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2">
|
||||
<label for="ot-fecha-entrega" class="form-label"><?= @lang("Produccion.fecha_encuadernado") ?></label>
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_encuadernado" id="ot-fecha-encuadernado" data-input />
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_encuadernado" id="ot-fecha-encuadernado" data-input <?= $is_finalizada ? "disabled": "" ?> />
|
||||
<div class="form-text"><?= $pedido_user_dates["fecha_encuadernado"] ?></div>
|
||||
|
||||
</div>
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2">
|
||||
<label for="ot-fecha-entrega" class="form-label"><?= @lang("Produccion.fecha_entrega_externo") ?></label>
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_entrega_externo" id="ot-fecha-entrega-externo" data-input />
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_entrega_externo" id="ot-fecha-entrega-externo" data-input <?= $is_finalizada ? "disabled": "" ?> />
|
||||
<div class="form-text"><?= $pedido_user_dates["fecha_entrega_externo"] ?></div>
|
||||
|
||||
</div>
|
||||
@ -49,13 +49,13 @@
|
||||
<div>
|
||||
|
||||
<label for="ot-fecha-entrega" class="form-label"><?= @lang("Produccion.fecha_entrega_real") ?></label>
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_entrega_real" id="ot-fecha-entrega-real" data-input />
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_entrega_real" id="ot-fecha-entrega-real" data-input <?= $is_finalizada ? "disabled": "" ?> />
|
||||
<div class="form-text"><?= $pedido_user_dates["fecha_entrega_real"] ?></div>
|
||||
</div>
|
||||
<div class="d-flex flex-column">
|
||||
|
||||
<label class="switch switch-danger switch-lg mt-1">
|
||||
<input type="checkbox" class="switch-input ot-pedido-check" name="inaplazable" />
|
||||
<input type="checkbox" class="switch-input ot-pedido-check" name="inaplazable" data-input <?= $is_finalizada ? "disabled": "" ?>/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-alert-triangle"></i>
|
||||
@ -68,7 +68,7 @@
|
||||
</label>
|
||||
<div class="form-text"><?= $pedido_user_dates["inaplazable"] ?></div>
|
||||
<label class="switch switch-lg mt-1">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="fecha_entrega_warning_revised" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="fecha_entrega_warning_revised" data-input <?= $is_finalizada ? "disabled": "" ?>/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-3" id="alert-orden-trabajo">
|
||||
<div class="row g-0">
|
||||
<div class="col-md-2 d-flex align-items-center justify-content-center " style="max-height: 50%;">
|
||||
<div class="row g-0" style="background-color: <?= $colors["general"]["bg"] ?>;" style="max-height: 25vh;">
|
||||
<div class="col-md-2 d-flex align-items-center justify-content-center " style="max-height: 100%;">
|
||||
<div class="sk-wave sk-primary portada-loader">
|
||||
<div class="sk-wave-rect"></div>
|
||||
<div class="sk-wave-rect"></div>
|
||||
@ -10,19 +10,25 @@
|
||||
<div class="sk-wave-rect"></div>
|
||||
<div class="sk-wave-rect"></div>
|
||||
</div>
|
||||
<img class="card-img card-img-left img-thumbnail" id="portada-orden-trabajo" src="<?=site_url('assets/img/portada_not_found.png')?>" hidden>
|
||||
<img class="card-img card-img-left img-thumbnail" id="portada-orden-trabajo" src="<?= site_url('assets/img/portada_not_found.png') ?>" hidden>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="card-body">
|
||||
<h1 class="card-title mb-0">[<?= $presupuesto->id ?>]<?= $presupuesto->titulo ?></h1>
|
||||
<h4 class="card-title mb-0 text-secondary"><?= $cliente->nombre ?> (<?= $cliente->alias ?>)</h4>
|
||||
<h3 class="card-title mb-3">OT : <?= $ot->id ?></h3>
|
||||
<div class="card-body h-100">
|
||||
<h1 class="card-title mb-0" style="color: <?= $colors["general"]["color"] ?>;">[<?= $presupuesto->id ?>]<?= $presupuesto->titulo ?></h1>
|
||||
<h4 class="card-title mb-0" style="color: <?= $colors["general"]["color"] ?>;"><?= $cliente->nombre ?> (<?= $cliente->alias ?>)</h4>
|
||||
<h3 class="card-title mb-3" style="color: <?= $colors["general"]["color"] ?>;">OT : <?= $ot->id ?></h3>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="card-info">
|
||||
<h3 class="mb-0"><?= $ot->progreso ?> %</h3>
|
||||
<div class="card-info" style="color: <?= $colors["general"]["color"] ?>;">
|
||||
<span class="fx-large">Progreso</span>
|
||||
<h3 class="mb-0" style="color: <?= $colors["general"]["color"] ?>;"><?= $ot->progreso ?> %</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<div>
|
||||
<span class="fx-large">Código safekat</span>
|
||||
</div>
|
||||
<img class="img-fluid" src="data:image/png;base64,<?= $ot->bar_code ?>" alt="barcode" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@ -36,6 +42,12 @@
|
||||
<span class="ti-sm ti ti-truck-delivery me-1"></span>
|
||||
Pedido
|
||||
</a>
|
||||
<a type="button" class="btn btn-danger btn-block mb-1" target="__blank" href="<?= "/produccion/ordentrabajo/pdf/" . $modelId ?>">
|
||||
<span class="ti-sm ti ti-file me-1"></span>
|
||||
PDF</a>
|
||||
<a type="button" href="<?= route_to('getOrdenTrabajoBarCode', $modelId) ?>" class="btn btn-secondary btn-block mb-1" download><span class="ti-sm ti ti-barcode me-1"></span><?= @lang("Produccion.imprimir_codigo_safekat") ?></a>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="text-light small fw-medium mb-4 text-start">Revisión</div>
|
||||
<div class="d-flex flex-column justify-content-start text-start gap-2">
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_formato" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_formato" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -14,7 +14,7 @@
|
||||
<span class="switch-label">Revisar formato</span>
|
||||
</label>
|
||||
<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-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -26,7 +26,7 @@
|
||||
<span class="switch-label">Revisar lomo</span>
|
||||
</label>
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" id="revisar-solapa" name="revisar_solapa" />
|
||||
<input type="checkbox" class="switch-input ot-preview" id="revisar-solapa" name="revisar_solapa" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -45,7 +45,7 @@
|
||||
<div class="text-light small fw-medium mb-4 text-start"> </div>
|
||||
<div class="d-flex flex-column justify-content-start text-start gap-2">
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_isbn" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_isbn" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -57,7 +57,7 @@
|
||||
<span class="switch-label">Revisar ISBN,D.L.</span>
|
||||
</label>
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_codigo_barras" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_codigo_barras" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -69,7 +69,7 @@
|
||||
<span class="switch-label">Revisar código de barras</span>
|
||||
</label>
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="realizar_imposicion" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="realizar_imposicion" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -86,7 +86,7 @@
|
||||
<div class="text-light small fw-medium mb-4 text-start"> </div>
|
||||
<div class="d-flex flex-column justify-content-start text-start gap-2">
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="enviar_impresion" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="enviar_impresion" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
|
||||
@ -25,128 +25,137 @@
|
||||
<div class="col-md-3">
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<h4><?=lang("Produccion.progress_impresion")?></h4>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isBN"] ? "" : "d-none" ?>">
|
||||
<label for="ot-impresion-color" class="form-label"><?= @lang("Produccion.impresion_bn") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="interior_bn_at" id="ot-impresion-bn">
|
||||
<div class="form-text"><?= $user_dates["interior_bn_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="interior_bn_at" id="ot-impresion-bn" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["interior_bn_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isColor"] ? "" : "d-none" ?>"">
|
||||
<label for="ot-impresion-color" class="form-label"><?= @lang("Produccion.impresion_color") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="interior_color_at" id="ot-impresion-color">
|
||||
<div class="form-text"><?= $user_dates["interior_color_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="interior_color_at" id="ot-impresion-color" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["interior_color_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isCubierta"] ? "" : "d-none" ?>">
|
||||
<label for="ot-portada" class="form-label"><?= @lang("Produccion.cubierta") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cubierta_at" id="ot-portada">
|
||||
<div class="form-text"><?= $user_dates["cubierta_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cubierta_at" id="ot-portada" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["cubierta_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>"?></div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isPlastificado"] ? "" : "d-none" ?>">
|
||||
<label for="ot-plastificado-mate" class="form-label"><?= @lang("Produccion.plastificado_mate") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="plastificado_at" id="ot-plastificado-mate">
|
||||
<div class="form-text"><?= $user_dates["plastificado_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="plastificado_at" id="ot-plastificado-mate" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["plastificado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<h4><?=lang("Produccion.progress_manipulado")?></h4>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->cosido ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-cosido" class="form-label"><?= @lang("Produccion.cosido") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cosido_at" id="ot-prep-cosido">
|
||||
<div class="form-text"><?= $user_dates["cosido_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cosido_at" id="ot-prep-cosido" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["cosido_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isGrapado"] ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-grapado" class="form-label"><?= @lang("Produccion.grapado") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="grapado_at" id="ot-prep-grapado">
|
||||
<div class="form-text"><?= $user_dates["grapado_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="grapado_at" id="ot-prep-grapado" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["grapado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->solapas ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-solapa" class="form-label"><?= @lang("Produccion.solapa") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="solapa_at" id="ot-prep-solapa">
|
||||
<div class="form-text"><?= $user_dates["solapa_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="solapa_at" id="ot-prep-solapa" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["solapa_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->retractilado ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-retractilado" class="form-label"><?= @lang("Produccion.retractilado") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="retractilado_at" id="ot-prep-retractilado">
|
||||
<div class="form-text"><?= $user_dates["retractilado_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="retractilado_at" id="ot-prep-retractilado" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["retractilado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->retractilado5 ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-retractilado5" class="form-label"><?= @lang("Produccion.retractilado5") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="retractilado5_at" id="ot-prep-retractilado5">
|
||||
<div class="form-text"><?= $user_dates["retractilado5_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="retractilado5_at" id="ot-prep-retractilado5" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["retractilado5_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->prototipo ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-prototipo" class="form-label"><?= @lang("Produccion.prototipo") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="prototipo_at" id="ot-prep-prototipo">
|
||||
<div class="form-text"><?= $user_dates["prototipo_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="prototipo_at" id="ot-prep-prototipo" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["prototipo_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->marcapaginas ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-marcapaginas" class="form-label"><?= @lang("Produccion.marcapaginas") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="marcapaginas_at" id="ot-prep-marcapaginas">
|
||||
<div class="form-text"><?= $user_dates["marcapaginas_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="marcapaginas_at" id="ot-prep-marcapaginas" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["marcapaginas_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isCorte"] ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-guillotina" class="form-label"><?= @lang("Produccion.guillotina") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="corte_at" id="ot-prep-guillotina">
|
||||
<div class="form-text"><?= $user_dates["corte_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="corte_at" id="ot-prep-guillotina" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["corte_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isEspiral"] ? "" : "d-none" ?>">
|
||||
<label for="ot-espiral" class="form-label"><?= @lang("Produccion.espiral") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="espiral_at" id="ot-espiral">
|
||||
<div class="form-text"></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="espiral_at" id="ot-espiral" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"> <?= $user_dates["espiral_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<h4><?=lang("Produccion.progress_logistica")?></h4>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
||||
<label for="ot-pendiente-ferro" class="form-label"><?= @lang("Produccion.pendiente_ferro") ?></label>
|
||||
<input type="text" class="form-control ot-date" name="pendiente_ferro_at" placeholder="DD/MM/YYYY" id="ot-pendiente-ferro">
|
||||
<div class="form-text"><?= $user_dates["pendiente_ferro_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" name="pendiente_ferro_at" placeholder="DD/MM/YYYY" id="ot-pendiente-ferro" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pendiente_ferro_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
||||
<label for="ot-ferro-cliente" class="form-label"><?= @lang("Produccion.ferro_cliente") ?></label>
|
||||
<input type="text" class="form-control ot-date" name="ferro_en_cliente_at" placeholder="DD/MM/YYYY" id="ot-ferro-cliente">
|
||||
<div class="form-text"><?= $user_dates["ferro_en_cliente_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" name="ferro_en_cliente_at" placeholder="DD/MM/YYYY" id="ot-ferro-cliente" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["ferro_en_cliente_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
||||
<label for="ot-ferro-ok" class="form-label"><?= @lang("Produccion.ferro_ok") ?></label>
|
||||
<input type="text" class="form-control ot-date" name="ferro_ok_at" placeholder="DD/MM/YYYY" id="ot-ferro-ok">
|
||||
<div class="form-text"><?= $user_dates["ferro_ok_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" name="ferro_ok_at" placeholder="DD/MM/YYYY" id="ot-ferro-ok" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["ferro_ok_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<label for="ot-embalaje" class="form-label"><?= @lang("Produccion.embalaje") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="embalaje_at" id="ot-embalaje">
|
||||
<div class="form-text"><?= $user_dates["embalaje_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="embalaje_at" id="ot-embalaje" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["embalaje_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<label for="ot-envio" class="form-label"><?= @lang("Produccion.envio") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="envio_at" id="ot-envio">
|
||||
<div class="form-text"><?= $user_dates["envio_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="envio_at" id="ot-envio" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["envio_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -154,44 +163,47 @@
|
||||
<div class="col-md-3">
|
||||
<!-- PREIMPRESION -->
|
||||
<!-- Preformato -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<h4><?=lang("Produccion.progress_preimpresion")?></h4>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_formato ? "" : "d-none" ?>">
|
||||
<label for="ot-preformato-btn" class="form-label"><?= @lang("Produccion.pre_formato") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_formato_at" id="ot-preformato-date">
|
||||
<div class="form-text"><?= $user_dates["pre_formato_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_formato_at" id="ot-preformato-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pre_formato_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Prelomo -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_lomo ? "" : "d-none" ?>">
|
||||
<label for="ot-prelomo-btn" class="form-label"><?= @lang("Produccion.pre_lomo") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_lomo_at" id="ot-prelomo-date">
|
||||
<div class="form-text"><?= $user_dates["pre_lomo_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_lomo_at" id="ot-prelomo-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pre_lomo_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Presolapa -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_solapa ? "" : "d-none" ?>">
|
||||
<label for="ot-presolapa-btn" class="form-label"><?= @lang("Produccion.pre_solapa") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_solapa_at" id="ot-presolapa-date">
|
||||
<div class="form-text"><?= $user_dates["pre_solapa_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_solapa_at" id="ot-presolapa-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pre_solapa_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Precodbarras -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_codigo_barras ? "" : "d-none" ?>">
|
||||
<label for="ot-precodbarras-btn" class="form-label"><?= @lang("Produccion.pre_codbarras") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_codbarras_at" id="ot-precodbarras-date">
|
||||
<div class="form-text"><?= $user_dates["pre_codbarras_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_codbarras_at" id="ot-precodbarras-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pre_codbarras_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Preimposicion -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->realizar_imposicion ? "" : "d-none" ?>">
|
||||
<label for="ot-preimposicion-btn" class="form-label"><?= @lang("Produccion.pre_imposicion") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_imposicion_at" id="ot-preimposicion-date">
|
||||
<div class="form-text"><?= $user_dates["pre_imposicion_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_imposicion_at" id="ot-preimposicion-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pre_imposicion_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<p><?= @lang("Produccion.tiempo_estimado") ?> :</p>
|
||||
<p><?= @lang("Produccion.tiempo_estimado") ?> : <?= $tiempo_estimado ?> (HH:MM)</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<p><?= @lang("Produccion.tiempo_consumido") ?> :</p>
|
||||
@ -201,7 +213,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="d-flex flex-row justify-content-between align-items-center">
|
||||
<label class="switch switch-danger switch-lg mt-1">
|
||||
<input type="checkbox" class="switch-input ot-preview" id="ot-pedido-espera" name="is_pedido_espera" />
|
||||
<input type="checkbox" class="switch-input ot-preview" id="ot-pedido-espera" name="is_pedido_espera" data-input <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-alert-triangle"></i>
|
||||
@ -213,7 +225,12 @@
|
||||
<span class="switch-label fw-lg"><?= @lang("Produccion.pedido_espera") ?></span>
|
||||
<span class="badge text-bg-warning fw-lg" id="pedido_espera_by"></span>
|
||||
</label>
|
||||
<button type="button" id="btn-finalizar-orden-pedido" class="btn btn-primary btn-block" <?= $ot->estado == "F" ? "disabled" : "" ?>><?= @lang("Produccion.finalizar_orden") ?></button>
|
||||
<?php if ($is_finalizada): ?>
|
||||
<button type="button" id="btn-reactivar-orden-pedido" class="btn btn-primary btn-block"><?= @lang("Produccion.reactivar_orden") ?></button>
|
||||
<?php else: ?>
|
||||
<button type="button" id="btn-finalizar-orden-pedido" class="btn btn-warning btn-block"><?= @lang("Produccion.finalizar_orden") ?></button>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -47,7 +47,9 @@
|
||||
</div>
|
||||
<div class="col-md-3 gap-2 text-end">
|
||||
<!-- <button type="button" class="btn btn-warning btn-md" id="btn-reset-tareas-time"><span class="ti ti-clock ti-sm me-1"></span> Actualizar tiempo</button> -->
|
||||
<button type="button" class="btn btn-danger btn-md" id="btn-reset-tareas"><span class="ti ti-trash ti-sm me-1"></span> Reiniciar tareas</button>
|
||||
<?php if (!$is_finalizada): ?>
|
||||
<button type="button" class="btn btn-danger btn-md" id="btn-reset-tareas"><span class="ti ti-trash ti-sm me-1"></span> Reiniciar tareas</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -33,9 +33,6 @@
|
||||
<div class="col-md-12 section-block">
|
||||
<?= view("themes/vuexy/form/produccion/ot/otFiles") ?>
|
||||
</div>
|
||||
<div class="col-md-12 section-block">
|
||||
<?= view("themes/vuexy/form/produccion/ot/otCosts") ?>
|
||||
</div>
|
||||
<div class="col-md-12 section-block">
|
||||
<?= view("themes/vuexy/form/produccion/ot/otComments") ?>
|
||||
</div>
|
||||
@ -45,8 +42,10 @@
|
||||
<a type="button" class="btn btn-outline-danger btn-block mb-1" target="__blank" href="<?= "/produccion/ordentrabajo/pdf/" . $modelId ?>">
|
||||
<span class="ti-sm ti ti-eye me-1"></span>
|
||||
<?= @lang("Produccion.preview_pdf") ?></a>
|
||||
<button type="button" class="btn btn-primary btn-block mb-1"><?= @lang("Produccion.imprimir_ferro") ?></button>
|
||||
<button type="button" class="btn btn-secondary btn-block mb-1"><?= @lang("Produccion.imprimir_codigo_safekat") ?></button>
|
||||
<?php if ($presupuesto->prototipo): ?>
|
||||
<button type="button" class="btn btn-primary btn-block mb-1 beta"><?= @lang("Produccion.imprimir_ferro") ?></button>
|
||||
<? endif; ?>
|
||||
<a type="button" href="<?= route_to('getOrdenTrabajoBarCode', $modelId) ?>" class="btn btn-secondary btn-block mb-1" download><?= @lang("Produccion.imprimir_codigo_safekat") ?></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
<aside id="layout-menu" class="layout-menu menu-vertical menu bg-menu-theme">
|
||||
<div class="app-brand">
|
||||
<a href="<?= site_url('home') ?>" class="app-brand-link">
|
||||
<span class="app-brand-logo">
|
||||
<img src="<?= site_url('themes/vuexy/img/safekat/logos/sk-logo.png') ?>" width="150px">
|
||||
</span>
|
||||
<span class="app-brand-logo">
|
||||
<img src="<?= site_url('themes/vuexy/img/safekat/logos/sk-logo.png') ?>" width="150px">
|
||||
</span>
|
||||
</a>
|
||||
<a href="javascript:void(0);" class="layout-menu-toggle menu-link text-large ms-auto">
|
||||
<i class="ti menu-toggle-icon d-none d-xl-block ti-sm align-middle"></i>
|
||||
@ -30,6 +30,8 @@
|
||||
|
||||
require "menus/produccion_menu.php";
|
||||
|
||||
require "menus/maquinista_menu.php";
|
||||
|
||||
require "menus/importacion_menu.php";
|
||||
|
||||
require "menus/catalogo_menu.php";
|
||||
@ -47,7 +49,7 @@
|
||||
require "menus/configuracion_menu.php";
|
||||
|
||||
require "menus/mensajes_menu.php";
|
||||
|
||||
|
||||
require "menus/wiki_menu.php";
|
||||
|
||||
require "menus/soporte_menu.php";
|
||||
|
||||
@ -1,34 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU CATALOGO
|
||||
*/
|
||||
if (auth()->user()->inGroup('beta')) {
|
||||
?>
|
||||
?>
|
||||
<!-- Catalogue -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle beta">
|
||||
<i class="menu-icon tf-icons ti ti-book"></i>
|
||||
<?= lang("App.menu_catalogo") ?>
|
||||
<div><?= lang("App.menu_catalogo") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("catalogo/catalogo") ?>" class="menu-link beta">
|
||||
<?= lang("App.menu_catalogo_libros") ?>
|
||||
<div><?= lang("App.menu_catalogo_libros") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("catalogo/catalogo/nuevo") ?>" class="menu-link beta">
|
||||
<?= lang("App.menu_catalogo_nuevo") ?>
|
||||
<div><?= lang("App.menu_catalogo_nuevo") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("catalogo/catalogo/categorias") ?>" class="menu-link beta">
|
||||
<?= lang("App.menu_catalogo_categorias") ?>
|
||||
<div><?= lang("App.menu_catalogo_categorias") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("catalogo/catalogo/importar") ?>" class="menu-link beta">
|
||||
<?= lang("App.menu_catalogo_importar") ?>
|
||||
<div> <?= lang("App.menu_catalogo_importar") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -11,20 +11,20 @@ if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-users"></i>
|
||||
<?= lang("App.menu_cliente") ?>
|
||||
<div><?= lang("App.menu_cliente") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (auth()->user()->can('perfil.edit')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("profileIndex") ?>" class="menu-link">
|
||||
<?= lang("App.menu_perfil_clientes") ?>
|
||||
<div><?= lang("App.menu_perfil_clientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('direcciones.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("clientedireccionesIndex") ?>" class="menu-link">
|
||||
<?= lang("App.menu_direcciones_clientes") ?>
|
||||
<div><?= lang("App.menu_direcciones_clientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
@ -43,20 +43,20 @@ if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-users"></i>
|
||||
<?= lang("App.menu_clientes") ?>
|
||||
<div><?= lang("App.menu_clientes") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (auth()->user()->can('clientes.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("clienteList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_clientes") ?>
|
||||
<div><?= lang("App.menu_clientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('plantilla-tarifa.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('clienteplantillapreciosList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_plantillas_tarifas_clientes") ?>
|
||||
<div><?= lang("App.menu_plantillas_tarifas_clientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU COMPRAS
|
||||
*/
|
||||
@ -7,18 +8,18 @@ if (
|
||||
auth()->user()->inGroup('beta')
|
||||
) {
|
||||
|
||||
?>
|
||||
?>
|
||||
<!-- COMPRAS -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-shopping-cart"></i>
|
||||
<?= lang("App.menu_compras") ?>
|
||||
<div> <?= lang("App.menu_compras") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (auth()->user()->can('proveedores.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("compras/proveedores") ?>" class="menu-link">
|
||||
<?= lang("App.menu_proveedores") ?>
|
||||
<div><?= lang("App.menu_proveedores") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
@ -26,18 +27,18 @@ if (
|
||||
<?php if (auth()->user()->inGroup('beta')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("servicios/compras") ?>" class="menu-link beta">
|
||||
<?= lang("App.menu_compras") ?>
|
||||
<div><?= lang("App.menu_compras") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("servicios/productos") ?>" class="menu-link beta">
|
||||
<?= lang("App.menu_productos") ?>
|
||||
<div><?= lang("App.menu_productos") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("servicios/compras/ajustes") ?>" class="menu-link beta">
|
||||
<?= lang("App.menu_compras_ajustes") ?>
|
||||
<div><?= lang("App.menu_compras_ajustes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
@ -13,95 +13,102 @@ if (
|
||||
auth()->user()->can('usuarios.menu') ||
|
||||
auth()->user()->can('roles-permisos.menu')
|
||||
) {
|
||||
?>
|
||||
?>
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-adjustments-horizontal"></i>
|
||||
<?= lang("App.menu_configuration") ?>
|
||||
<div><?= lang("App.menu_configuration") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
|
||||
<?php if (auth()->user()->can('paises.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('paisList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_paises") ?>
|
||||
<div><?= lang("App.menu_paises") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('formas-pago.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('formasPagoList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_formas_pago") ?>
|
||||
<div> <?= lang("App.menu_formas_pago") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('papel-generico.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('papelGenericoList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_papelgenerico") ?>
|
||||
<div><?= lang("App.menu_papelgenerico") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('papel-impresion.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('papelImpresionList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_papelimpresion") ?>
|
||||
<div><?= lang("App.menu_papelimpresion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('maquinas.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("maquinaList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_maquina") ?>
|
||||
<div><?= lang("App.menu_maquina") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('maquinas-defecto.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("maquinaPorDefectoList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_maquina_defecto") ?>
|
||||
<div> <?= lang("App.menu_maquina_defecto") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->inGroup('admin')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("maquinaTareaList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_maquina_tareas") ?>
|
||||
<div> <?= lang("App.menu_maquina_tareas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->inGroup('admin')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("imposicionList") ?>" class="menu-link">
|
||||
<div> <?= lang("App.menu_imposiciones") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('usuarios.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('userList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_users") ?>
|
||||
<div> <?= lang("App.menu_users") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('roles-permisos.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("userGroupList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_permission_group") ?>
|
||||
<div> <?= lang("App.menu_permission_group") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('proveedores.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("proveedorList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_proveedores") ?>
|
||||
<div> <?= lang("App.menu_proveedores") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('ubicaciones.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("ubicacionesList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_ubicaciones") ?>
|
||||
<div> <?= lang("App.menu_ubicaciones") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('series-facturas.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("seriesFacturasList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_series_facturas") ?>
|
||||
<div> <?= lang("App.menu_series_facturas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
@ -109,21 +116,21 @@ if (
|
||||
<?php if (auth()->user()->inGroup('admin')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('erroresPresupuestoIndex') ?>" class="menu-link">
|
||||
<?= lang("App.menu_error_presupuesto") ?>
|
||||
<div> <?= lang("App.menu_error_presupuesto") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->inGroup('admin')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('variablesIndex') ?>" class="menu-link">
|
||||
<?= lang("App.menu_variables") ?>
|
||||
<div> <?= lang("App.menu_variables") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->inGroup('admin')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('configMessagesIndex') ?>" class="menu-link">
|
||||
<?= lang("App.menu_config_messages") ?>
|
||||
<div> <?= lang("App.menu_config_messages") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* MENU DASHBOARD
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
<li class="menu-item active">
|
||||
<a href="<?= route_to("home") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-dashboard"></i>
|
||||
<?= lang("App.menu_dashboard") ?>
|
||||
<div><?= lang("App.menu_dashboard") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
@ -1,19 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU FACTURACION
|
||||
*/
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
?>
|
||||
?>
|
||||
<!-- Invoicing -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<?= lang("App.menu_facturación") ?>
|
||||
<div><?= lang("App.menu_facturación") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('facturasList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_facturas") ?>
|
||||
<div><?= lang("App.menu_facturas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -1,32 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU FACTURACION
|
||||
*/
|
||||
if (auth()->user()->can('facturas.menu')) {
|
||||
?>
|
||||
?>
|
||||
<!-- FACTURACION -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<?= lang("App.menu_facturación") ?>
|
||||
<div><?= lang("App.menu_facturación") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (auth()->user()->can('facturas.create')): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('newFactura') ?>" class="menu-link">
|
||||
<?= lang("App.menu_facturas_nueva") ?>
|
||||
<div><?= lang("App.menu_facturas_nueva") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('facturasList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_facturas") ?>
|
||||
<div><?= lang("App.menu_facturas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php if (auth()->user()->can('facturas.vencimientos')): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturas/vencimientos") ?>" class="menu-link">
|
||||
<?= lang("App.menu_facturas_vencimiento") ?>
|
||||
<div> <?= lang("App.menu_facturas_vencimiento") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU IMPORTACION
|
||||
*/
|
||||
if (auth()->user()->inGroup('beta')) {
|
||||
?>
|
||||
?>
|
||||
<!-- Import -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("importacion/importar") ?>" class="menu-link beta">
|
||||
<i class="menu-icon tf-icons ti ti-file-import"></i>
|
||||
<?= lang("App.menu_importacion") ?>
|
||||
<div> <?= lang("App.menu_importacion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
@ -1,32 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU LOGISTICA
|
||||
*/
|
||||
if (auth()->user()->inGroup('beta')) {
|
||||
?>
|
||||
?>
|
||||
<!-- Logistic -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-truck"></i>
|
||||
<?= lang("App.menu_logistica") ?>
|
||||
<div> <?= lang("App.menu_logistica") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("LogisticaPanel") ?>" class="menu-link">
|
||||
<?= lang("App.menu_logistica_panel") ?>
|
||||
<div> <?= lang("App.menu_logistica_panel") ?></div>
|
||||
</a>
|
||||
<a href="<?= site_url("envioslogistica/logistica") ?>" class="menu-link">
|
||||
<?= lang("App.menu_logistica_envios") ?>
|
||||
<div> <?= lang("App.menu_logistica_envios") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("envioslogistica/logistica/etiquetas") ?>" class="menu-link">
|
||||
<?= lang("App.menu_logistica_etiquetas") ?>
|
||||
<div> <?= lang("App.menu_logistica_etiquetas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("envioslogistica/logistica/tracking") ?>" class="menu-link">
|
||||
<?= lang("App.menu_logistica_tracking") ?>
|
||||
<div> <?= lang("App.menu_logistica_tracking") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
32
ci4/app/Views/themes/vuexy/main/menus/maquinista_menu.php
Normal file
32
ci4/app/Views/themes/vuexy/main/menus/maquinista_menu.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MAQUINISTA MENU
|
||||
*/
|
||||
if (auth()->user()->inGroup('maquina')) {
|
||||
?>
|
||||
<!-- Catalogue -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle beta">
|
||||
<i class="menu-icon tf-icons ti ti-printer"></i>
|
||||
<div><?= lang("App.menu_maquinista") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("viewProduccionMaquinistaMaquinas") ?>" class="menu-link beta">
|
||||
<div><?= lang("App.menu_maquinista_maquinas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("viewProduccionMaquinistaColas") ?>" class="menu-link beta">
|
||||
<div><?= lang("App.menu_maquinista_colas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("viewProduccionMaquinistaMantenimiento") ?>" class="menu-link beta">
|
||||
<div><?= lang("App.menu_maquinista_mantenimiento") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
@ -1,14 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU MENSAJES
|
||||
*/
|
||||
if (!auth()->user()->inGroup('cliente-administrador','cliente')) {
|
||||
?>
|
||||
if (!auth()->user()->inGroup('cliente-administrador', 'cliente')) {
|
||||
?>
|
||||
<!-- Mensajeria -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('mensajeriaView') ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-message"></i>
|
||||
<?= lang("App.menu_mensajes") ?>
|
||||
<div><?= lang("App.menu_mensajes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU PEDIDOS
|
||||
*/
|
||||
@ -8,46 +9,46 @@ if (
|
||||
auth()->user()->can('pedidos-cancelados.menu') ||
|
||||
auth()->user()->can('pedidos-todos.menu')
|
||||
) {
|
||||
?>
|
||||
?>
|
||||
<!-- Orders -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-description"></i>
|
||||
<?= lang("App.menu_pedidos") ?>
|
||||
<div><?= lang("App.menu_pedidos") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (auth()->user()->can('pedidos-validacion.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("validacionView") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_validacion") ?>
|
||||
<div><?= lang("App.menu_pedidos_validacion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('pedidos-activos.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("listaPedidosActivos") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_activos") ?>
|
||||
<div><?= lang("App.menu_pedidos_activos") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('pedidos-finalizados.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("listaPedidosFinalizados") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_finalizados") ?>
|
||||
<div> <?= lang("App.menu_pedidos_finalizados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('pedidos-cancelados.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("listaPedidosCancelados") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_cancelados") ?>
|
||||
<div> <?= lang("App.menu_pedidos_cancelados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('pedidos-todos.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("listaPedidos") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_todos") ?>
|
||||
<div> <?= lang("App.menu_pedidos_todos") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
@ -1,40 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU PRESUPUESTOS VISTA CLIENTES
|
||||
*/
|
||||
|
||||
if(auth()->user()->can('presupuesto-cliente.menu')){
|
||||
if (auth()->user()->can('presupuesto-cliente.menu')) {
|
||||
|
||||
?>
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-currency-dollar"></i>
|
||||
<?php
|
||||
echo(
|
||||
auth()->user()->can('presupuesto.menu') ?
|
||||
lang("App.menu_presupuestos_clientes") :
|
||||
lang("App.menu_presupuestos")
|
||||
);
|
||||
?>
|
||||
</a>
|
||||
<?php if (auth()->user()->can('presupuesto-cliente.create')) { ?>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('nuevoPresupuestoCliente') ?>" class="menu-link">
|
||||
Nuevo presupuesto
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
?>
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-currency-dollar"></i>
|
||||
<div><?php
|
||||
echo (
|
||||
auth()->user()->can('presupuesto.menu') ?
|
||||
lang("App.menu_presupuestos_clientes") :
|
||||
lang("App.menu_presupuestos")
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</a>
|
||||
<?php if (auth()->user()->can('presupuesto-cliente.create')) { ?>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("listaPresupuestos") ?>" class="menu-link">
|
||||
Mis presupuestos
|
||||
<a href="<?= route_to('nuevoPresupuestoCliente') ?>" class="menu-link">
|
||||
<div> Nuevo presupuesto</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php
|
||||
|
||||
} ?>
|
||||
<?php } ?>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("listaPresupuestos") ?>" class="menu-link">
|
||||
<div>Mis presupuestos</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php
|
||||
|
||||
} ?>
|
||||
@ -1,25 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU PRESUPUESTOS
|
||||
*/
|
||||
if (auth()->user()->can('presupuesto.menu')) {
|
||||
?>
|
||||
?>
|
||||
<!-- Budgets -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-currency-dollar"></i>
|
||||
<?= lang("App.menu_presupuestos") ?>
|
||||
<div><?= lang("App.menu_presupuestos") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("buscadorPresupuestosList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_presupuesto_buscador") ?>
|
||||
<div><?= lang("App.menu_presupuesto_buscador") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('importadorPresupuestos') ?>" class="menu-link">
|
||||
<?= lang("App.menu_presupuesto_importador") ?>
|
||||
<div><?= lang("App.menu_presupuesto_importador") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -30,60 +31,60 @@ if (auth()->user()->can('presupuesto.menu')) {
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestoadmin/list/1") ?>" class="menu-link">
|
||||
<?= lang("App.menu_libros_fresasdo_tapa_dura") ?>
|
||||
<div><?= lang("App.menu_libros_fresasdo_tapa_dura") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestoadmin/list/2") ?>" class="menu-link">
|
||||
<?= lang("App.menu_libros_fresasdo_tapa_blanda") ?>
|
||||
<div><?= lang("App.menu_libros_fresasdo_tapa_blanda") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestoadmin/list/3") ?>" class="menu-link">
|
||||
<?= lang("App.menu_libros_cosido_tapa_dura") ?>
|
||||
<div><?= lang("App.menu_libros_cosido_tapa_dura") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestoadmin/list/4") ?>" class="menu-link">
|
||||
<?= lang("App.menu_libros_cosido_tapa_blanda") ?>
|
||||
<div> <?= lang("App.menu_libros_cosido_tapa_blanda") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestoadmin/list/21") ?>" class="menu-link">
|
||||
<?= lang("App.menu_libros_grapados") ?>
|
||||
<div><?= lang("App.menu_libros_grapados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestoadmin/list/5") ?>" class="menu-link">
|
||||
<?= lang("App.menu_libros_espiral_tapa_dura") ?>
|
||||
<div> <?= lang("App.menu_libros_espiral_tapa_dura") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestoadmin/list/6") ?>" class="menu-link">
|
||||
<?= lang("App.menu_libros_espiral_tapa_blanda") ?>
|
||||
<div><?= lang("App.menu_libros_espiral_tapa_blanda") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestoadmin/list/7") ?>" class="menu-link">
|
||||
<?= lang("App.menu_libros_wireo_tapa_dura") ?>
|
||||
<div><?= lang("App.menu_libros_wireo_tapa_dura") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestoadmin/list/8") ?>" class="menu-link">
|
||||
<?= lang("App.menu_libros_wireo_tapa_blanda") ?>
|
||||
<div><?= lang("App.menu_libros_wireo_tapa_blanda") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<?php if (auth()->user()->inGroup('beta')) { ?>
|
||||
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/marcapaginas") ?>" class="menu-link beta">
|
||||
<?= lang("App.menu_marcapaginas") ?>
|
||||
<div> <?= lang("App.menu_marcapaginas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
|
||||
@ -1,44 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU PRODUCCION
|
||||
*/
|
||||
if (
|
||||
auth()->user()->can('produccion.menu')
|
||||
) {
|
||||
?>
|
||||
?>
|
||||
<!-- Production -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-printer"></i>
|
||||
<?= lang("App.menu_produccion") ?>
|
||||
<div><?= lang("App.menu_produccion") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (auth()->user()->can('produccion.ots')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo") ?>" class="menu-link">
|
||||
<?= lang("App.menu_orden_trabajo") ?>
|
||||
<div><?= lang("App.menu_orden_trabajo") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<!-- <li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/cien") ?>" class="menu-link">
|
||||
<?= lang("App.menu_orden_trabajo_100") ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/finalizado") ?>" class="menu-link">
|
||||
<?= lang("App.menu_orden_trabajo_finalizados") ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/pendiente") ?>" class="menu-link">
|
||||
<?= lang("App.menu_orden_trabajo_pendientes") ?>
|
||||
</a>
|
||||
</li> -->
|
||||
<?php if (auth()->user()->can('produccion.plannings')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/planning/rotativa") ?>" class="menu-link">
|
||||
<?= lang("App.menu_planning") ?>
|
||||
<div><?= lang("App.menu_planning") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
@ -18,7 +18,7 @@ if (auth()->user()->can('actividad.menu')) {
|
||||
<!-- Activity -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("activityList") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-fingerprint""></i>
|
||||
<i class="menu-icon tf-icons ti ti-fingerprint"></i>
|
||||
<div data-i18n="<?= lang("App.menu_activity") ?>"><?= lang("App.menu_activity") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -11,14 +11,14 @@ if (
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-help"></i>
|
||||
<?= lang("App.menu_soporte") ?>
|
||||
<div><?= lang("App.menu_soporte") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
|
||||
<?php if (auth()->user()->can('tickets.create')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("NewTicket") ?>" class="menu-link">
|
||||
<?= lang("App.menu_soporte_new_ticket") ?>
|
||||
<div><?= lang("App.menu_soporte_new_ticket") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
@ -26,7 +26,7 @@ if (
|
||||
<?php if (auth()->user()->can('tickets.edit')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("TicketIndex") ?>" class="menu-link">
|
||||
<?= lang("App.menu_soporte_ticket_list") ?>
|
||||
<div><?= lang("App.menu_soporte_ticket_list") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MENU TARIFAS
|
||||
*/
|
||||
@ -11,60 +12,60 @@ if (
|
||||
auth()->user()->can('tarifa-envio.menu') ||
|
||||
auth()->user()->can('tarifa-extra.menu')
|
||||
) {
|
||||
?>
|
||||
?>
|
||||
<!-- Prices -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-receipt"></i>
|
||||
<?= lang("App.menu_tarifas") ?>
|
||||
<div><?= lang("App.menu_tarifas") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (auth()->user()->can('tarifa-preimpresion.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("tarifapreimpresionList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_tarifapreimpresion") ?>
|
||||
<div><?= lang("App.menu_tarifapreimpresion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('tarifa-manipulado.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("tarifaManipuladoList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_tarifamanipulado") ?>
|
||||
<div><?= lang("App.menu_tarifamanipulado") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('tarifa-acabado.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('tarifaAcabadoList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_tarifaacabado") ?>
|
||||
<div><?= lang("App.menu_tarifaacabado") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('servicio-acabado.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('serviciosAcabadoList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_servicioAcabado") ?>
|
||||
<div><?= lang("App.menu_servicioAcabado") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('tarifa-encuadernacion.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifasencuadernacion") ?>" class="menu-link">
|
||||
<?= lang("App.menu_encuadernacion") ?>
|
||||
<div><?= lang("App.menu_encuadernacion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('tarifa-envio.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifasenvios") ?>" class="menu-link">
|
||||
<?= lang("App.menu_tarifaenvio") ?>
|
||||
<div><?= lang("App.menu_tarifaenvio") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('tarifa-extra.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifaextra") ?>" class="menu-link">
|
||||
<?= lang("App.menu_tarifaextra") ?>
|
||||
<div><?= lang("App.menu_tarifaextra") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
@ -1,16 +1,15 @@
|
||||
|
||||
<!-- Messages -->
|
||||
<li class="menu-item">
|
||||
<?php if(auth()->user()->inGroup('admin')):?>
|
||||
<a href="<?= route_to('showWikiPage','intro-admin') ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-books"></i>
|
||||
<?= lang("Wiki.help") ?>
|
||||
</a>
|
||||
<?php endif;?>
|
||||
<?php if(auth()->user()->inGroup('cliente-editor')):?>
|
||||
<a href="<?= route_to('showWikiPage','intro-cliente') ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-books"></i>
|
||||
<?= lang("Wiki.help") ?>
|
||||
</a>
|
||||
<?php endif;?>
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
<a href="<?= route_to('showWikiPage', 'intro-admin') ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-books"></i>
|
||||
<div><?= lang("Wiki.help") ?></div>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if (auth()->user()->inGroup('cliente-editor')): ?>
|
||||
<a href="<?= route_to('showWikiPage', 'intro-cliente') ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-books"></i>
|
||||
<div><?= lang("Wiki.help") ?></div>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
@ -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,10 +33,10 @@ $settings = $session->get('settings');
|
||||
|
||||
<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="col-12 d-flex justify-content-between align-items-center">
|
||||
<h4><?= $presupuesto->titulo ?></h4>
|
||||
<h5><?= $presupuesto->titulo ?></h5>
|
||||
<span class="fs-medium"><strong><?= Time::now()->format("d/m/Y H:i:s") ?></strong></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -44,81 +44,106 @@ $settings = $session->get('settings');
|
||||
</div>
|
||||
<div class="row mb-2 d-flex flex align-items-stretch">
|
||||
<div class="col-2">
|
||||
<img class="portada-img border-secondary img-thumbnail img-fluid" src="<?= $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 class="col-10 <?= $ot->fecha_entrega_warning ? "bg-danger" : "bg-secondary" ?> py-2 rounded border-1 border-secondary">
|
||||
<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="col-8">
|
||||
<div class="px-2 d-flex flex justify-content-between align-items-center mb-2 border boder-1 border-dark bg-primary text-white rounded-pill bordered border-secondary">
|
||||
<span><strong><?= $pedido->fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek(), true) : "" ?></strong></span>
|
||||
<div class="px-2 d-flex flex justify-content-between align-items-center" style="background-color: <?= $colors["week_day"]["bg"] ?>;color:<?= $colors["week_day"]["color"] ?>;">
|
||||
<span><strong><?= $pedido->fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?></strong></span>
|
||||
<span><strong>Comercial:</strong> <?= $cliente->first_name . " " . $cliente->comercial()->last_name ?> </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="px-2 d-flex flex justify-content-center align-items-center mb-2 border boder-1 border-dark bg-success rounded-pill">
|
||||
<span class="text-white"><strong><?= $presupuesto->presupuestoLineaImpresion()->isRotativa() ? "Rotativa" : "Plana" ?></strong></span>
|
||||
<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"] ?>;">
|
||||
<?php if ($isPOD): ?>
|
||||
<strong>POD</strong>
|
||||
<?php elseif ($presupuesto->presupuestoLineaImpresion()->isRotativa()): ?>
|
||||
<strong>ROTATIVA</strong>
|
||||
<?php else: ?>
|
||||
<strong>GENERAL</strong>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row p-2">
|
||||
<div class="col-4 h-100">
|
||||
<div class="col-3 h-100">
|
||||
<div class="row px-2 d-flex flex justify-content-between align-items-center">
|
||||
<div class="col-6 w-75 border border-1 border-dark text-center <?= $ot->fecha_entrega_warning ? "bg-danger" : "bg-white" ?> ">
|
||||
<span class="<?= $ot->fecha_entrega_warning ? "text-white" : "text-black" ?>" id="fecha_encuadernado_at"><strong><?= $pedido->fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "" ?></strong></span>
|
||||
</div>
|
||||
<div class="col-6 w-25 border border-1 border-dark text-center bg-secondary text-white">
|
||||
<strong><?=isset($encuadernaciones[0]) ? $encuadernaciones[0]->tarifa()->code ?? "?" : "?" ?></strong>
|
||||
<div class="col-6 w-100 text-center">
|
||||
<span id="fecha_encuadernado_at" style="color:<?= $colors["general"]["color"] ?>;"><strong><?= $pedido->fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "??" ?></strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row px-2 mt-2 h-100">
|
||||
<table class="h-100">
|
||||
<tr class="t-row">
|
||||
<th class="t-header">IN</th>
|
||||
<tr>
|
||||
<th>IN</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
<tr class="t-row">
|
||||
<th class="t-header">PO</th>
|
||||
<tr>
|
||||
<th>PORT.</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
<tr class="t-row">
|
||||
<th class="t-header">PL</th>
|
||||
<tr>
|
||||
<th>ACABAD.</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
<tr class="t-row">
|
||||
<th class="t-header">EN</th>
|
||||
<tr>
|
||||
<th>ENCUAD.</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
<tr class="t-row">
|
||||
<th class="t-header">MA</th>
|
||||
<tr>
|
||||
<th>MANIPUL.</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="row h-100">
|
||||
<div class="col-6 h-50 square text-center text-dark bg-white border border-right border-dark">
|
||||
<?= $linea_impresion->papel_impresion()->papel_code_ot ?>
|
||||
</div>
|
||||
<div class="col-6 h-50 square text-center <?=$linea_impresion->isColor() ? "cmyk" : "bn" ?> border border-right border-dark">
|
||||
<?= $tiempo_procesamiento ?>
|
||||
</div>
|
||||
<div class="col-6 h-50 square bg-primary text-center text-white border border-right border-dark">
|
||||
<?= $linea_cubierta->papel_impresion()->papel_code_ot ?>
|
||||
</div>
|
||||
<div class="col-6 h-50 square bg-blue text-center text-dark bg-secondary border border-right border-dark">
|
||||
<?= isset($acabados[0]) ? $acabados[0]->tarifa()->code : "" ?>
|
||||
<div class="col-5">
|
||||
<div class="row">
|
||||
<div class="col-12 w-50 text-center" style="background-color: <?= $colors["ot"]["bg"] ?>;color:<?= $colors["ot"]["color"] ?>;">
|
||||
<strong><?= isset($encuadernaciones[0]) ? $encuadernaciones[0]->tarifa()->code ?? "?" : "?" ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 bg-warning border border-dark">
|
||||
<div class="row h-100">
|
||||
<div class="col-12 h-25 d-flex flex align-items-center justify-content-center">
|
||||
<span class="fs-large text-white"><strong><?= $ot->id ?></strong></span>
|
||||
<div class="row h-75">
|
||||
<div class="col-6 square text-center" style="background-color: <?= $colors["papel_interior"]["bg"] ?>;color:<?= $colors["papel_interior"]["color"] ?>;">
|
||||
<?= $linea_impresion->papel_impresion()->papel_code_ot ?>
|
||||
</div>
|
||||
<div class="col-12 h-75 d-flex flex align-items-center justify-content-center bg-white">
|
||||
<div class="col-6 square text-center <?= $linea_impresion->isColor() ? "cmyk" : "bn" ?>">
|
||||
<?= $tiempo_impresion ?>
|
||||
</div>
|
||||
<div class="col-6 square text-center" style="background-color: <?= $colors["papel_cubierta"]["bg"] ?>;color:<?= $colors["papel_cubierta"]["color"] ?>;">
|
||||
<?= $linea_cubierta->papel_impresion()->papel_code_ot ?>
|
||||
</div>
|
||||
<div class="col-6 square text-center" style="background-color: <?= $colors["plastificado"]["bg"] ?>;color:<?= $colors["plastificado"]["color"] ?>;">
|
||||
<?= isset($acabados[0]) ? $acabados[0]->tarifa()->code : "" ?>
|
||||
</div>
|
||||
<?php foreach ($acabados as $key => $acabado): ?>
|
||||
<?php if ($acabado->tarifa()->isUVI()): ?>
|
||||
<div class="col-6 square offset-md-6 text-center" style="background-color:<?= $acabado->tarifa()->code == "R2D" ? "#4D93D9" : "#0070C0" ?>;color:white;">
|
||||
+ <?= $acabado->tarifa()->code ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4" style="background-color: <?= $colors["ot"]["bg"] ?>">
|
||||
<div class="row h-100">
|
||||
<div class="col-12 h-50 d-flex flex align-items-center justify-content-center">
|
||||
<span class="fs-large" style="color:<?= $colors["ot"]["color"] ?>;"><strong><?= $ot->id ?></strong></span>
|
||||
</div>
|
||||
<div class="col-12 h-50 d-flex flex align-items-center justify-content-center bg-white">
|
||||
<img class="img-fluid" src="data:image/png;base64,<?= $ot->bar_code ?>" alt="barcode" />
|
||||
</div>
|
||||
|
||||
@ -132,55 +157,33 @@ $settings = $session->get('settings');
|
||||
<div class="col-8">
|
||||
<table class="h-50">
|
||||
<tr>
|
||||
<th >Cliente</th>
|
||||
<th>CLIENTE</th>
|
||||
<td class="t-cell">
|
||||
<?= $cliente->nombre ?>
|
||||
<?= $cliente->alias ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >Titulo</th>
|
||||
<th>TITULO</th>
|
||||
<td class="t-cell">
|
||||
<?= $presupuesto->titulo ?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th >ISBN</th>
|
||||
<th>ISBN</th>
|
||||
<td class="t-cell"><?= $presupuesto->isbn ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >CIF</th>
|
||||
<td class="t-cell"><?= $cliente->cif ?></td>
|
||||
<th>PEDIDO CLIENTE</th>
|
||||
<td class="t-cell"><?= $pedido->id ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-12 mb-2">
|
||||
<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>
|
||||
|
||||
<div class="col-12 d-flex justify-content-center" style="width: 100%">
|
||||
<?php if ($imposicion->imposicion_esquema()): ?>
|
||||
<?= $imposicion->imposicion_esquema()->svg_schema ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="imposicion">
|
||||
@ -198,18 +201,18 @@ $settings = $session->get('settings');
|
||||
<div class="section-title impresion">IMP. INTERIOR</div>
|
||||
<div class="col-12">
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="t-header" style="width: 10%;"><?=lang('Produccion.size')?></th>
|
||||
<td class="t-cell text-center"> <?= $papel_formato->ancho ?>x<?= $papel_formato->alto ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?=lang('Produccion.ejemplares')?></th>
|
||||
<td class="t-cell text-center"> <?=$presupuesto->tirada ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?=lang('Produccion.tipo')?></th>
|
||||
<td class="t-cell text-center"> <?=$linea_impresion->tipo ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?=lang('Produccion.lomo')?></th>
|
||||
<td class="t-cell text-center"> <?=number_format($presupuesto->lomo_cubierta,2,',','.') ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="t-header" style="width: 10%;"><?= lang('Produccion.size') ?></th>
|
||||
<td class="t-cell text-center"> <?= $papel_formato->ancho ?>x<?= $papel_formato->alto ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?= lang('Produccion.ejemplares') ?></th>
|
||||
<td class="t-cell text-center"> <?= $presupuesto->tirada ?> + <?= $presupuesto->merma ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?= lang('Produccion.tipo') ?></th>
|
||||
<td class="t-cell text-center"> <?= $presupuesto->tipo_presupuesto()?->codigo ?? "" ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?= lang('Produccion.lomo') ?></th>
|
||||
<td class="t-cell text-center"> <?= number_format($presupuesto->lomo_cubierta, 2, ',', '.') ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_impresion->get_impresion_logo()) ?>" width="35px" height="35px"></td>
|
||||
@ -222,8 +225,8 @@ $settings = $session->get('settings');
|
||||
<th>Tiempo</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= $presupuesto->paginas ?></td>
|
||||
<td><?= $presupuesto->tirada ?></td>
|
||||
<td><?= $presupuesto->paginas * $presupuesto->tirada ?></td>
|
||||
<td><?= $presupuesto->tirada ?> </td>
|
||||
<td>??</td>
|
||||
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
|
||||
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
|
||||
@ -233,7 +236,11 @@ $settings = $session->get('settings');
|
||||
<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>
|
||||
<td colspan="2">
|
||||
<?php if ($linea_impresion->isRotativa()): ?>
|
||||
<?= number_format($linea_impresion->rotativa_metros_total, 2, ',', '.') ?> metros
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
@ -296,7 +303,7 @@ $settings = $session->get('settings');
|
||||
<th class="t-header" style="width: 10%;">Plastificado</th>
|
||||
<td class="t-cell text-center"><?= $acabados[0]->tarifa()->nombre ?></td>
|
||||
<th class="t-header" style="width: 10%;">UVI</th>
|
||||
<td class="t-cell text-center"> ?? </td>
|
||||
<td class="t-cell text-center"> <?= $uvi ? $uvi->code : "" ?> </td>
|
||||
<th class="t-header" style="width: 10%;">Máquina</th>
|
||||
<td class="t-cell text-center"><?= implode("/", array_map(fn($q) => $q->nombre, $acabados[0]->maquinas())) ?> </td>
|
||||
<th class="t-header " style="width: 10%;">Operario</th>
|
||||
@ -319,7 +326,7 @@ $settings = $session->get('settings');
|
||||
<td><?= $value->tarifa()->nombre ?></td>
|
||||
<td><?= $presupuesto->solapas ? "SI" : "NO" ?></td>
|
||||
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
|
||||
<td>_____<?=" ".lang("Produccion.pliegos_de")." "?>_____</td>
|
||||
<td>_____<?= " " . lang("Produccion.pliegos_de") . " " ?>_____</td>
|
||||
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
|
||||
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||
|
||||
@ -0,0 +1,84 @@
|
||||
import ClassSelect from "../select2.js";
|
||||
import Ajax from "../ajax.js";
|
||||
|
||||
|
||||
class ImposicionDatatable {
|
||||
constructor(domItem) {
|
||||
this.item = domItem
|
||||
this.datatableColumns = [
|
||||
{ data: 'id', searchable: true, sortable: true },
|
||||
{ data: 'ancho', searchable: true, sortable: true },
|
||||
{ data: 'alto', searchable: true, sortable: true },
|
||||
{ data: 'unidades', searchable: true, sortable: true },
|
||||
{ data: 'orientacion', searchable: true, sortable: true },
|
||||
{ data: 'maquina', searchable: true, sortable: true },
|
||||
{ data: 'etiqueta', searchable: true, sortable: true },
|
||||
{ data: 'esquema', searchable: true, sortable: true, render: this.renderImposicionEsquemaCell.bind(this) },
|
||||
{ data: 'action', searchable: true, sortable: true },
|
||||
]
|
||||
this.datatableEsquemaColumns = [
|
||||
{ data: 'name', searchable: true, sortable: true },
|
||||
{ data: 'action', searchable: true, sortable: true },
|
||||
]
|
||||
}
|
||||
init() {
|
||||
this.datatable = this.item.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
topEnd: 'search',
|
||||
bottomStart: 'info',
|
||||
bottomEnd: 'paging'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: 'dt-center', targets: [0, 1, 2, 3, 4, 5, 6] },
|
||||
],
|
||||
serverSide: true,
|
||||
pageLength: 25,
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/imposiciones/datatable',
|
||||
createdRow: (row, data, dataIndex) => {
|
||||
this.createSelectImposicion(row, data)
|
||||
}
|
||||
});
|
||||
// this.datatable.on("draw.dt", this.createSelectImposicion.bind(this))
|
||||
this.item.on("change", ".imposicion-esquema-select", this.handleChangeImposicionEsquema.bind(this))
|
||||
}
|
||||
|
||||
renderImposicionEsquemaCell(d, t) {
|
||||
return `<select name="imposicion_esquema_id" data-id="${d.imposicionId}" class="select2 form-control imposicion-esquema-select" data-input>
|
||||
</select>`
|
||||
}
|
||||
createSelectImposicion(row, data) {
|
||||
let selectEsquema = new ClassSelect($(row).find(".imposicion-esquema-select"), '/imposiciones/esquema/select', 'Seleccione un esquema', true)
|
||||
selectEsquema.init()
|
||||
if (data.esquema.esquemaId) {
|
||||
selectEsquema.setOption(data.esquema.esquemaId, data.esquema.esquemaName)
|
||||
}
|
||||
}
|
||||
handleChangeImposicionEsquema(event) {
|
||||
let imposicionId = $(event.currentTarget).data("id")
|
||||
let ajax = new Ajax(`/imposiciones/${imposicionId}`,
|
||||
{
|
||||
"imposicion_esquema_id": $(event.currentTarget).val(),
|
||||
},
|
||||
null,
|
||||
this.handleChangeImposicionEsquemaSuccess.bind(this),
|
||||
this.handleChangeImposicionEsquemaError.bind(this))
|
||||
if (imposicionId) {
|
||||
ajax.post()
|
||||
}
|
||||
}
|
||||
handleChangeImposicionEsquemaSuccess(response) {
|
||||
popSuccessAlert(response.message)
|
||||
}
|
||||
handleChangeImposicionEsquemaError() { }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
export default ImposicionDatatable;
|
||||
@ -0,0 +1,35 @@
|
||||
|
||||
class ImposicionEsquemaDatatable {
|
||||
constructor(domItem) {
|
||||
this.item = domItem
|
||||
this.datatableColumns = [
|
||||
{ data: 'id', searchable: false, sortable: true },
|
||||
{ data: 'name', searchable: true, sortable: true },
|
||||
{ data: 'action', searchable: true, sortable: true },
|
||||
]
|
||||
}
|
||||
|
||||
init() {
|
||||
this.datatable = this.item.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
topEnd: 'search',
|
||||
bottomStart: 'info',
|
||||
bottomEnd: 'paging'
|
||||
},
|
||||
|
||||
serverSide: true,
|
||||
pageLength: 25,
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/imposiciones/esquema/datatable',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
export default ImposicionEsquemaDatatable;
|
||||
@ -0,0 +1,188 @@
|
||||
import Ajax from '../ajax.js'
|
||||
import ImposicionEsquemaDrawing from '../imposicionEsquemaDrawing.js';
|
||||
|
||||
class ImposicionEsquemaForm {
|
||||
constructor(domItem) {
|
||||
this.item = domItem
|
||||
if ($("#imposicion-esquema-drawing").length > 0) {
|
||||
|
||||
this.drawing = new ImposicionEsquemaDrawing($("#imposicion-esquema-drawing"))
|
||||
} else {
|
||||
this.drawing = null
|
||||
}
|
||||
this.modelId = this.item.data("id");
|
||||
this.btnSubmitUpdateImposicion = this.item.find("#btnSubmitUpdateImposicionEsquema")
|
||||
this.btnSubmitNewImposicion = this.item.find("#btnSubmitNewImposicionEsquema")
|
||||
this.initialData = {
|
||||
"name": null,
|
||||
"rows": null,
|
||||
"columns": null,
|
||||
"rotativa": null,
|
||||
"orientacion": null,
|
||||
"cosido": null,
|
||||
"svg_schema": null,
|
||||
|
||||
}
|
||||
this.formData = this.initialData
|
||||
}
|
||||
load(status = false) {
|
||||
if (status) {
|
||||
Notiflix.Block.circle('.section-block');
|
||||
} else {
|
||||
Notiflix.Block.remove('.section-block');
|
||||
}
|
||||
|
||||
}
|
||||
init() {
|
||||
if (this.drawing) {
|
||||
this.drawing.setOrientation($("#esquema-orientacion").val())
|
||||
this.item.on("change", "#esquema-rows", (event) => {
|
||||
let rows = $(event.currentTarget).val()
|
||||
this.drawing.setRows(rows)
|
||||
})
|
||||
this.item.on("change", "#esquema-rotativa", (event) => {
|
||||
let rotativa = $(event.currentTarget).prop("checked")
|
||||
this.drawing.setRotativa(rotativa)
|
||||
})
|
||||
this.item.on("change", "#esquema-cosido", (event) => {
|
||||
let cosido = $(event.currentTarget).prop("checked")
|
||||
this.drawing.setCosido(cosido)
|
||||
})
|
||||
this.item.on("change", "#esquema-orientacion", (event) => {
|
||||
let orientation = $(event.currentTarget).val()
|
||||
this.drawing.setOrientation(orientation)
|
||||
})
|
||||
this.item.on("change", "#esquema-columns", (event) => {
|
||||
let columns = $(event.currentTarget).val()
|
||||
this.drawing.setColumns(columns)
|
||||
})
|
||||
if (this.modelId) {
|
||||
this.btnSubmitUpdateImposicion.on("click", this.handleUpdate.bind(this))
|
||||
this.handleGetData()
|
||||
} else {
|
||||
this.initNew()
|
||||
}
|
||||
}
|
||||
}
|
||||
initNew() {
|
||||
this.btnSubmitUpdateImposicion.on("click", this.handleNew.bind(this))
|
||||
}
|
||||
handleGetData() {
|
||||
this.load(true)
|
||||
let ajax = new Ajax(`/imposiciones/esquema/find/${this.modelId}`, null, null, this.handleGetDataSuccess.bind(this), this.handleGetDataError.bind(this))
|
||||
if (this.modelId) {
|
||||
ajax.get()
|
||||
} else {
|
||||
this.load(false)
|
||||
}
|
||||
|
||||
}
|
||||
getFormData() {
|
||||
let data = {}
|
||||
this.item.serializeArray().forEach((e) => {
|
||||
let input = this.item.find(`input[name=${e.name}]`)
|
||||
if (input) {
|
||||
if (input.attr("type") != "checkbox") {
|
||||
data[e.name] = e.value
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
this.formData = data
|
||||
this.formData["svg_schema"] = this.drawing.getSVG()
|
||||
this.formData["rotativa"] = this.drawing.rotativa == true ? 1 : 0;
|
||||
this.formData["cosido"] = this.drawing.cosido == true ? 1 : 0;
|
||||
|
||||
|
||||
return this.formData
|
||||
}
|
||||
setFormData(data) {
|
||||
this.drawing.rows = data.rows
|
||||
this.drawing.columns = data.columns
|
||||
this.drawing.rotativa = data.rotativa
|
||||
this.drawing.cosido = data.cosido
|
||||
this.drawing.drawSchema()
|
||||
Object.entries(data).forEach(([key, value], index) => {
|
||||
let input = this.item.find(`input[name=${key}]`)
|
||||
if (input) {
|
||||
|
||||
if (input.attr("type") == "checkbox") {
|
||||
this.item.find(`input[name=${key}]`).prop("checked", value)
|
||||
} else {
|
||||
this.item.find(`input[name=${key}]`).val(value)
|
||||
}
|
||||
}
|
||||
this.item.find(`select[name=${key}]`).val(value)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
disable() {
|
||||
Object.entries(this.initialData).forEach(([key, value], index) => {
|
||||
this.item.find(`input[name=${key}]`).prop("disabled", "disabled")
|
||||
this.item.find(`select[name=${key}]`).prop("disabled", "disabled")
|
||||
})
|
||||
}
|
||||
handleGetDataSuccess(response) {
|
||||
this.setFormData(response)
|
||||
this.load(false)
|
||||
}
|
||||
handleGetDataError() { }
|
||||
handleNew() {
|
||||
this.load(true)
|
||||
let ajax = new Ajax(`/imposiciones/esquema/create`, this.getFormData(), null, this.postSuccessNew.bind(this), this.postErrorNew.bind(this))
|
||||
ajax.post()
|
||||
}
|
||||
handleUpdate() {
|
||||
this.load(true)
|
||||
let ajax = new Ajax(`/imposiciones/esquema/${this.modelId}`, this.getFormData(), null, this.postSuccess.bind(this), this.postError.bind(this))
|
||||
ajax.post()
|
||||
}
|
||||
handleDelete(id) {
|
||||
let ajax = new Ajax(`/imposiciones/esquema/${id}`, null, null, this.deleteSuccess.bind(this), this.deleteError.bind(this))
|
||||
ajax.delete()
|
||||
}
|
||||
deleteSuccess(response) {
|
||||
popSuccessAlert(response.message)
|
||||
}
|
||||
deleteError(error) {
|
||||
popErrorAlert(error.responseJSON.message)
|
||||
}
|
||||
postSuccess(response) {
|
||||
this.load(false)
|
||||
this.setFormData(response.data)
|
||||
popSuccessAlert(response.message)
|
||||
}
|
||||
|
||||
postError(error) {
|
||||
this.load(false)
|
||||
popErrorAlert(error.responseJSON.message)
|
||||
this.validationErrors(error.responseJSON.errors)
|
||||
}
|
||||
postSuccessNew(response) {
|
||||
this.load(false)
|
||||
this.disable()
|
||||
this.item.find(".invalid-feedback").remove()
|
||||
this.btnSubmitNewImposicion.addClass("d-none")
|
||||
this.btnSubmitUpdateImposicion.addClass("d-none")
|
||||
popSuccessAlert(response.message)
|
||||
}
|
||||
postErrorNew(error) {
|
||||
this.load(false)
|
||||
this.validationErrors(error.responseJSON.errors)
|
||||
popErrorAlert(error.responseJSON.message)
|
||||
}
|
||||
validationErrors(errors) {
|
||||
this.item.find(".invalid-feedback").remove()
|
||||
Object.entries(errors).forEach(([key, value], index) => {
|
||||
let el = this.item.find(`input[name=${key}]`)
|
||||
this.addError(el, value)
|
||||
})
|
||||
}
|
||||
addError(el, error) {
|
||||
el.addClass("is-invalid")
|
||||
el.parent().append(`<div class="invalid-feedback">${error}</div>`)
|
||||
}
|
||||
}
|
||||
|
||||
export default ImposicionEsquemaForm;
|
||||
195
httpdocs/assets/js/safekat/components/forms/ImposicionForm.js
Normal file
195
httpdocs/assets/js/safekat/components/forms/ImposicionForm.js
Normal file
@ -0,0 +1,195 @@
|
||||
import Ajax from '../ajax.js'
|
||||
import ClassSelect from '../select2.js'
|
||||
class ImposicionForm {
|
||||
constructor(domItem) {
|
||||
this.item = domItem
|
||||
this.modelId = this.item.data("id");
|
||||
this.btnSubmitUpdateImposicion = this.item.find("#btnSubmitUpdateImposicion")
|
||||
this.btnSubmitNewImposicion = this.item.find("#btnSubmitNewImposicion")
|
||||
this.selectImposicionEsquemaItem = this.item.find("#imposicion-esquema-select")
|
||||
this.renderSchemaDiv = this.item.find("#imposicion-esquema-render");
|
||||
this.schemaLink = this.item.find(".imposicion-esquema-link")
|
||||
this.selectImposicionEsquema = new ClassSelect(this.selectImposicionEsquemaItem, '/imposiciones/esquema/select', 'Seleccione un esquema', true)
|
||||
this.imposicionEsquemaData = {}
|
||||
this.initialData = {
|
||||
"ancho": null,
|
||||
"alto": null,
|
||||
"unidades": null,
|
||||
"etiqueta": null,
|
||||
"maquina": null,
|
||||
"orientacion": null
|
||||
}
|
||||
this.formData = this.initialData
|
||||
|
||||
}
|
||||
initSelectImposicionEsquema() {
|
||||
|
||||
this.selectImposicionEsquema.init()
|
||||
this.selectImposicionEsquema.onChange(this.handleGetImposicionEsquema.bind(this))
|
||||
|
||||
|
||||
}
|
||||
resize() {
|
||||
let w = this.renderSchemaDiv.width()
|
||||
let h = this.renderSchemaDiv.height()
|
||||
|
||||
let svgX = this.renderSchemaDiv.find("svg").width()
|
||||
this.renderSchemaDiv.find("svg").attr("width", w)
|
||||
this.renderSchemaDiv.find("svg").attr("height", h)
|
||||
|
||||
this.renderSchemaDiv.find("svg").attr('viewBox', `0 0 ${svgX} ${h + 100}`);
|
||||
}
|
||||
load(status = false) {
|
||||
if (status) {
|
||||
Notiflix.Block.circle('.section-block');
|
||||
} else {
|
||||
Notiflix.Block.remove('.section-block');
|
||||
}
|
||||
|
||||
}
|
||||
loadSchema(status = false) {
|
||||
if (status) {
|
||||
Notiflix.Block.circle('.section-block-esquema');
|
||||
} else {
|
||||
Notiflix.Block.remove('.section-block-esquema');
|
||||
}
|
||||
|
||||
}
|
||||
init() {
|
||||
this.btnSubmitUpdateImposicion.on("click", this.handleUpdate.bind(this))
|
||||
this.handleGetData()
|
||||
this.initSelectImposicionEsquema()
|
||||
this.schemaLink.attr("disabled", "disabled")
|
||||
$(window).on("resize", this.resize.bind(this))
|
||||
}
|
||||
initNew() {
|
||||
this.btnSubmitNewImposicion.on("click", this.handleNew.bind(this))
|
||||
this.initSelectImposicionEsquema()
|
||||
this.schemaLink.attr("disabled", "disabled")
|
||||
$(window).on("resize", this.resize.bind(this))
|
||||
|
||||
}
|
||||
handleGetImposicionEsquema() {
|
||||
this.loadSchema(true)
|
||||
let imposicion_esquema_id = this.selectImposicionEsquema.getVal()
|
||||
let ajax = new Ajax(`/imposiciones/esquema/find/${imposicion_esquema_id}`, null, null, this.handleGetImposicionEsquemaSuccess.bind(this), this.handleGetDataError.bind(this))
|
||||
if (imposicion_esquema_id) {
|
||||
ajax.get()
|
||||
} else {
|
||||
this.loadSchema(false)
|
||||
this.renderSchemaDiv.find("svg").empty()
|
||||
}
|
||||
|
||||
}
|
||||
handleGetImposicionEsquemaSuccess(response) {
|
||||
this.renderSchemaDiv.empty()
|
||||
this.imposicionEsquemaData = response
|
||||
this.renderSchemaDiv.append(response.svg_schema)
|
||||
let svgX = this.renderSchemaDiv.width()
|
||||
let svgY = this.renderSchemaDiv.height()
|
||||
this.schemaLink.removeAttr("disabled")
|
||||
this.schemaLink.attr("href", `/imposiciones/esquema/edit/${response.id}`)
|
||||
this.renderSchemaDiv.find("svg").attr('viewBox', `0 0 ${svgX} ${svgY}`);
|
||||
|
||||
this.resize()
|
||||
this.loadSchema(false)
|
||||
|
||||
}
|
||||
handleGetImposicionEsquemaError(error) {
|
||||
this.loadSchema(false)
|
||||
}
|
||||
handleGetData() {
|
||||
this.load(true)
|
||||
let ajax = new Ajax(`/imposiciones/find/${this.modelId}`, null, null, this.handleGetDataSuccess.bind(this), this.handleGetDataError.bind(this))
|
||||
ajax.get()
|
||||
|
||||
}
|
||||
getFormData() {
|
||||
let data = {}
|
||||
this.item.serializeArray().forEach((e) => {
|
||||
data[e.name] = e.value
|
||||
}
|
||||
)
|
||||
this.formData = data
|
||||
return this.formData
|
||||
}
|
||||
setFormData(data) {
|
||||
Object.entries(data).forEach(([key, value], index) => {
|
||||
this.item.find(`input[name=${key}]`).val(value)
|
||||
this.item.find(`select[name=${key}]`).val(value)
|
||||
if (key == "imposicion_esquema" && value) {
|
||||
this.selectImposicionEsquema.setOption(value.id, value.name)
|
||||
this.schemaLink.removeAttr("disabled")
|
||||
this.schemaLink.attr("href", `/imposiciones/esquema/edit/${value.id}`)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
disable() {
|
||||
Object.entries(this.initialData).forEach(([key, value], index) => {
|
||||
this.item.find(`input[name=${key}]`).prop("disabled", "disabled")
|
||||
this.item.find(`select[name=${key}]`).prop("disabled", "disabled")
|
||||
})
|
||||
}
|
||||
handleGetDataSuccess(response) {
|
||||
this.setFormData(response)
|
||||
this.load(false)
|
||||
}
|
||||
handleGetDataError() { }
|
||||
handleNew() {
|
||||
this.load(true)
|
||||
let ajax = new Ajax(`/imposiciones/create`, this.getFormData(), null, this.postSuccessNew.bind(this), this.postErrorNew.bind(this))
|
||||
ajax.post()
|
||||
}
|
||||
handleUpdate() {
|
||||
this.load(true)
|
||||
let ajax = new Ajax(`/imposiciones/${this.modelId}`, this.getFormData(), null, this.postSuccess.bind(this), this.postError.bind(this))
|
||||
ajax.post()
|
||||
}
|
||||
handleDelete(id) {
|
||||
let ajax = new Ajax(`/imposiciones/${id}`, null, null, this.deleteSuccess.bind(this), this.deleteError.bind(this))
|
||||
ajax.delete()
|
||||
}
|
||||
deleteSuccess(response) {
|
||||
popSuccessAlert(response.message)
|
||||
}
|
||||
deleteError(error) {
|
||||
popErrorAlert(error.responseJSON.message)
|
||||
}
|
||||
postSuccess(response) {
|
||||
this.load(false)
|
||||
this.setFormData(response.data)
|
||||
popSuccessAlert(response.message)
|
||||
}
|
||||
|
||||
postError(error) {
|
||||
this.load(false)
|
||||
popErrorAlert(error.responseJSON.message)
|
||||
this.validationErrors(error.responseJSON.errors)
|
||||
}
|
||||
postSuccessNew(response) {
|
||||
this.load(false)
|
||||
this.disable()
|
||||
this.item.find(".invalid-feedback").remove()
|
||||
this.btnSubmitNewImposicion.addClass("d-none")
|
||||
popSuccessAlert(response.message)
|
||||
}
|
||||
postErrorNew(error) {
|
||||
this.load(false)
|
||||
this.validationErrors(error.responseJSON.errors)
|
||||
popErrorAlert(error.responseJSON.message)
|
||||
}
|
||||
validationErrors(errors) {
|
||||
this.item.find(".invalid-feedback").remove()
|
||||
Object.entries(errors).forEach(([key, value], index) => {
|
||||
let el = this.item.find(`input[name=${key}]`)
|
||||
this.addError(el, value)
|
||||
})
|
||||
}
|
||||
addError(el, error) {
|
||||
el.addClass("is-invalid")
|
||||
el.parent().append(`<div class="invalid-feedback">${error}</div>`)
|
||||
}
|
||||
}
|
||||
|
||||
export default ImposicionForm;
|
||||
@ -0,0 +1,174 @@
|
||||
class ImposicionEsquemaDrawing {
|
||||
constructor(domItem) {
|
||||
this.item = domItem;
|
||||
this.params = { fitted: true }
|
||||
this.rectangleDimensions = {
|
||||
width: 50,
|
||||
height: 100,
|
||||
}
|
||||
this.rectangleCosidoDimensions = {
|
||||
width: 50 * 2,
|
||||
height: 100,
|
||||
}
|
||||
this.offsetX = this.rectangleDimensions.width + 20
|
||||
this.offsetY = this.rectangleDimensions.height + 20
|
||||
this.offsetCosidoX = this.rectangleCosidoDimensions.width + 20
|
||||
this.offsetCosidoY = this.rectangleCosidoDimensions.height + 20
|
||||
this.dw = null
|
||||
if (this.item.length > 0) {
|
||||
|
||||
this.dw = new Two(this.params).appendTo(this.item[0])
|
||||
}
|
||||
this.rows = 1
|
||||
this.columns = 1
|
||||
this.rotativa = false
|
||||
this.cosido = false
|
||||
this.drawingShapes = []
|
||||
this.textShapes = []
|
||||
this.vectorShapes = []
|
||||
this.orientation = "H"
|
||||
this.drawSchema()
|
||||
}
|
||||
setMatrix(rows, columns) {
|
||||
this.rows = rows
|
||||
this.columns = columns
|
||||
}
|
||||
setOrientation(orientation) {
|
||||
this.orientation = orientation
|
||||
this.drawSchema()
|
||||
}
|
||||
setRotativa(rotativa) {
|
||||
this.rotativa = rotativa
|
||||
this.drawSchema()
|
||||
}
|
||||
setCosido(rotativa) {
|
||||
this.cosido = rotativa
|
||||
this.drawSchema()
|
||||
}
|
||||
setRows(rows) {
|
||||
this.rows = rows
|
||||
this.drawSchema()
|
||||
}
|
||||
setColumns(columns) {
|
||||
this.columns = columns
|
||||
this.drawSchema()
|
||||
}
|
||||
init() {
|
||||
|
||||
}
|
||||
cutPaperForm() {
|
||||
this.textShapes.forEach((element, index) => {
|
||||
element.scale = new Two.Vector(1, -1)
|
||||
})
|
||||
}
|
||||
mirror(element) {
|
||||
if (this.rotativa == false) {
|
||||
element.scale = new Two.Vector(1, -1)
|
||||
}
|
||||
|
||||
}
|
||||
remove() {
|
||||
this.drawingShapes.forEach(element => {
|
||||
element.remove()
|
||||
});
|
||||
this.textShapes.forEach(element => {
|
||||
element.remove()
|
||||
});
|
||||
this.vectorShapes.forEach(element => {
|
||||
element.remove()
|
||||
});
|
||||
}
|
||||
drawRows(y = 0) {
|
||||
for (let index = 0; index < this.columns; index++) {
|
||||
let rectangle = this.dw.makeRectangle(this.rectangleDimensions.width / 2 + this.offsetX * index, this.rectangleDimensions.height / 2 + y, this.rectangleDimensions.width, this.rectangleDimensions.height)
|
||||
let text = this.dw.makeText("A", this.rectangleDimensions.width / 2 + this.offsetX * index, this.rectangleDimensions.height / 2 + y)
|
||||
if ((index + 1) % 2) {
|
||||
this.mirror(text)
|
||||
}
|
||||
this.textShapes.push(text)
|
||||
this.drawingShapes.push(rectangle)
|
||||
}
|
||||
}
|
||||
drawRowsCosido(y = 0) {
|
||||
for (let index = 0; index < this.columns; index++) {
|
||||
let rectangle = this.dw.makeRectangle(this.rectangleCosidoDimensions.width / 2 + this.offsetCosidoX * index, this.rectangleCosidoDimensions.height / 2 + y, this.rectangleCosidoDimensions.width, this.rectangleCosidoDimensions.height)
|
||||
let textA = this.dw.makeText("N", this.rectangleCosidoDimensions.width / 4 + this.offsetCosidoX * index, this.rectangleCosidoDimensions.height / 2 + y)
|
||||
let textB = this.dw.makeText("1", this.rectangleCosidoDimensions.width * 3 / 4 + this.offsetCosidoX * index, this.rectangleCosidoDimensions.height / 2 + y)
|
||||
let line = this.dw.makeLine(rectangle.position.x, y, rectangle.position.x, this.rectangleCosidoDimensions.height + y)
|
||||
|
||||
this.textShapes.push(textA)
|
||||
this.textShapes.push(textB)
|
||||
this.drawingShapes.push(rectangle)
|
||||
this.drawingShapes.push(line)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
drawOrientation() {
|
||||
let vector;
|
||||
if (this.orientation == "H") {
|
||||
vector = this.dw.makeArrow(0, (this.offsetY) * this.rows, (this.offsetX) * (this.columns), (this.offsetY) * this.rows)
|
||||
this.dw.renderer.setSize((this.offsetX) * this.columns, (this.offsetY) * this.rows)
|
||||
let width = (this.offsetX) * this.columns * 1.1
|
||||
let height = (this.offsetY) * this.rows * 1.1
|
||||
Two.SVGRenderer.Utils.setAttributes(this.dw.renderer.domElement, { viewBox: `0 0 ${width} ${height}` })
|
||||
|
||||
|
||||
} else {
|
||||
vector = this.dw.makeArrow((this.offsetX) * this.columns, 0, (this.offsetX) * this.columns, (this.offsetY) * this.rows)
|
||||
this.dw.renderer.setSize((this.offsetX) * this.columns, (this.offsetY) * this.rows)
|
||||
let width = (this.offsetX) * this.columns * 1.1
|
||||
let height = (this.offsetY) * this.rows * 1.1
|
||||
Two.SVGRenderer.Utils.setAttributes(this.dw.renderer.domElement, { viewBox: `0 0 ${width} ${height}` })
|
||||
|
||||
}
|
||||
vector.linewidth = "3px"
|
||||
this.vectorShapes.push(vector)
|
||||
}
|
||||
drawOrientationCosido() {
|
||||
let vector;
|
||||
if (this.orientation == "H") {
|
||||
vector = this.dw.makeArrow(-this.rectangleDimensions.width / 2, (this.offsetCosidoY) * this.rows, (this.offsetCosidoX) * (this.columns), (this.offsetCosidoY) * this.rows)
|
||||
this.dw.renderer.setSize((this.offsetCosidoX) * this.columns, (this.offsetCosidoY) * this.rows)
|
||||
let width = (this.offsetCosidoX) * this.columns * 1.1
|
||||
let height = (this.offsetCosidoY) * this.rows * 1.1
|
||||
Two.SVGRenderer.Utils.setAttributes(this.dw.renderer.domElement, { viewBox: `0 0 ${width} ${height}` })
|
||||
} else {
|
||||
vector = this.dw.makeArrow((this.offsetCosidoX) * this.columns, 0, (this.offsetCosidoX) * this.columns, (this.offsetCosidoY) * this.rows)
|
||||
this.dw.renderer.setSize((this.offsetCosidoX) * this.columns, (this.offsetCosidoY) * this.rows)
|
||||
let width = (this.offsetX) * this.columns * 1.1
|
||||
let height = (this.offsetY) * this.rows * 1.1
|
||||
Two.SVGRenderer.Utils.setAttributes(this.dw.renderer.domElement, { viewBox: `0 0 ${width} ${height}` })
|
||||
|
||||
}
|
||||
vector.linewidth = "3px"
|
||||
this.vectorShapes.push(vector)
|
||||
}
|
||||
drawSchema() {
|
||||
|
||||
this.remove();
|
||||
for (let index = 0; index < this.rows; index++) {
|
||||
if (this.cosido) {
|
||||
this.drawRowsCosido(this.offsetY * index)
|
||||
} else {
|
||||
this.drawRows(this.offsetY * index)
|
||||
}
|
||||
}
|
||||
if (this.cosido) {
|
||||
this.drawOrientationCosido()
|
||||
} else {
|
||||
this.drawOrientation()
|
||||
}
|
||||
this.dw.update()
|
||||
}
|
||||
getSVG() {
|
||||
if (this.dw) {
|
||||
|
||||
return this.dw.renderer.domElement.outerHTML
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default ImposicionEsquemaDrawing
|
||||
@ -0,0 +1,8 @@
|
||||
|
||||
import Imposicion from "./imposicion.js"
|
||||
|
||||
$(() => {
|
||||
console.log("Imposicion")
|
||||
let imposicion = new Imposicion()
|
||||
imposicion.edit()
|
||||
})
|
||||
@ -0,0 +1,8 @@
|
||||
|
||||
import Imposicion from "./imposicion.js"
|
||||
|
||||
$(() => {
|
||||
console.log("Imposicion Esquema")
|
||||
let imposicion = new Imposicion()
|
||||
imposicion.init_imposicion_esquema_form()
|
||||
})
|
||||
@ -0,0 +1,59 @@
|
||||
import { alertConfirmationDelete } from "../../../components/alerts/sweetAlert.js"
|
||||
import ImposicionDatatable from "../../../components/datatables/ImposicionDatatable.js"
|
||||
import ImposicionEsquemaDatatable from "../../../components/datatables/ImposicionEsquemaDatatable.js"
|
||||
import ImposicionEsquemaForm from "../../../components/forms/ImposicionEsquemaForm.js"
|
||||
import ImposicionForm from "../../../components/forms/ImposicionForm.js"
|
||||
|
||||
class Imposicion {
|
||||
constructor() {
|
||||
this.itemTable = $("#tableOfImposiciones")
|
||||
this.itemEsquemaTable = $("#imposicion-esquema-table")
|
||||
this.itemForm = $("#form-imposicion")
|
||||
this.itemEsquemaForm = $("#form-imposicion-esquema")
|
||||
|
||||
this.imposicionDatatable = new ImposicionDatatable(this.itemTable)
|
||||
this.imposicionEsquemaDatatable = new ImposicionEsquemaDatatable(this.itemEsquemaTable)
|
||||
|
||||
}
|
||||
view() {
|
||||
this.imposicionDatatable.init()
|
||||
this.imposicionEsquemaDatatable.init()
|
||||
this.itemTable.on("click", ".imposicion-delete", this.deleteRow.bind(this))
|
||||
this.itemEsquemaTable.on("click", ".imposicion-esquema-delete", this.deleteEsquemaRow.bind(this))
|
||||
this.imposicionEsquemaForm = new ImposicionEsquemaForm(this.itemEsquemaForm)
|
||||
this.imposicionForm = new ImposicionForm(this.itemForm)
|
||||
|
||||
|
||||
}
|
||||
edit() {
|
||||
this.imposicionForm = new ImposicionForm(this.itemForm)
|
||||
this.imposicionForm.init()
|
||||
}
|
||||
new() {
|
||||
this.imposicionForm.initNew()
|
||||
}
|
||||
init_imposicion_esquema_form() {
|
||||
this.imposicionEsquemaForm = new ImposicionEsquemaForm(this.itemEsquemaForm)
|
||||
this.imposicionEsquemaForm.init()
|
||||
}
|
||||
deleteRow(event) {
|
||||
let modelId = $(event.currentTarget).data("id")
|
||||
alertConfirmationDelete().then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
this.imposicionForm.handleDelete(modelId)
|
||||
this.imposicionDatatable.datatable.ajax.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
deleteEsquemaRow(event) {
|
||||
let modelId = $(event.currentTarget).data("id")
|
||||
alertConfirmationDelete().then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
this.imposicionEsquemaForm.handleDelete(modelId)
|
||||
this.imposicionEsquemaDatatable.datatable.ajax.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default Imposicion
|
||||
@ -0,0 +1,8 @@
|
||||
|
||||
import Imposicion from "./imposicion.js"
|
||||
|
||||
$(() => {
|
||||
console.log("Imposicion")
|
||||
let imposicion = new Imposicion()
|
||||
imposicion.new()
|
||||
})
|
||||
@ -0,0 +1,8 @@
|
||||
|
||||
import Imposicion from "./imposicion.js"
|
||||
|
||||
$(() => {
|
||||
console.log("Imposicion")
|
||||
let imposicion = new Imposicion()
|
||||
imposicion.view()
|
||||
})
|
||||
@ -1,5 +1,4 @@
|
||||
$(() => {
|
||||
console.log("PDF")
|
||||
var opt = {
|
||||
margin: 2,
|
||||
filename: "PDF_OrdenTrabajo_" + $(".pdf-wrapper").data("id") + ".pdf",
|
||||
@ -7,6 +6,6 @@ $(() => {
|
||||
html2canvas: { scale: 4 },
|
||||
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
|
||||
};
|
||||
let elementToPdf = $('body')[0]
|
||||
let elementToPdf = $('body')[0]
|
||||
html2pdf().set(opt).from(elementToPdf).save()
|
||||
})
|
||||
@ -16,6 +16,9 @@ class OrdenTrabajo {
|
||||
this.tareaCommentModal = new Modal($("#modalCommentTarea"))
|
||||
this.alertOrdenTrabajo = this.item.find("#alert-orden-trabajo");
|
||||
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.pedidoEnEsperaCheck = this.item.find("#ot-pedido-espera");
|
||||
this.pedidoEnEsperaBy = this.item.find("#pedido_espera_by");
|
||||
@ -81,6 +84,15 @@ class OrdenTrabajo {
|
||||
this.prepGrapado = new DatePicker(this.otForm.find("#ot-prep-grapado"), option)
|
||||
this.prepSolapa = new DatePicker(this.otForm.find("#ot-prep-solapa"), option)
|
||||
|
||||
this.prepPrototipo = new DatePicker(this.otForm.find("#ot-prep-prototipo"), option)
|
||||
this.prepMarcapaginas = new DatePicker(this.otForm.find("#ot-prep-marcapaginas"), option)
|
||||
this.prepRetractilado = new DatePicker(this.otForm.find("#ot-prep-retractilado"), option)
|
||||
this.prepRetractilado5 = new DatePicker(this.otForm.find("#ot-prep-retractilado5"), option)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.espiral = new DatePicker(this.otForm.find("#ot-espiral"), option)
|
||||
this.embalaje = new DatePicker(this.otForm.find("#ot-embalaje"), option)
|
||||
this.envio = new DatePicker(this.otForm.find("#ot-envio"), option)
|
||||
@ -131,6 +143,8 @@ class OrdenTrabajo {
|
||||
this.otForm.on("click", "#btn-upload-portada", this.handleUploadPortada.bind(this))
|
||||
this.otForm.on("click", "#btn-delete-portada", this.handleDeletePortada.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.item.on("click", "#btn-reset-tareas", this.handleResetTareasDeleteConfirmation.bind(this))
|
||||
this.otForm.on("click", ".ot-tarea-comment", this.handleNoteTarea.bind(this))
|
||||
@ -181,14 +195,14 @@ class OrdenTrabajo {
|
||||
}
|
||||
_renderMaquinaSelectTable(d, t) {
|
||||
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>
|
||||
</select>`
|
||||
|
||||
}
|
||||
_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>
|
||||
</select>`
|
||||
return render
|
||||
@ -197,8 +211,10 @@ class OrdenTrabajo {
|
||||
_renderActionCell(d, t) {
|
||||
|
||||
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-btn-delete" data-id="${d.id}"><i class="ti ti-trash ti-sm mx-2"></i></a>
|
||||
<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-btn-delete" data-id="${d.id}"><i class="ti ti-trash ti-sm mx-2 ${this.isOtFinalizada ? "d-none" : ""}" ></i></a>
|
||||
</div>`
|
||||
return cell;
|
||||
}
|
||||
@ -206,7 +222,7 @@ class OrdenTrabajo {
|
||||
|
||||
return `
|
||||
<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">
|
||||
<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>
|
||||
@ -225,7 +241,7 @@ class OrdenTrabajo {
|
||||
if (element.presupuesto_preimpresion_id) this.createSelectMaquinaAll(selectItem)
|
||||
if (element.presupuesto_extra_id) this.createSelectMaquinaAll(selectItem)
|
||||
if (this.summaryData.impresion_interior_bn) {
|
||||
let isTareaImpresionInteriorBN = this.summaryData.impresion_interior_bn?.presupuesto_linea_id == element.presupuesto_linea_id
|
||||
let isTareaImpresionInteriorBN = this.summaryData.impresion_interior_bn?.presupuesto_linea_id == element.presupuesto_linea_id && element.is_corte == false
|
||||
if (isTareaImpresionInteriorBN) {
|
||||
let selectItemImposicion = this.item.find("#select-imposicion-tarea-" + element.id);
|
||||
this.createSelectImposicion(selectItemImposicion)
|
||||
@ -235,7 +251,7 @@ class OrdenTrabajo {
|
||||
}
|
||||
}
|
||||
if (this.summaryData.impresion_interior_color) {
|
||||
let isTareaImpresionInteriorColor = this.summaryData.impresion_interior_color?.presupuesto_linea_id == element.presupuesto_linea_id
|
||||
let isTareaImpresionInteriorColor = this.summaryData.impresion_interior_color?.presupuesto_linea_id == element.presupuesto_linea_id && element.is_corte == false
|
||||
if (isTareaImpresionInteriorColor) {
|
||||
let selectItemImposicion = this.item.find("#select-imposicion-tarea-" + element.id);
|
||||
this.createSelectImposicion(selectItemImposicion)
|
||||
@ -342,6 +358,7 @@ class OrdenTrabajo {
|
||||
this.fillOtDetails()
|
||||
this.fillOtDates()
|
||||
this.fillPreimpresionReview()
|
||||
this.isOtFinalizada = this.summaryData.ot.estado == "F";
|
||||
this.datatableTareas.ajax.reload()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
@ -397,6 +414,11 @@ class OrdenTrabajo {
|
||||
this.prepSolapa.setDate(this.summaryData.dates.solapa_at)
|
||||
this.prepGrapado.setDate(this.summaryData.dates.grapado_at)
|
||||
|
||||
this.prepPrototipo.setDate(this.summaryData.dates.prototipo_at)
|
||||
this.prepMarcapaginas.setDate(this.summaryData.dates.marcapaginas_at)
|
||||
this.prepRetractilado.setDate(this.summaryData.dates.retractilado_at)
|
||||
this.prepRetractilado5.setDate(this.summaryData.dates.retractilado5_at)
|
||||
|
||||
this.espiral.setDate(this.summaryData.dates.fecha_impresion_at)
|
||||
this.embalaje.setDate(this.summaryData.dates.embalaje_at)
|
||||
this.envio.setDate(this.summaryData.dates.envio_at)
|
||||
@ -635,7 +657,7 @@ class OrdenTrabajo {
|
||||
this.handleEstadoChangeSuccess.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 => {
|
||||
if (result.isConfirmed) {
|
||||
ajax.post()
|
||||
@ -646,8 +668,28 @@ class OrdenTrabajo {
|
||||
popSuccessAlert(response.message)
|
||||
this.alertOrdenTrabajo.removeClass("alert-info").addClass("alert-success")
|
||||
this.btnFinalizarPedido.prop("disabled", true);
|
||||
window.location.reload();
|
||||
}
|
||||
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) {
|
||||
const orden_tarea_id = $(event.currentTarget).data("id")
|
||||
alertConfirmationDelete("¿Estás seguro de realizar esta acción?")
|
||||
|
||||
@ -39,14 +39,11 @@ body{
|
||||
align-content : center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size : 20px;
|
||||
font-size : 14px;
|
||||
|
||||
}
|
||||
.esquema{
|
||||
display: flex;
|
||||
justify-content:center;
|
||||
width: 100%;
|
||||
justify-items: center;
|
||||
|
||||
|
||||
}
|
||||
.pagina-imposicion-outer-start{
|
||||
@ -89,10 +86,7 @@ body{
|
||||
|
||||
}
|
||||
.esquema-imposicion-wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
.imposicion{
|
||||
display: flex;
|
||||
@ -173,10 +167,11 @@ table td{
|
||||
color: white;
|
||||
}
|
||||
.cmyk{
|
||||
background-image: url('/themes/vuexy/img/safekat/presupuestos/cmyk.png')
|
||||
background-image: url('/themes/vuexy/img/safekat/presupuestos/cmyk.png');
|
||||
background-size: 110px;
|
||||
text-shadow: 0px 0px 1px black;
|
||||
stroke:black;
|
||||
color : white;
|
||||
text-shadow: 0px 0px 2px black;
|
||||
stroke:white;
|
||||
}
|
||||
.bn{
|
||||
background : black;
|
||||
|
||||
Reference in New Issue
Block a user