mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en el importador
This commit is contained in:
@ -0,0 +1,31 @@
|
||||
import ClassSelect from '../../components/select2.js';
|
||||
|
||||
class Importador{
|
||||
|
||||
constructor(){
|
||||
|
||||
this.cliente = new ClassSelect($("#clienteId"), '/importador/clientlist', "Seleccione un cliente");
|
||||
this.presupuesto = new ClassSelect($("#presupuesto"), '/importador/presupuestoslist', "Seleccione un presupuesto", false, {clienteId: ()=>$("#clienteId").val()});
|
||||
this.openBtn = $('#openOld');
|
||||
}
|
||||
|
||||
init(){
|
||||
this.cliente.init();
|
||||
this.presupuesto.init();
|
||||
|
||||
this.openBtn.on('click', function(){
|
||||
if($("#clienteId").val() != '' && $("#presupuesto").val() != ''){
|
||||
|
||||
window.open('https://gestion.safekat.es/presupuesto/edit/'+$("#presupuesto").val());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
let importador = new Importador();
|
||||
importador.init();
|
||||
});
|
||||
|
||||
export default Importador;
|
||||
Reference in New Issue
Block a user