I have a select with vue js defined:
dacademics:[
{text:'Persona Natural',value:'PN'},
{text:'Bachiller',value:'Bach'},
{text:'Profesional',value:'Prof'},
{text:'Técnico Especializado',value:'TE'},
{text:'Técnico Administrativo',value:'TA'},
{text:'Obrero A',value:'OA'},
{text:'Obrero B',value:'OB'}],
and in the view I charge the select as follows.
<select v-model="dacademic" class="form-control" style="height: 35.9px;" placeholder="Seleccione" id="sdacademic">
<option value="" disabled hidden>Seleccione Grado</option>
<option v-for="gradoac in dacademics" v-bind:value="gradoac.value">
@{{ gradoac.text }}
</option>
</select>
I also have a variable total amount: which is defined as follows
newContrato:{CONT_intTiempoContrato:'',CONT_varProfesion:'',CONT_varGradoAcademico:'',CONT_douMontoTotal:'',CONT_intArmadas:'',META_intId:'',PERS_varDNI:'',CONT_datInicio:'',CONT_datFin:'',productos:[],personaSeleccionada:''},
and in the view I call it like this:
<div class="col-md-4">
<label for="CONT_douMontoTotal">Monto Total</label>
<input class="form-control" id="CONT_douMontoTotal" type="number" aria-describedby="nameHelp" placeholder="Ingrese el total" v-model="newContrato.CONT_douMontoTotal" min="1" max="13800">
</div>
What I need to do is: when I select by the example Natural Person that the value of the total amount is changed to 1000, if I select high school that is changed to 2000, etc. I would like to know if you can do something like
v-on: focusout.prevent="changeMonto ()"
or some way to execute this from the code in vue js, try only with js, but only change a moment since the v-model = newContract.CONT_douMontoTotal: '' is empty