0
0
Fork 0

refs #7283 refactor ItexDescriptor

This commit is contained in:
Carlos Satorres 2024-09-04 10:17:57 +02:00
parent 65bf1664ff
commit 1f9d1b79ab
4 changed files with 17 additions and 2 deletions

View File

@ -52,6 +52,7 @@ const available = ref(null);
const visible = ref(null); const visible = ref(null);
const _warehouseFk = ref(null); const _warehouseFk = ref(null);
const salixUrl = ref(); const salixUrl = ref();
console.log('warehouseItemDescriptor', _warehouseFk.value);
const warehouseFk = computed({ const warehouseFk = computed({
get() { get() {
return _warehouseFk.value; return _warehouseFk.value;
@ -82,6 +83,7 @@ const updateStock = async () => {
warehouseFk: warehouseFk.value, warehouseFk: warehouseFk.value,
dated: $props.dated, dated: $props.dated,
}; };
console.log('params', params);
const { data } = await axios.get(`Items/${entityId.value}/getVisibleAvailable`, { const { data } = await axios.get(`Items/${entityId.value}/getVisibleAvailable`, {
params, params,

View File

@ -48,7 +48,11 @@ const getWarehouseName = async (warehouseFk) => {
where: { id: 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; if (!data) return;
warehouseName.value = data.name; warehouseName.value = data.name;
}; };

View File

@ -15,6 +15,10 @@ const $props = defineProps({
type: Number, type: Number,
default: null, default: null,
}, },
warehouseFk: {
type: Number,
default: null,
},
}); });
</script> </script>
@ -26,6 +30,7 @@ const $props = defineProps({
:summary="ItemSummary" :summary="ItemSummary"
:dated="dated" :dated="dated"
:sale-fk="saleFk" :sale-fk="saleFk"
:warehouse-fk="warehouseFk"
/> />
</QPopupProxy> </QPopupProxy>
</template> </template>

View File

@ -383,7 +383,11 @@ async function changeState(value) {
<QTd> <QTd>
<QBtn class="link" flat> <QBtn class="link" flat>
{{ props.row.itemFk }} {{ props.row.itemFk }}
<ItemDescriptorProxy :id="props.row.itemFk" /> <ItemDescriptorProxy
:id="props.row.itemFk"
:sale-fk="props.row.id"
:warehouse-fk="ticket.warehouseFk"
/>
</QBtn> </QBtn>
</QTd> </QTd>
<QTd>{{ props.row.visible }}</QTd> <QTd>{{ props.row.visible }}</QTd>