mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en comparador
This commit is contained in:
@ -79,6 +79,7 @@ class PresupuestoAdminEdit {
|
||||
|
||||
self.datosGenerales.cargarDatos(response.data.datosGenerales);
|
||||
self.datosLibro.cargarDatos(response.data.datosLibro);
|
||||
self.comparador.cargarDatos(response.data.comparador);
|
||||
|
||||
/*self.direcciones.handleChangeCliente();
|
||||
|
||||
|
||||
@ -15,20 +15,29 @@ class Comparador {
|
||||
|
||||
this.paginasNegro = $('#compPaginasNegro');
|
||||
this.papelNegro = new ClassSelect($('#compPapelNegro'),
|
||||
'/papelesgenericos/getpapelcliente', 'Seleccione papel', false,
|
||||
'/presupuestoadmin/papelgenerico', 'Seleccione papel', false,
|
||||
{
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
tipo_impresion: this.tipo_impresion.val(),
|
||||
tirada: $('#tirada').val(),
|
||||
tipo: 'negro',
|
||||
cubierta: 0,
|
||||
});
|
||||
|
||||
this.gramajeNegro = $('#compGramajeNegro');
|
||||
this.gramajeNegro = new ClassSelect($('#compGramajeNegro'),
|
||||
'/presupuestoadmin/papelgramaje', 'Seleccione gramaje', false,
|
||||
{
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
papel_generico: this.papelNegro.getVal(),
|
||||
tipo_impresion: this.tipo_impresion.val(),
|
||||
tirada: $('#tirada').val(),
|
||||
tipo: 'negro',
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
init() {
|
||||
this.papelNegro.init();
|
||||
this.gramajeNegro.init();
|
||||
}
|
||||
|
||||
cargarDatos(datos) {
|
||||
@ -36,7 +45,11 @@ class Comparador {
|
||||
this.tipo_impresion.val(datos.tipo_impresion);
|
||||
this.comparador_json.val(JSON.stringify(datos.json_data));
|
||||
|
||||
//if (datos.json_data.bn)
|
||||
if (datos.json_data.bn){
|
||||
this.paginasNegro.val(datos.json_data.bn.paginas);
|
||||
this.papelNegro.setOption(datos.json_data.bn.papel_id, datos.json_data.bn.papel_nombre);
|
||||
this.gramajeNegro.setOption(datos.json_data.bn.gramaje, datos.json_data.bn.gramaje);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user