mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
falta update servicios
This commit is contained in:
@ -123,7 +123,7 @@ class PresupuestoAdminEdit {
|
||||
self.comparador.cargarDatos(response.data.comparador);
|
||||
self.lineasPresupuesto.cargarDatos(response.data.lineasPresupuesto);
|
||||
|
||||
self.servicios.cargar();
|
||||
self.servicios.cargar(response.data.servicios);
|
||||
/*self.direcciones.handleChangeCliente();
|
||||
|
||||
self.direcciones.cargarDatos(response.data.direcciones, response.data.datosGenerales);
|
||||
|
||||
@ -195,6 +195,8 @@ class Comparador {
|
||||
|
||||
initSelect2() {
|
||||
|
||||
const self = this;
|
||||
|
||||
this.paginasCubierta.select2({
|
||||
allowClear: false,
|
||||
minimumResultsForSearch: Infinity,
|
||||
@ -240,7 +242,7 @@ class Comparador {
|
||||
});
|
||||
this.papelSobrecubierta.init();
|
||||
this.gramajeSobrecubierta.init();
|
||||
this.papelSobrecubierta.onChange(() => this.gramajeSobrecubierta.setVal(0))
|
||||
this.papelSobrecubierta.onChange(() => self.gramajeSobrecubierta.empty());
|
||||
this.sobrecubierta.on('change', () => {
|
||||
if (this.sobrecubierta.val() == 1) {
|
||||
$('#solapas_sobrecubierta').prop('checked', true);
|
||||
@ -262,15 +264,14 @@ class Comparador {
|
||||
if (this.tipo_impresion_id == 1 || this.tipo_impresion_id == 3 || this.tipo_impresion_id == 5 || this.tipo_impresion_id == 7) {
|
||||
this.papelGuardas.init();
|
||||
this.gramajeGuardas.init();
|
||||
this.papelGuardas.onChange(() => this.gramajeGuardas.setVal(0))
|
||||
this.papelGuardas.onChange(() => self.gramajeGuardas.empty());
|
||||
}
|
||||
|
||||
this.papelNegro.onChange(() => this.gramajeNegro.setVal(0))
|
||||
this.papelNegrohq.onChange(() => this.gramajeNegrohq.setVal(0))
|
||||
this.papelColor.onChange(() => this.gramajeColor.setVal(0))
|
||||
this.papelColorhq.onChange(() => this.gramajeColorhq.setVal(0))
|
||||
this.papelCubierta.onChange(() => this.gramajeCubierta.setVal(0))
|
||||
this.papelCubierta.onChange(() => this.gramajeSobrecubierta.setVal(0))
|
||||
this.papelNegro.onChange(() => self.gramajeNegro.empty());
|
||||
this.papelNegrohq.onChange(() => self.gramajeNegrohq.empty());
|
||||
this.papelColor.onChange(() => self.gramajeColor.empty());
|
||||
this.papelColorhq.onChange(() => self.gramajeColorhq.empty());
|
||||
this.papelCubierta.onChange(() => self.gramajeCubierta.empty());
|
||||
|
||||
|
||||
this.tipo_impresion.select2({
|
||||
|
||||
@ -15,9 +15,10 @@ class DatosGenerales{
|
||||
this.coleccion = this.domItem.find('#coleccion');
|
||||
this.numeroEdicion = this.domItem.find('#numeroEdicion');
|
||||
this.isbn = this.domItem.find('#isbn');
|
||||
this.pais = this.domItem.find('#paisId');
|
||||
|
||||
|
||||
this.cliente = new ClassSelect($('#clienteId'), '/clientes/cliente/getSelect2', 'Seleccione cliente');
|
||||
this.pais = new ClassSelect($('#paisId'), '/paises/menuitems2', 'Seleccione País');
|
||||
this.referenciaCliente = this.domItem.find('#referenciaCliente');
|
||||
|
||||
}
|
||||
@ -25,14 +26,11 @@ class DatosGenerales{
|
||||
init(){
|
||||
|
||||
this.cliente.init();
|
||||
this.pais.init();
|
||||
|
||||
this.inc_rei.select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
this.pais.select2({
|
||||
allowClear: false,
|
||||
});
|
||||
}
|
||||
|
||||
cargarDatos(datos){
|
||||
@ -46,9 +44,10 @@ class DatosGenerales{
|
||||
this.coleccion.val(datos.coleccion);
|
||||
this.numeroEdicion.val(datos.numero_edicion);
|
||||
this.isbn.val(datos.isbn);
|
||||
this.pais.val(datos.pais).trigger('change');
|
||||
|
||||
|
||||
this.cliente.setOption(datos.cliente.id, datos.cliente.nombre);
|
||||
this.pais.setOption(datos.pais, datos.pais_nombre);
|
||||
this.referenciaCliente.val(datos.referenciaCliente);
|
||||
}
|
||||
}
|
||||
|
||||
@ -219,10 +219,10 @@ class DatosLibro {
|
||||
changeSolapasCubierta() {
|
||||
|
||||
if (this.solapasCubierta.prop('checked')) {
|
||||
$('#div_solapas_ancho_sobrecubierta').removeClass('d-none');
|
||||
$('#div_solapas_ancho').removeClass('d-none');
|
||||
}
|
||||
else {
|
||||
$('#div_solapas_ancho_sobrecubierta').divSolapasCubierta.addClass('d-none');
|
||||
$('#div_solapas_ancho').divSolapasCubierta.addClass('d-none');
|
||||
this.anchoSolapasCubierta.val(0);
|
||||
}
|
||||
$('#serv_default').trigger('click');
|
||||
@ -327,7 +327,7 @@ class DatosLibro {
|
||||
}
|
||||
else{
|
||||
let merma_lineas = []
|
||||
tableLineasPresupuesto.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
|
||||
$('#tableLineasPresupuesto').DataTable().rows().every( function ( rowIdx, tableLoop, rowLoop ) {
|
||||
var rowData = this.data();
|
||||
if(rowData.row_id != 'lp_guardas' && rowData.row_id != 'lp_cubierta' && rowData.row_id != 'lp_sobrecubierta'){
|
||||
const formas_linea = parseInt($('#isCosido').val())==0?parseInt(rowData.formas):parseInt(rowData.formas)/2
|
||||
@ -350,7 +350,7 @@ class DatosLibro {
|
||||
</span>
|
||||
<div class="d-flex flex-column ps-1">
|
||||
<h5 class="alert-heading mb-2">` +
|
||||
window.Presupuestos.validation.no_lp_for_merma +
|
||||
window.language.Presupuestos.validation.no_lp_for_merma +
|
||||
`</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user