mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
modificado para presupuesto admin
This commit is contained in:
@ -390,6 +390,7 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
|||||||
'solapas_grandes_cubierta' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_plegado_exceso_solapas_cubierta')->value,
|
'solapas_grandes_cubierta' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_plegado_exceso_solapas_cubierta')->value,
|
||||||
'solapas_grandes_sobrecubierta' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_plegado_exceso_solapas_sobrecubierta')->value,
|
'solapas_grandes_sobrecubierta' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_plegado_exceso_solapas_sobrecubierta')->value,
|
||||||
'solapas_grandes_faja' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_plegado_exceso_solapas_faja')->value,
|
'solapas_grandes_faja' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_plegado_exceso_solapas_faja')->value,
|
||||||
|
'lomo_redondo' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_lomo_redondo')->value,
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->viewData['tipo_impresion_id'] = $presupuestoEntity->tipo_impresion_id; // Cosido tapa blanda JJO
|
$this->viewData['tipo_impresion_id'] = $presupuestoEntity->tipo_impresion_id; // Cosido tapa blanda JJO
|
||||||
|
|||||||
@ -229,7 +229,7 @@
|
|||||||
<label id="label_compLomoRedondo" for="compLomoRedondo" class="form-label">
|
<label id="label_compLomoRedondo" for="compLomoRedondo" class="form-label">
|
||||||
<?= lang('Presupuestos.lomoRedondo') ?>*
|
<?= lang('Presupuestos.lomoRedondo') ?>*
|
||||||
</label>
|
</label>
|
||||||
<select id="compLomoRedondo" name="lomo_redondo"
|
<select id="compLomoRedondo" name="lomo_redondo" service-id="<?= $serviciosAutomaticos['lomo_redondo'] ?>"
|
||||||
class="form-control select2bs2 comp_cubierta_items" style="width: 100%;">
|
class="form-control select2bs2 comp_cubierta_items" style="width: 100%;">
|
||||||
<option value="0">
|
<option value="0">
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@ -321,6 +321,18 @@ class Comparador {
|
|||||||
allowClear: false,
|
allowClear: false,
|
||||||
minimumResultsForSearch: Infinity,
|
minimumResultsForSearch: Infinity,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.lomoRedondo.on('change', function () {
|
||||||
|
if (!self.cargando && self.lomoRedondo.select2('data').length > 0) {
|
||||||
|
|
||||||
|
if (self.lomoRedondo.select2('data')[0].id == 1) {
|
||||||
|
$(document).trigger('add-servicio-lineas', 'lomo_redondo');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(document).trigger('remove-servicio-lineas', 'lomo_redondo');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
this.cabezada.select2({
|
this.cabezada.select2({
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
minimumResultsForSearch: Infinity,
|
minimumResultsForSearch: Infinity,
|
||||||
|
|||||||
@ -164,6 +164,16 @@ class Servicios {
|
|||||||
const id = $('#solapas_grandes_faja').attr('service-id');
|
const id = $('#solapas_grandes_faja').attr('service-id');
|
||||||
this.ServiciosManipulado.getPresupuestoManipulado(id);
|
this.ServiciosManipulado.getPresupuestoManipulado(id);
|
||||||
}
|
}
|
||||||
|
else if (servicio == 'lomo_redondo'){
|
||||||
|
const id = $('#compLomoRedondo').attr('service-id');
|
||||||
|
for(let i = 0; i < this.ServiciosManipulado.table.rows().count(); i++){
|
||||||
|
var data = this.ServiciosManipulado.table.row(i).data();
|
||||||
|
if (data.tarifa_id == id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.ServiciosManipulado.getPresupuestoManipulado(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
removeServicio(event, servicio) {
|
removeServicio(event, servicio) {
|
||||||
@ -305,6 +315,16 @@ class Servicios {
|
|||||||
};
|
};
|
||||||
this.serviciosAcabado.table.draw();
|
this.serviciosAcabado.table.draw();
|
||||||
}
|
}
|
||||||
|
else if (servicio == 'lomo_redondo'){
|
||||||
|
const id = $('#compLomoRedondo').attr('service-id');
|
||||||
|
for(let i = this.ServiciosManipulado.table.rows().count(); i >= 0; i--){
|
||||||
|
var data = this.ServiciosManipulado.table.row(i).data();
|
||||||
|
if (data && data.tarifa_id == id) {
|
||||||
|
this.ServiciosManipulado.table.row(i).remove();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.ServiciosManipulado.table.draw();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateServicios() {
|
async updateServicios() {
|
||||||
|
|||||||
Reference in New Issue
Block a user