From 482cd647a1371839fbba8221b48307e230a3a104 Mon Sep 17 00:00:00 2001 From: Andres2908 Date: Tue, 10 May 2022 23:00:14 -0500 Subject: [PATCH] tabla y restar credito --- components/admin/restarCredito.vue | 9 +- components/admin/tableImpresiones.vue | 123 ++++++++++++++++++++++++++ pages/admin/index.vue | 3 +- 3 files changed, 131 insertions(+), 4 deletions(-) create mode 100644 components/admin/tableImpresiones.vue diff --git a/components/admin/restarCredito.vue b/components/admin/restarCredito.vue index 87b4826..9da6652 100644 --- a/components/admin/restarCredito.vue +++ b/components/admin/restarCredito.vue @@ -18,8 +18,8 @@

Cuenta: {{ this.numeroCuenta }}

-

Nombre: {{}}

-

Crédito: {{}}

+

Nombre: {{ datos.nombre }}

+

Credito: {{ datos.credito }}

@@ -68,7 +68,10 @@ export default { .get(`${process.env.api}/usuario/restar_credito`, data) .then((res) => { this.updateIsLoading(false) - console.log(res) + ;(this.datos.nombre = res.data.nombre), + (this.datos.credito = res.data.credito) + this.imprimirMensaje(res.data.message) + this.traerDatos() }) .catch((err) => { this.updateIsLoading(false) diff --git a/components/admin/tableImpresiones.vue b/components/admin/tableImpresiones.vue new file mode 100644 index 0000000..d024bb4 --- /dev/null +++ b/components/admin/tableImpresiones.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/pages/admin/index.vue b/pages/admin/index.vue index 08ca9da..224c830 100644 --- a/pages/admin/index.vue +++ b/pages/admin/index.vue @@ -31,13 +31,14 @@ import TableTickets from '~/components/admin/tableTickets.vue' import Reporte from '~/components/admin/reporte.vue' import RestarCredito from '~/components/admin/restarCredito.vue' -import RestarCredito from '~/components/admin/restarCredito.vue' +import TableImpresiones from '~/components/admin/tableImpresiones.vue' export default { components: { TableTickets, Reporte, RestarCredito, + TableImpresiones, }, data() { return {