mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en el comparador
This commit is contained in:
@ -0,0 +1,44 @@
|
||||
import ClassSelect from '../../../components/select2.js';
|
||||
import { getToken } from '../../../common/common.js';
|
||||
|
||||
class Comparador {
|
||||
|
||||
constructor(domItem) {
|
||||
|
||||
this.domItem = domItem;
|
||||
|
||||
this.csrf_token = getToken();
|
||||
this.csrf_hash = $('#mainContainer').find('input[name="' + this.csrf_token + '"]').val();
|
||||
|
||||
this.comparador_json = this.domItem.find("#comparador_json_data");
|
||||
this.tipo_impresion = $("#tipoImpresion");
|
||||
|
||||
this.paginasNegro = $('#compPaginasNegro');
|
||||
this.papelNegro = new ClassSelect($('#compPapelNegro'),
|
||||
'/papelesgenericos/getpapelcliente', 'Seleccione papel', false,
|
||||
{
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
tirada: $('#tirada').val(),
|
||||
tipo: 'negro',
|
||||
cubierta: 0,
|
||||
});
|
||||
|
||||
this.gramajeNegro = $('#compGramajeNegro');
|
||||
|
||||
}
|
||||
|
||||
init() {
|
||||
this.papelNegro.init();
|
||||
}
|
||||
|
||||
cargarDatos(datos) {
|
||||
|
||||
this.tipo_impresion.val(datos.tipo_impresion);
|
||||
this.comparador_json.val(JSON.stringify(datos.json_data));
|
||||
|
||||
//if (datos.json_data.bn)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export default Comparador;
|
||||
Reference in New Issue
Block a user