trabajando en el backend para papeles diferentes

This commit is contained in:
2024-10-15 15:41:38 +02:00
parent 52303e9185
commit 19be8591f3
6 changed files with 3227 additions and 26 deletions

View File

@ -54,6 +54,9 @@ let ClassSelect = function (domItem, url, placeholder, allowClear = false, param
this.reset = function () {
this.item.val(null).trigger("change");
};
this.setParams = function(params){
this.params = params;
};
this.getVal = function () {
return this.item.val();
};

View File

@ -131,7 +131,7 @@ class Direcciones {
#handleChangeCliente() {
this.direccionesCliente.setParams({ 'cliente_id': $("#clienteId").select2('data')[0].id })
this.direccionesCliente.clear();
this.direccionesCliente.empty();
this.domItem.find('.direccion-cliente').remove();
this.direcciones = [];

View File

@ -56,7 +56,7 @@ class PresupuestoCliente {
this.disenioCubierta.init();
this.direcciones.init();
//this.RELLENAR_PRESUPUESTO();
this.RELLENAR_PRESUPUESTO();
}
@ -213,12 +213,14 @@ class PresupuestoCliente {
this.datos = {
clienteId: this.datosGenerales.cliente.getValue(),
clienteId: this.datosGenerales.cliente.getVal(),
tamanio: this.datosGenerales.getDimensionLibro(),
tirada: this.datosGenerales.getTiradas(),
paginas: this.datosGenerales.paginas.val(),
paginasColor: this.datosGenerales.paginasColor.val(),
paginasCuadernillo: this.datosGenerales.paginasCuadernillo.val(),
papelInteriorDiferente: this.datosGenerales.papelDiferente.is(':checked');
tipo: this.datosGenerales.tiposLibro.filter('.selected').attr('id'),