From 8d33408bda08550d903625efd182df3bdbeb85f0 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 26 Jan 2024 13:09:34 +0100 Subject: [PATCH] fix: refs #4466 redirect to rectificatives --- .../InvoiceIn/Card/InvoiceInCorrective.vue | 84 ++++++------------- .../InvoiceIn/Card/InvoiceInDescriptor.vue | 17 ++-- src/pages/InvoiceIn/InvoiceInFilter.vue | 6 +- 3 files changed, 37 insertions(+), 70 deletions(-) diff --git a/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue b/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue index c1a4501e1..986d274fe 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue @@ -165,77 +165,47 @@ const onSave = (data) => data?.deletes && router.push(`/invoice-in/${invoiceId}/ - + option-label="code" + :label="useFirstUpper(t('globals.class'))" + :rules="[requiredFieldRule]" + :readonly="props.row.invoiceIn.isBooked" + /> + + + + diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue index 250ef06e3..b5aefc594 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue @@ -112,16 +112,13 @@ const routes = reactive({ }; }, getCorrection: (invoiceInCorrection) => { - if (invoiceInCorrection.correcting.length > 1) { - return; - // Se crea una sección aparte? - /* return { + if (invoiceInCorrection.correcting.length > 1) + return { name: 'InvoiceInList', - params: { - search: invoiceInCorrection.correcting.join(), + query: { + params: JSON.stringify({ correctedFk: entityId.value }), }, - }; */ - } + }; return { name: 'InvoiceInCard', @@ -161,7 +158,7 @@ async function setInvoiceCorrection(id) { }, }, }), - await axios.get('InvoiceInCorrections', { + axios.get('InvoiceInCorrections', { params: { filter: { where: { @@ -171,7 +168,7 @@ async function setInvoiceCorrection(id) { }, }), ]); - + console.log(correctedData, correctedData); if (correctingData[0]) invoiceInCorrection.corrected = correctingData[0].correctedFk; invoiceInCorrection.correcting = correctedData.map( diff --git a/src/pages/InvoiceIn/InvoiceInFilter.vue b/src/pages/InvoiceIn/InvoiceInFilter.vue index 692c476fa..8e2b931df 100644 --- a/src/pages/InvoiceIn/InvoiceInFilter.vue +++ b/src/pages/InvoiceIn/InvoiceInFilter.vue @@ -61,7 +61,7 @@ const suppliersRef = ref();