pasamos de folio a ticket y corrección del monto

This commit is contained in:
Andres2908
2022-03-06 14:56:15 -06:00
parent 4d12028609
commit fd249de706
3 changed files with 14 additions and 34 deletions
+10 -21
View File
@@ -47,23 +47,11 @@
{{ props.row.monto }}
</b-table-column>
<b-table-column
field="confirmacion"
label="Confirmación"
centered
v-slot="props"
>
<b-tag :type="types(props.row.confirmacion)">
{{ props.row.confirmacion }}
</b-tag>
</b-table-column>
<b-table-column field="cantidad" label="Cantidad" centered v-slot="props">
{{ props.row.monto }}
</b-table-column>
<b-table-column field="ticket" label="Ticket" centered v-slot="props">
<b-button type="is-info" @click="verTicket(props.row)"
<b-button
type="is-info"
v-if="props.row.folio"
@click="verTicket(props.row)"
>Ver ticket</b-button
>
</b-table-column>
@@ -75,6 +63,9 @@
import axios from 'axios'
export default {
props: {
updateIsLoading: { type: Function, require: true },
},
data() {
return {
token: '',
@@ -89,21 +80,19 @@ export default {
}
},
methods: {
types(value) {
return value === true ? 'is-success' : 'is-danger'
},
todasInscripciones() {
this.updateIsLoading(true)
axios
.get(
`${process.env.api}/admin/todas_inscripciones?validacion=${this.validacion}&numeroCuenta=${this.numeroCuenta}`,
this.token
)
.then((res) => {
this.updateIsLoading(false)
this.inscripciones = res.data
})
.catch((err) => {
console.log(err)
// this.imprimirError(err.response.data)
this.updateIsLoading(false)
})
},
verTicket(value) {
+3 -2
View File
@@ -32,8 +32,8 @@
<div class="columns">
<div class="column pr-5">
<b-field label="Folio">
<b-input type="text" maxlength="5" v-model="folio"></b-input>
<b-field label="Ticket">
<b-input type="text" maxlength="10" v-model="folio"></b-input>
</b-field>
<b-field label="Monto">
<b-input v-model="monto" type="number" maxlength="5"></b-input>
@@ -163,6 +163,7 @@ export default {
if (this.error === false) {
formData.append('idUsuario', this.datosUsuario.idUsuario)
formData.append('folio', this.folio)
if (this.monto === '') this.monto = 0
formData.append('monto', this.monto)
formData.append('idArea', this.idArea)
formData.append('fechaTicket', this.fechaTicket)
+1 -11
View File
@@ -2,7 +2,7 @@
<div class="container">
<b-tabs v-model="activeTab">
<b-tab-item label="Tabla de tickets">
<TableTickets />
<TableTickets :updateIsLoading="updateIsLoading" />
</b-tab-item>
<b-tab-item label="Reportes">
@@ -11,14 +11,6 @@
</p>
<Reporte :updateIsLoading="updateIsLoading" :tipo="'reporte'" />
</b-tab-item>
<b-tab-item label="Generar CSV">
<p class="title is-5">
Selecciona el periodo para generar un archivo CSV y alimnetar la base
del AT.
</p>
<GenerarCSV :updateIsLoading="updateIsLoading" :tipo="'CSV'" />
</b-tab-item>
</b-tabs>
</div>
</template>
@@ -26,14 +18,12 @@
<script>
import TableTickets from '~/components/admin/tableTickets.vue'
import Reporte from '~/components/admin/reporte.vue'
import GenerarCSV from '~/components/admin/reporte.vue'
import FechasInscripcion from '~/components/admin/fechasInscripcion.vue'
export default {
components: {
TableTickets,
Reporte,
GenerarCSV,
FechasInscripcion,
},
data() {