From 58b920d74db8363c6413335779837625305eb1cf Mon Sep 17 00:00:00 2001 From: Joel Crespo Date: Wed, 22 Nov 2023 08:02:23 -0300 Subject: [PATCH] add filters --- .../InvoiceOut/InvoiceOutNegativeBases.vue | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue b/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue index 5f63c06db..cbed6c1f0 100644 --- a/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue +++ b/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue @@ -17,6 +17,20 @@ const payload = ref({ to: new Date('2001-01-31'), }); +const filter = ref({ + company: null, + country: null, + clientId: null, + client: null, + amount: null, + base: null, + ticketId: null, + active: null, + hasToInvoice: null, + verifiedData: null, + comercial: null, +}); + const columns = ref([ { label: 'company', @@ -121,6 +135,16 @@ const exportTable = () => { }; const search = async () => { + const params = { + ...payload.value, + filter: { + limit: 20, + where: { + ...filter.value, + }, + }, + }; + console.log(params); rows.value = await invoiceOutService.getNegativeBases(payload.value); }; @@ -210,7 +234,7 @@ onMounted(async () => { " dense standout - v-model="payload[col.field]" + v-model="filter[col.field]" type="text" />