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