funcionando lineas presupuesto plana
@ -571,12 +571,17 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
$linea = PresupuestoService::getCostesLinea($uso, $datosPedido, $maquina, $papel, $opciones_papel, $tarifa);
|
||||
$linea['fields']['maquina'] = $maquina->maquina;
|
||||
$linea['fields']['maquina_id'] = $maquina->maquina_id;
|
||||
$linea['fields']['maquina_velocidad'] = $maquina->velocidad;
|
||||
$linea['fields']['papel_impresion'] = $papel->nombre;
|
||||
$linea['fields']['papel_impresion_id'] = $papel->id;
|
||||
$linea['fields']['paginas'] = $datosPedido->paginas;
|
||||
$linea['fields']['gramaje'] = $gramaje;
|
||||
$linea['fields']['papel_generico_id'] = $papel_generico['id'];
|
||||
$linea['fields']['papel_generico'] = $papel_generico['nombre'];
|
||||
$linea['fields']['tiempo_maquina'] = PresupuestoService::getTiempoMaquina(
|
||||
$linea['fields']['precio_click_pedido'],
|
||||
$linea['fields']['precio_click'],
|
||||
$maquina->velocidad);
|
||||
|
||||
array_push($lineas, $linea);
|
||||
}
|
||||
@ -674,6 +679,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
$linea['fields']['a_favor_fibra'] = $parametrosRotativa->a_favor_fibra;
|
||||
$linea['fields']['maquina'] = $maquina->maquina;
|
||||
$linea['fields']['maquina_id'] = $maquina->maquina_id;
|
||||
$linea['fields']['maquina_velocidad'] = $maquina->velocidad;
|
||||
$linea['fields']['papel_impresion'] = $papel->nombre;
|
||||
$linea['fields']['papel_impresion_id'] = $papel->id;
|
||||
$linea['fields']['paginas'] = $datosPedido->paginas;
|
||||
@ -689,6 +695,10 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
$linea['fields']['precio_click'] = $tarifa;
|
||||
$linea['fields']['precio_click_pedido'] = $linea['fields']['clicks_pedido'] * $linea['fields']['precio_click'];
|
||||
|
||||
$linea['fields']['tiempo_maquina'] = PresupuestoService::getTiempoMaquina(
|
||||
$linea['fields']['precio_click_pedido'],
|
||||
$linea['fields']['precio_click'],
|
||||
$maquina->velocidad);
|
||||
|
||||
// total linea rotativa
|
||||
$linea['fields']['total_impresion'] = $linea['fields']['precio_pedido'] + $linea['fields']['precio_click_pedido'] + $linea['fields']['precio_tinta'] +
|
||||
|
||||
@ -94,6 +94,12 @@ return [
|
||||
'rotativa' => 'Rotary',
|
||||
'si' => 'Yes',
|
||||
'no' => 'No',
|
||||
'insertarLinea' => 'Insert Line',
|
||||
'plana' => 'flat',
|
||||
'rotativa' => 'rotary',
|
||||
'lineasPresupuesto' => 'Budget Lines',
|
||||
'tiempo' => 'Time',
|
||||
|
||||
|
||||
/* '4x0' => '4x0',
|
||||
'4x4' => '4x4',
|
||||
|
||||
@ -93,6 +93,11 @@ return [
|
||||
'rotativa' => 'Rotativa',
|
||||
'si' => 'Si',
|
||||
'no' => 'No',
|
||||
'insertarLinea' => 'Insertar Línea',
|
||||
'plana' => 'plana',
|
||||
'rotativa' => 'rotativa',
|
||||
'lineasPresupuesto' => 'Líneas Presupuesto',
|
||||
'tiempo' => 'Tiempo',
|
||||
|
||||
'servicioAcabado' => 'Servicio de acabado',
|
||||
'servicioPreimpresion' => 'Servicio de preimpresión',
|
||||
|
||||
@ -350,7 +350,7 @@ class MaquinaModel extends \App\Models\GoBaseModel
|
||||
->select(
|
||||
"t1.id AS maquina_id, t1.nombre AS maquina, t1.ancho_impresion AS ancho_impresion,
|
||||
t1.alto_impresion AS alto_impresion, t1.ancho AS ancho, t1.alto AS alto,
|
||||
t1.is_rotativa AS is rotativa, t1.alto_click AS alto_click,
|
||||
t1.is_rotativa AS is rotativa, t1.alto_click AS alto_click, t1.velocidad AS velocidad,
|
||||
t1.precio_tinta_negro AS precio_tinta_negro, t1.precio_tinta_color AS precio_tinta_color,
|
||||
t1.velocidad_corte AS velocidad_corte, t1.precio_hora_corte AS precio_hora_corte,
|
||||
t1.forzar_num_formas_horizontales_cubierta AS forzar_num_formas_horizontales_cubierta,
|
||||
|
||||
@ -122,7 +122,9 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
|
||||
if($is_cubierta==true){
|
||||
$builder->where("t2.cubierta", 1);
|
||||
}
|
||||
else if($is_sobrecubierta==true){
|
||||
}
|
||||
if(!is_null($is_sobrecubierta)){
|
||||
if($is_sobrecubierta==true){
|
||||
$builder->where("t2.sobrecubierta", 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -360,6 +360,14 @@ class PresupuestoService extends BaseService
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static function getTiempoMaquina($totalClicks, $precioClick, $velocidadMaquina) {
|
||||
|
||||
$minutos = (1.0*$totalClicks/$precioClick)/$velocidadMaquina;
|
||||
|
||||
return gmdate("H:i:s", round($minutos*60,0));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Devuelve la dimensión del lomo interior.
|
||||
*/
|
||||
@ -398,4 +406,6 @@ class PresupuestoService extends BaseService
|
||||
|
||||
return $peso;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -254,9 +254,7 @@
|
||||
<div id="accordionCompInteriorPlanaTip" class="accordion-collapse collapse" data-bs-parent="#accordionCompInteriorPlana">
|
||||
<div class="accordion-body">
|
||||
|
||||
|
||||
|
||||
<table id="tableCompIntPlana" class="comparator-table table dt-responsive dataTable">
|
||||
<table id="tableCompIntPlana" class="comparator-table table dt-responsive dataTable" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.tipo') ?></th>
|
||||
@ -287,6 +285,15 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<div >
|
||||
<button type="button" name="insertarPlanaBtn"
|
||||
id="insertarPlanaBtn"
|
||||
class="btn btn-primary float-end me-sm-3 me-1 mb-3 insertarLinea d-none">
|
||||
<?= lang('Presupuestos.insertarLinea').' '.strtoupper(lang('Presupuestos.plana')) ?>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -305,7 +312,7 @@
|
||||
<div class="accordion-body">
|
||||
|
||||
|
||||
<table id="tableCompIntRotativa" class="comparator-table table dt-responsive dataTable">
|
||||
<table id="tableCompIntRotativa" class="comparator-table table dt-responsive dataTable" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.tipo') ?></th>
|
||||
@ -341,6 +348,14 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<div >
|
||||
<button type="button" name="insertarRotativaBtn"
|
||||
id="insertarRotativaBtn"
|
||||
class="btn btn-primary float-end me-sm-3 me-1 mb-3 insertarLinea d-none">
|
||||
<?= lang('Presupuestos.insertarLinea').' '.strtoupper(lang('Presupuestos.rotativa')) ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -388,6 +403,13 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<button type="button" name="insertarCubiertaBtn"
|
||||
id="insertarCubiertaBtn"
|
||||
class="btn btn-primary float-end me-sm-3 me-1 mb-3 insertarLinea d-none">
|
||||
<?= lang('Presupuestos.insertarLinea').' '.strtoupper(lang('Presupuestos.cubierta')) ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,32 +1,42 @@
|
||||
<div class="accordion mt-3" id="accordionEncuadernacion">
|
||||
<div class="accordion mt-3" id="accordionLineasPresupuesto">
|
||||
<div class="card accordion-item active">
|
||||
<h2 class="accordion-header" id="headingOne">
|
||||
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionEncuadernacionTip" aria-expanded="false" aria-controls="accordionEncuadernacionTip">
|
||||
<h4><?= lang("Presupuestos.encuadernacion") ?></h4>
|
||||
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionLineasPresupuestoTip" aria-expanded="false" aria-controls="accordionLineasPresupuestoTip">
|
||||
<h4><?= lang("Presupuestos.lineasPresupuesto") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="accordionEncuadernacionTip" class="accordion-collapse collapse show" data-bs-parent="#accordionEncuadernacion">
|
||||
<div id="accordionLineasPresupuestoTip" class="accordion-collapse collapse show" data-bs-parent="#accordionLineasPresupuesto">
|
||||
<div class="accordion-body">
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="encuadernacion" class="form-label">
|
||||
<?= lang('Presupuestos.encuadernacion') ?>*
|
||||
</label>
|
||||
|
||||
<select id="encuadernacion" name="encuadernacion" class="form-control select2bs2" style="width: 100%;">
|
||||
<!---
|
||||
<?php if (isset($papelFormatoList) && is_array($papelFormatoList) && !empty($papelFormatoList)) :
|
||||
foreach ($papelFormatoList as $formato) : ?>
|
||||
<option value="<?= $formato->id ?>" <?= $formato->id == $presupuestoEntity->papel_formato_id ? ' selected' : '' ?>>
|
||||
<?= $formato->tamanio ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
--->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<table id="tableLineasPresupuesto" class="comparator-table table dt-responsive dataTable" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="padding-right: 0.75em;" width="33px"></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.paginas') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.papel') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.gramaje') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.marca') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.maquina') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.tiempo') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.numeroPliegos') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
|
||||
<th style="padding-right: 0.75em;"></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalClicks') ?></th>
|
||||
<th style="padding-right: 0.75em;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -92,10 +92,12 @@ $('#compRetractilado').on("change", function () {
|
||||
checkRetractiladoComparador(this);
|
||||
});
|
||||
|
||||
|
||||
$('#compRetractilado5').on("change", function () {
|
||||
checkRetractiladoComparador(this);
|
||||
});
|
||||
|
||||
|
||||
$('#imagenesBnInterior').on("change", function () {
|
||||
var e = document.getElementById('tipoImpresion');
|
||||
var optionToHide = e.querySelector("option[value='negro']");
|
||||
@ -113,6 +115,7 @@ $('#imagenesBnInterior').on("change", function () {
|
||||
$('#tipoImpresion').select2();
|
||||
});
|
||||
|
||||
|
||||
$('#compPosPaginasColor').on("keyup", function () {
|
||||
computarPaginasColor(this.value);
|
||||
});
|
||||
@ -131,6 +134,10 @@ $('.accordion-button').on('click', function (e) {
|
||||
else if(e.target.id.includes("cubierta")){
|
||||
$("#tableCompCubierta").DataTable().columns.adjust();
|
||||
}
|
||||
else if(e.target.id.includes("LineasPresupuesto")){
|
||||
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
@ -140,6 +147,50 @@ $('.accordion-button').on('click', function (e) {
|
||||
/*******************************
|
||||
* Metodos
|
||||
*******************************/
|
||||
$('.insertarLinea').on("click", function (e) {
|
||||
|
||||
if(e.target.id.includes("Plana")){
|
||||
// Se borran todas las líneas que no sean cubierta y sobrecubierta
|
||||
$('#tableLineasPresupuesto').DataTable()
|
||||
.rows( function ( idx, data, node ) {
|
||||
return data[0] !== 'cubierta' && data[0] !== 'sobrecubierta';
|
||||
} )
|
||||
.remove()
|
||||
.draw();
|
||||
|
||||
var rows = $("#tableCompIntPlana").DataTable().rows( '.selected' ).data().toArray();
|
||||
console.log(rows);
|
||||
for(row of rows){
|
||||
$('#tableLineasPresupuesto').DataTable().row.add({
|
||||
'tipo': row['tipo'],
|
||||
'paginas': row['paginas'],
|
||||
'papel': row['papel'],
|
||||
'gramaje': row['gramaje'],
|
||||
'marca': row['marca'],
|
||||
'maquina': row['maquina'],
|
||||
'tiempo': row['tiempoMaquina'],
|
||||
'numeroPliegos': row['numeroPliegos'],
|
||||
'pliegosPedido': row['pliegosPedido'],
|
||||
'precioPliego': row['precioPliego'],
|
||||
'libro': row['libro'],
|
||||
'totalPapelPedido': row['totalPapelPedido'],
|
||||
'chekPapel': true,
|
||||
'lomo': row['lomo'],
|
||||
'peso': row['peso'],
|
||||
'click': row['click'],
|
||||
'totalClicks': row['totalClicks'],
|
||||
'chekClicks': true,
|
||||
'maquinaId': row['maquinaId'],
|
||||
'maquinaVelocidad': row['maquinaVelocidad'],
|
||||
'papelGenericoId': row['papelGenericoId'],
|
||||
'papelImpresionId': row['papelImpresionId'],
|
||||
}
|
||||
).draw();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function getRowFromLineaInt(tipo, linea) {
|
||||
|
||||
return {
|
||||
@ -160,6 +211,11 @@ function getRowFromLineaInt(tipo, linea) {
|
||||
'totalClicks': isNaN(parseFloat(linea.fields.precio_click_pedido)) ? "" : parseFloat(linea.fields.precio_click_pedido).toFixed(2),
|
||||
'total': isNaN(parseFloat(linea.fields.precio_pedido) + parseFloat(linea.fields.precio_click_pedido)) ?
|
||||
"" : (parseFloat(linea.fields.precio_pedido) + parseFloat(linea.fields.precio_click_pedido)).toFixed(2),
|
||||
'maquinaId': linea.fields.maquina_id,
|
||||
'maquinaVelocidad': linea.fields.maquina_velocidad,
|
||||
'tiempoMaquina': linea.fields.tiempo_maquina,
|
||||
'papelGenericoId': linea.fields.papel_generico_id,
|
||||
'papelImpresionId': linea.fields.papel_impresion_id,
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,9 +243,15 @@ function getRowFromLineaRot(linea) {
|
||||
'totalTinta':isNaN(parseFloat(linea.fields.precio_tinta)) ? "" : parseFloat(linea.fields.precio_tinta).toFixed(2),
|
||||
'totalCorte':isNaN(parseFloat(linea.fields.total_corte)) ? "" : parseFloat(linea.fields.total_corte).toFixed(2),
|
||||
'total': isNaN(parseFloat(linea.fields.total_impresion)) ? "" : (parseFloat(linea.fields.total_impresion)).toFixed(2),
|
||||
'maquinaId': linea.fields.maquina_id,
|
||||
'maquinaVelocidad': linea.fields.maquina_velocidad,
|
||||
'tiempoMaquina': linea.fields.tiempo_maquina,
|
||||
'papelGenericoId': linea.fields.papel_generico_id,
|
||||
'papelImpresionId': linea.fields.papel_impresion_id,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function checkDatosPedidoForComp() {
|
||||
|
||||
if (parseInt($('#paginas').val()) > 0 &&
|
||||
@ -208,7 +270,6 @@ function init_comparador() {
|
||||
if (paginasColor.value.length > 0) {
|
||||
computarPaginasColor(paginasColor.value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -240,6 +301,7 @@ function computarPaginasColor(string) {
|
||||
autosize.update(calPagesTextarea);
|
||||
}
|
||||
|
||||
|
||||
function checkRetractiladoComparador(element) {
|
||||
|
||||
switch (element.id) {
|
||||
@ -341,6 +403,7 @@ function clearNegro() {
|
||||
$('#compPapelNegro').val('data', { id: '0' });
|
||||
}
|
||||
|
||||
|
||||
function clearIntLineas(is_color){
|
||||
$("#tableCompIntPlana").DataTable().rows( '.selected' ).deselect();
|
||||
var tabla = $('#tableCompIntPlana').DataTable();
|
||||
@ -350,13 +413,16 @@ function clearIntLineas(is_color){
|
||||
} )
|
||||
.remove()
|
||||
.draw();
|
||||
$('#insertarPlanaBtn').css('display', 'none');
|
||||
}
|
||||
|
||||
|
||||
function clearCubierta(){
|
||||
|
||||
$('#tableCompCubierta').DataTable().clear().draw();
|
||||
}
|
||||
|
||||
|
||||
function clearIntRot(){
|
||||
|
||||
$('#tableCompIntRotativa').DataTable().clear().draw();
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoItems") ?>
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems") ?>
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems") ?>
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems") ?>
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosServiciosItems") ?>
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_comentariosItems") ?>
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_resumenPresupuestoItems") ?>
|
||||
@ -207,7 +208,19 @@
|
||||
{ 'data': 'click' },
|
||||
{ 'data': 'totalClicks' },
|
||||
{ 'data': 'total' },
|
||||
{ 'data': 'maquinaId'},
|
||||
{ 'data': 'maquinaVelocidad'},
|
||||
{ 'data': 'tiempoMaquina'},
|
||||
{ 'data': 'papelGenericoId'},
|
||||
{ 'data': 'papelImpresionId'}
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
target: [16,17,18,19,20],
|
||||
visible: false,
|
||||
searchable: false
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
@ -256,7 +269,19 @@
|
||||
{ 'data': 'totalTinta' },
|
||||
{ 'data': 'totalCorte' },
|
||||
{ 'data': 'total' },
|
||||
{ 'data': 'maquinaId'},
|
||||
{ 'data': 'maquinaVelocidad'},
|
||||
{ 'data': 'tiempoMaquina'},
|
||||
{ 'data': 'papelGenericoId'},
|
||||
{ 'data': 'papelImpresionId'}
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
target: [21,22,23,24,25],
|
||||
visible: false,
|
||||
searchable: false
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
var tableCompCubierta = new DataTable('#tableCompCubierta',{
|
||||
@ -294,49 +319,102 @@
|
||||
{ 'data': 'click' },
|
||||
{ 'data': 'totalClicks' },
|
||||
{ 'data': 'total' },
|
||||
{ 'data': 'maquinaId'},
|
||||
{ 'data': 'maquinaVelocidad'},
|
||||
{ 'data': 'tiempoMaquina'},
|
||||
{ 'data': 'papelGenericoId'},
|
||||
{ 'data': 'papelImpresionId'}
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
target: [16,17,18,19,20],
|
||||
visible: false,
|
||||
searchable: false
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
$('#compPapelNegro').on('select2:select', function (e){
|
||||
|
||||
if($('#compPapelNegro').select2('data')[0].id=='0'){
|
||||
$('#compGramajeNegro').val('').change();
|
||||
$('#compGramajeNegro').prop('disabled', true);
|
||||
}
|
||||
|
||||
else{
|
||||
$('#compGramajeNegro').val('').change();
|
||||
$('#compGramajeNegro').empty().trigger("change");
|
||||
$('#compGramajeNegro').prop('disabled', false);
|
||||
$('#compGramajeNegro').select2({
|
||||
allowClear: true,
|
||||
minimumResultsForSearch: Infinity,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
tipo: 'gramaje',
|
||||
uso: 'bn',
|
||||
datos: $('#compPapelNegro').select2('data')[0].text.trim() ,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
var tableLineasPresupuesto = new DataTable('#tableLineasPresupuesto',{
|
||||
scrollX: true,
|
||||
searching: false,
|
||||
paging: false,
|
||||
info: false,
|
||||
ordering: false,
|
||||
responsive: true,
|
||||
select: false,
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
columns: [
|
||||
{ 'data': 'tipo',
|
||||
'render': function ( data, type, row, meta ) {
|
||||
if(data=='bn')
|
||||
return '<img src=\"<?= site_url("themes/vuexy/img/safekat/presupuestos/icon_bn.png") ?>\" />';
|
||||
else if(data=='bnhq')
|
||||
return '<img src=\"<?= site_url("themes/vuexy/img/safekat/presupuestos/icon_bnhq.png") ?>\" />';
|
||||
else if(data=='color')
|
||||
return '<img src=\"<?= site_url("themes/vuexy/img/safekat/presupuestos/icon_color.png") ?>\" />';
|
||||
else if(data=='colorhq')
|
||||
return '<img src=\"<?= site_url("themes/vuexy/img/safekat/presupuestos/icon_colorhq.png") ?>\" />';
|
||||
else if(data=='rotativabn')
|
||||
return '<img src=\"<?= site_url("themes/vuexy/img/safekat/presupuestos/icon_rotativa_bn.png") ?>\" />';
|
||||
else if(data=='rotativacolor')
|
||||
return '<img src=\"<?= site_url("themes/vuexy/img/safekat/presupuestos/icon_rotativa_color.png") ?>\" />';
|
||||
else
|
||||
return '';
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
{ 'data': 'paginas' },
|
||||
{ 'data': 'papel' },
|
||||
{ 'data': 'gramaje' },
|
||||
{ 'data': 'marca' },
|
||||
{ 'data': 'maquina' },
|
||||
{ 'data': 'tiempo' },
|
||||
{ 'data': 'numeroPliegos' },
|
||||
{ 'data': 'pliegosPedido' },
|
||||
{ 'data': 'precioPliego' },
|
||||
{ 'data': 'libro' },
|
||||
{ 'data': 'totalPapelPedido' },
|
||||
{ 'data': 'chekPapel',
|
||||
render: function (data,type,row) {
|
||||
if (data == true) {
|
||||
return '<input type="checkbox" checked>';
|
||||
} else {
|
||||
return '<input type="checkbox">';
|
||||
}
|
||||
return data;
|
||||
}
|
||||
},
|
||||
{ 'data': 'lomo' },
|
||||
{ 'data': 'peso' },
|
||||
{ 'data': 'click' },
|
||||
{ 'data': 'totalClicks' },
|
||||
{ 'data': 'chekClicks',
|
||||
render: function (data,type,row) {
|
||||
if (data == true) {
|
||||
return '<input type="checkbox" checked>';
|
||||
} else {
|
||||
return '<input type="checkbox">';
|
||||
}
|
||||
return data;
|
||||
}
|
||||
},
|
||||
{ 'data': 'maquinaId'},
|
||||
{ 'data': 'tiempoMaquina'},
|
||||
{ 'data': 'maquinaVelocidad'},
|
||||
{ 'data': 'papelGenericoId'},
|
||||
{ 'data': 'papelImpresionId'}
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
target: [18,19,20,21,22],
|
||||
visible: false,
|
||||
searchable: false
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
$('.comp_negro_items').on('change', function (e) {
|
||||
|
||||
checkComparadorInt(false,false);
|
||||
@ -388,9 +466,12 @@
|
||||
fillIntPlana(data, is_color, is_hq);
|
||||
selectIntLineas();
|
||||
$('#title_int_plana').html('<?= lang("Presupuestos.compInteriorPlana") ?>' + ' (' + tableCompIntPlana.rows().count() + ')');
|
||||
$('#insertarPlanaBtn').removeClass('d-none')
|
||||
}
|
||||
else{
|
||||
$('#title_int_plana').html('<?= lang("Presupuestos.compInteriorPlana") ?>');
|
||||
$('#insertarPlanaBtn').addClass('d-none')
|
||||
$('#total_comp_plana').html('0.00');
|
||||
}
|
||||
yeniden(data.<?= csrf_token() ?>);
|
||||
return true;
|
||||
@ -440,9 +521,13 @@
|
||||
fillIntRot(data);
|
||||
selectIntRotLineas();
|
||||
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>' + ' (' + tableCompIntRotativa.rows().count() + ')');
|
||||
$('#insertarRotativaBtn').removeClass('d-none')
|
||||
}
|
||||
else{
|
||||
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>');
|
||||
$('#insertarRotativaBtn').addClass('d-none')
|
||||
$('#total_comp_rot').html('0.00')
|
||||
|
||||
}
|
||||
yeniden(data.<?= csrf_token() ?>);
|
||||
return true;
|
||||
@ -490,14 +575,18 @@
|
||||
clearCubierta();
|
||||
|
||||
if(data.lineas.length >0){
|
||||
console.log(data.lineas);
|
||||
|
||||
fillCubierta(data);
|
||||
selectCubiertaLineas();
|
||||
$('#title_cubierta').html('<?= lang("Presupuestos.cubierta") ?>' + ' (' + tableCompCubierta.rows().count() + ')');
|
||||
$('#insertarCubiertaBtn').removeClass('d-none')
|
||||
|
||||
}
|
||||
else{
|
||||
$('#title_cubierta').html('<?= lang("Presupuestos.cubierta") ?>');
|
||||
$('#insertarCubiertaBtn').addClass('d-none')
|
||||
$('#total_comp_cubierta').html('0.00')
|
||||
|
||||
}
|
||||
yeniden(data.<?= csrf_token() ?>);
|
||||
return true;
|
||||
@ -567,10 +656,57 @@
|
||||
}
|
||||
else{
|
||||
clearIntLineas(is_color);
|
||||
clearIntRot();
|
||||
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>');
|
||||
$('#title_int_plana').html('<?= lang("Presupuestos.compInteriorPlana") ?>');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#compPapelNegro').on('select2:select', function (e){
|
||||
|
||||
if($('#compPapelNegro').select2('data')[0].id=='0'){
|
||||
$('#compGramajeNegro').val('').change();
|
||||
$('#compGramajeNegro').prop('disabled', true);
|
||||
}
|
||||
|
||||
else{
|
||||
$('#insertarPlanaBtn').addClass('d-none')
|
||||
$('#insertarRotativaBtn').addClass('d-none')
|
||||
$('#total_comp_plana').html('0.00')
|
||||
$('#total_comp_rot').html('0.00')
|
||||
$('#compGramajeNegro').val('').change();
|
||||
$('#compGramajeNegro').empty().trigger("change");
|
||||
$('#compGramajeNegro').prop('disabled', false);
|
||||
$('#compGramajeNegro').select2({
|
||||
allowClear: true,
|
||||
minimumResultsForSearch: Infinity,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
tipo: 'gramaje',
|
||||
uso: 'bn',
|
||||
datos: $('#compPapelNegro').select2('data')[0].text.trim() ,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#compPapelNegrohq').on('select2:select', function (e){
|
||||
|
||||
@ -579,6 +715,10 @@
|
||||
$('#compGramajeNegrohq').prop('disabled', true);
|
||||
}
|
||||
else{
|
||||
$('#insertarPlanaBtn').addClass('d-none')
|
||||
$('#insertarRotativaBtn').addClass('d-none')
|
||||
$('#total_comp_plana').html('0.00')
|
||||
$('#total_comp_rot').html('0.00')
|
||||
$('#compGramajeNegrohq').empty().trigger("change");
|
||||
$('#compGramajeNegrohq').prop('disabled', false);
|
||||
$('#compGramajeNegrohq').select2({
|
||||
@ -618,6 +758,10 @@
|
||||
$('#compGramajeColor').prop('disabled', true);
|
||||
}
|
||||
else{
|
||||
$('#insertarPlanaBtn').addClass('d-none')
|
||||
$('#insertarRotativaBtn').addClass('d-none')
|
||||
$('#total_comp_plana').html('0.00')
|
||||
$('#total_comp_rot').html('0.00')
|
||||
$('#compGramajeColor').empty().trigger("change");
|
||||
$('#compGramajeColor').prop('disabled', false);
|
||||
$('#compPapelColor').find('option[value="0"]').remove();
|
||||
@ -658,6 +802,10 @@
|
||||
$('#compGramajeColorhq').prop('disabled', true);
|
||||
}
|
||||
else{
|
||||
$('#insertarPlanaBtn').addClass('d-none')
|
||||
$('#insertarRotativaBtn').addClass('d-none')
|
||||
$('#total_comp_plana').html('0.00')
|
||||
$('#total_comp_rot').html('0.00')
|
||||
$('#compGramajeColorhq').empty().trigger("change");
|
||||
$('#compGramajeColorhq').prop('disabled', false);
|
||||
$('#compPapelColorhq').find('option[value="0"]').remove();
|
||||
@ -696,6 +844,8 @@
|
||||
$('#compGramajeCubierta').prop('disabled', true);
|
||||
}
|
||||
else{
|
||||
$('#insertarCubiertaBtn').addClass('d-none')
|
||||
$('#total_comp_cubierta').html('0.00')
|
||||
$('#compGramajeCubierta').val('').trigger('change');
|
||||
$('#compGramajeCubierta').prop('disabled', false);
|
||||
$('#compPapelCubierta').find('option[value="0"]').remove();
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?=lang('Presupuestos.presupuestoCosidotapablandaList') ?></h3>
|
||||
<?=anchor(route_to('newCosidotapablanda'), lang('Basic.global.addNew').' '.lang('Presupuestos.presupuesto'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
<?=anchor(route_to('newCosidotapablanda'), lang('Basic.global.addNew').' '.lang('Presupuestos.presupuesto'), ['class'=>'btn btn-primary ']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
BIN
httpdocs/themes/vuexy/img/safekat/presupuestos/icon_bn.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
httpdocs/themes/vuexy/img/safekat/presupuestos/icon_bnhq.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
httpdocs/themes/vuexy/img/safekat/presupuestos/icon_color.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
httpdocs/themes/vuexy/img/safekat/presupuestos/icon_colorhq.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
httpdocs/themes/vuexy/img/safekat/presupuestos/icon_cubierta.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.7 KiB |