devolucion y prestamo
This commit is contained in:
@@ -10,20 +10,19 @@
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th(width="10%")
|
||||
th(width="20%") No Semanas
|
||||
th(width="10%")
|
||||
th(width="20%") No Semanas
|
||||
th(width="70%") Descripción
|
||||
tbody
|
||||
tr(v-for="m in multa")
|
||||
td
|
||||
.control
|
||||
.control
|
||||
label.radio
|
||||
input(type='radio' name="multa" v-bind:value="m.id" v-model="multar.idMulta")
|
||||
td {{m.semanas}}
|
||||
td {{m.nombre}}
|
||||
|
||||
footer.modal-card-foot
|
||||
button.button.is-success(v-on:click="SaveMultar()") Guardar
|
||||
button.button.is-success(v-on:click="SaveMultar()") Guardar
|
||||
button.button(v-on:click="toggleModal()") Cancelar
|
||||
p.has-text-centered
|
||||
span.is-size-6.space(v-for="s in status") {{` ${s.equipo.toUpperCase()} : ${s.prestadas} / ${s.total}`}}
|
||||
@@ -41,14 +40,14 @@
|
||||
th Multar
|
||||
th Regresar
|
||||
tbody
|
||||
tr(v-bind:class="{'warn-time':timeWarn(p.fh_in)}" v-for="p in prestamo")
|
||||
td {{p.detalles[0].equipo.carrito.nombre}}
|
||||
td {{p.detalles[0].equipo.equipo_carrito}}
|
||||
td {{p.equipo}}
|
||||
td {{p.detalles[0].equipo.no_inventario}}
|
||||
td {{p.idUsuario}}
|
||||
td {{fecha(p.fh_in)}}
|
||||
td {{maxFecha(p.fh_in)}}
|
||||
tr(v-bind:class="{'warn-time':timeWarn(p.fechaInicio)}" v-for="p in prestamo")
|
||||
td {{p.Equipo.Carrito.alias}}
|
||||
td {{p.Equipo.equipo_carrito}}
|
||||
td {{p.Equipo.Tipo.nombre}}
|
||||
td {{p.Equipo.no_inventario}}
|
||||
td {{p.idUsuario}}
|
||||
td {{fecha(p.fechaInicio)}}
|
||||
td {{maxFecha(p.fechaInicio)}}
|
||||
td
|
||||
a.button.is-danger.is-outlined(v-on:click="upMultar(p.idUsuario,p.detalles[0].equipo.id)")
|
||||
span.icon.is-small
|
||||
@@ -92,7 +91,7 @@ export default {
|
||||
url: api.url + '/multar',
|
||||
data: this.multar,
|
||||
headers: {
|
||||
'token': window.sessionStorage.pcpumaT
|
||||
'token': this.$store.getters.token
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
@@ -140,14 +139,14 @@ export default {
|
||||
id: pre
|
||||
},
|
||||
headers: {
|
||||
'token': window.sessionStorage.pcpumaT
|
||||
'token': this.$store.getters.token
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
swal('Exito', 'Peticion exitosa ', 'success')
|
||||
axios.get(api.url + '/prestamo', {
|
||||
headers: {
|
||||
'token': window.sessionStorage.pcpumaT
|
||||
'token': this.$store.getters.token
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
@@ -166,12 +165,12 @@ export default {
|
||||
mounted () {
|
||||
axios.get(api.url + '/prestamo', {
|
||||
headers: {
|
||||
'token': window.sessionStorage.pcpumaT
|
||||
'token': this.$store.getters.token
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
console.log(response.data.data)
|
||||
this.prestamo = response.data.data.equipos
|
||||
console.log(response.data)
|
||||
this.prestamo = response.data
|
||||
this.status = response.data.data.status
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -179,7 +178,7 @@ export default {
|
||||
})
|
||||
axios.get(api.url + '/multa', {
|
||||
headers: {
|
||||
'token': window.sessionStorage.pcpumaT
|
||||
'token': this.$store.getters.token
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
@@ -22,15 +22,13 @@
|
||||
th Carrito
|
||||
th Equipo
|
||||
th No inventario
|
||||
th Préstamo
|
||||
th Entrega
|
||||
tbody
|
||||
tr
|
||||
td {{prestamoData.carrito}}
|
||||
td {{prestamoData.id}}
|
||||
td {{prestamoData.alias_carrito}}
|
||||
td {{prestamoData.alias_equipo}}
|
||||
td {{prestamoData.no_inventario}}
|
||||
td {{prestamoData.prestamo}}
|
||||
td {{prestamoData.entrega}}
|
||||
td {{prestamoData.fechaFin}}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -56,16 +54,17 @@ export default {
|
||||
method: 'post',
|
||||
url: api.url + '/prestamo',
|
||||
data: {
|
||||
equipo: this.tipo,
|
||||
idUsuario: this.usuario,
|
||||
idKiosko: window.sessionStorage.pcpumaK
|
||||
idTipo: 1,
|
||||
idOperadorPrestamo: 1,
|
||||
kiosko: 1
|
||||
},
|
||||
headers: {
|
||||
token: window.sessionStorage.pcpumaT
|
||||
token: this.$store.getters.token
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.prestamoData = response.data.data.equipo
|
||||
this.prestamoData = response.data
|
||||
console.log(this.prestamoData)
|
||||
swal('Exito', 'Peticion exitosa ', 'success')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user