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 _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,

View File

@ -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;
};

View File

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

View File

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