forked from verdnatura/salix-front
feat: call latestBuysFilter
This commit is contained in:
parent
bb92d75e00
commit
3ff0d2139a
|
@ -183,7 +183,7 @@ async function confirm() {
|
||||||
// }
|
// }
|
||||||
// onDialogOK({ data: true });
|
// onDialogOK({ data: true });
|
||||||
emit('refreshData', { type: 'refresh', itemProposal: proposalSelected.value[0] });
|
emit('refreshData', { type: 'refresh', itemProposal: proposalSelected.value[0] });
|
||||||
proposalSelected.value = null;
|
proposalSelected.value = [];
|
||||||
popupProxyRef.value.hide();
|
popupProxyRef.value.hide();
|
||||||
}
|
}
|
||||||
const { dialogRef, onDialogOK, onDialogCancel } = useDialogPluginComponent();
|
const { dialogRef, onDialogOK, onDialogCancel } = useDialogPluginComponent();
|
||||||
|
@ -200,7 +200,7 @@ onUnmounted(() => {});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QPopupProxy ref="popupProxyRef">
|
<QPopupProxy ref="popupProxyRef">
|
||||||
<QCard class="q-pa-lg">
|
<QCard>
|
||||||
<!-- {{ itemLack }} -->
|
<!-- {{ itemLack }} -->
|
||||||
<QCardSection v-if="false" class="row items-center q-pb-none">
|
<QCardSection v-if="false" class="row items-center q-pb-none">
|
||||||
<VnLv class="image">
|
<VnLv class="image">
|
||||||
|
@ -241,13 +241,13 @@ onUnmounted(() => {});
|
||||||
</span>
|
</span>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardActions v-if="$props.replaceAction">
|
<QCardActions v-if="$props.replaceAction">
|
||||||
<QBtn
|
<!-- <QBtn
|
||||||
:label="t('globals.removeSelection')"
|
:label="t('globals.removeSelection')"
|
||||||
color="primary"
|
color="primary"
|
||||||
flat
|
flat
|
||||||
:disable="proposalSelected.length < 1 || quantity === 0"
|
:disable="proposalSelected.length < 1 || quantity === 0"
|
||||||
@click="proposalSelected = []"
|
@click="proposalSelected = []"
|
||||||
/>
|
/> -->
|
||||||
|
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.replace')"
|
:label="t('globals.replace')"
|
||||||
|
@ -272,19 +272,22 @@ onUnmounted(() => {});
|
||||||
<!-- <VnRow style="display: flex"> -->
|
<!-- <VnRow style="display: flex"> -->
|
||||||
<div>
|
<div>
|
||||||
<!-- {{ proposalSelected }} -->
|
<!-- {{ proposalSelected }} -->
|
||||||
|
{{ $props.itemLack.itemFk }}
|
||||||
|
{{ $props.itemLack.warehouseFk }}
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
:append="false"
|
:append="false"
|
||||||
data-key="ItemsGetSimilar"
|
data-key="ItemsGetSimilar"
|
||||||
url="Items/getSimilar"
|
url="Items/getSimilar"
|
||||||
:filter="{
|
:filter="{
|
||||||
where: {
|
where: {
|
||||||
itemFk: $props.item.itemFk,
|
itemFk: $props.itemLack.itemFk,
|
||||||
warehouseFk: $props.item.warehouseFk,
|
warehouseFk: $props.itemLack.warehouseFk,
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
|
<!-- {{ rows[1].available }} -->
|
||||||
<QTable
|
<QTable
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
|
|
@ -354,6 +354,8 @@ const replaceItem = () => {
|
||||||
const index = store.data.findIndex((t) => t.ticketFk === ticket.ticketFk);
|
const index = store.data.findIndex((t) => t.ticketFk === ticket.ticketFk);
|
||||||
store.data.splice(index, 1);
|
store.data.splice(index, 1);
|
||||||
console.log(ticket);
|
console.log(ticket);
|
||||||
|
useArrayData('ItemsGetSimilar').store.data[1].available =
|
||||||
|
itemProposalSelected.value.available;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -370,10 +372,22 @@ const replaceItem = () => {
|
||||||
@on-fetch="(data) => (item = data)"
|
@on-fetch="(data) => (item = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
|
<FetchData
|
||||||
|
:url="`Buys/latestBuysFilter`"
|
||||||
|
:fields="['longName']"
|
||||||
|
:filter="{ where: { 'i.id': '2' } }"
|
||||||
|
@on-fetch="(data) => Object.assign(item.value, data[0])"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
:url="`Tickets/itemLack`"
|
:url="`Tickets/itemLack`"
|
||||||
:filter="{ id: entityId }"
|
:filter="{ id: entityId }"
|
||||||
@on-fetch="(data) => (itemLack = data[0])"
|
@on-fetch="
|
||||||
|
(data) => {
|
||||||
|
itemLack = data[0];
|
||||||
|
// itemLackForm.value.fetch();
|
||||||
|
}
|
||||||
|
"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<!-- <Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown()">
|
<!-- <Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown()">
|
||||||
|
@ -465,8 +479,10 @@ const replaceItem = () => {
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<QPage>
|
<QPage>
|
||||||
<div class="full-width q-pa-md">
|
<div class="full-width q-pa-md">
|
||||||
{{ itemLack }}
|
<p>item:{{ item }}</p>
|
||||||
{{ selectedRows }}
|
<p>itemLack:{{ itemLack }}</p>
|
||||||
|
<p>selectedRows:{{ selectedRows }}</p>
|
||||||
|
<p>itemProposalSelected:{{ itemProposalSelected }}</p>
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
:data-key="URL_KEY"
|
:data-key="URL_KEY"
|
||||||
:url="`${URL_KEY}/${entityId}`"
|
:url="`${URL_KEY}/${entityId}`"
|
||||||
|
@ -494,6 +510,7 @@ const replaceItem = () => {
|
||||||
<ItemDescriptorProxy :id="entityId" />
|
<ItemDescriptorProxy :id="entityId" />
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBadge
|
<QBadge
|
||||||
|
v-if="itemLack"
|
||||||
text-color="white"
|
text-color="white"
|
||||||
:color="itemLack.lack === 0 ? 'green' : 'red'"
|
:color="itemLack.lack === 0 ? 'green' : 'red'"
|
||||||
:label="itemLack.lack"
|
:label="itemLack.lack"
|
||||||
|
|
Loading…
Reference in New Issue