From 1f9d1b79ab0acadbba0922f186b8fe5624ecae52 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 4 Sep 2024 10:17:57 +0200 Subject: [PATCH] refs #7283 refactor ItexDescriptor --- src/pages/Item/Card/ItemDescriptor.vue | 2 ++ src/pages/Item/Card/ItemDescriptorImage.vue | 6 +++++- src/pages/Item/Card/ItemDescriptorProxy.vue | 5 +++++ src/pages/Ticket/Card/TicketSummary.vue | 6 +++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue index 8381f0624..e649b8c45 100644 --- a/src/pages/Item/Card/ItemDescriptor.vue +++ b/src/pages/Item/Card/ItemDescriptor.vue @@ -52,6 +52,7 @@ const available = ref(null); const visible = ref(null); const _warehouseFk = ref(null); const salixUrl = ref(); +console.log('warehouseItemDescriptor', _warehouseFk.value); const warehouseFk = computed({ get() { return _warehouseFk.value; @@ -82,6 +83,7 @@ const updateStock = async () => { warehouseFk: warehouseFk.value, dated: $props.dated, }; + console.log('params', params); const { data } = await axios.get(`Items/${entityId.value}/getVisibleAvailable`, { params, diff --git a/src/pages/Item/Card/ItemDescriptorImage.vue b/src/pages/Item/Card/ItemDescriptorImage.vue index d83f534b8..71977fb24 100644 --- a/src/pages/Item/Card/ItemDescriptorImage.vue +++ b/src/pages/Item/Card/ItemDescriptorImage.vue @@ -48,7 +48,11 @@ const getWarehouseName = async (warehouseFk) => { where: { id: warehouseFk }, }; - const { data } = await axios.get('Warehouses/findOne', { filter }); + const { data } = await axios.get('Warehouses/findOne', { + params: { + filter: JSON.stringify(filter), + }, + }); if (!data) return; warehouseName.value = data.name; }; diff --git a/src/pages/Item/Card/ItemDescriptorProxy.vue b/src/pages/Item/Card/ItemDescriptorProxy.vue index 2b7b39a65..2ffc9080f 100644 --- a/src/pages/Item/Card/ItemDescriptorProxy.vue +++ b/src/pages/Item/Card/ItemDescriptorProxy.vue @@ -15,6 +15,10 @@ const $props = defineProps({ type: Number, default: null, }, + warehouseFk: { + type: Number, + default: null, + }, }); @@ -26,6 +30,7 @@ const $props = defineProps({ :summary="ItemSummary" :dated="dated" :sale-fk="saleFk" + :warehouse-fk="warehouseFk" /> diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 177384663..2d02ad5ed 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -383,7 +383,11 @@ async function changeState(value) { {{ props.row.itemFk }} - + {{ props.row.visible }}