forked from verdnatura/salix-front
perf: date fields
This commit is contained in:
parent
6197d283e4
commit
54eb567e39
|
@ -448,7 +448,7 @@ const handleCloseProgressDialog = () => {
|
||||||
const handleCancelProgress = () => (cancelProgress.value = true);
|
const handleCancelProgress = () => (cancelProgress.value = true);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
let today = Date.vnNew();
|
let today = Date.vnNew().toISOString();
|
||||||
const tomorrow = new Date(today);
|
const tomorrow = new Date(today);
|
||||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||||
userParams.dateFuture = tomorrow;
|
userParams.dateFuture = tomorrow;
|
||||||
|
|
|
@ -55,7 +55,7 @@ onMounted(async () => await getItemPackingTypes());
|
||||||
:data-key="props.dataKey"
|
:data-key="props.dataKey"
|
||||||
:search-button="true"
|
:search-button="true"
|
||||||
:hidden-tags="['search']"
|
:hidden-tags="['search']"
|
||||||
:unremovable-params="['warehouseFk', 'dateFuture', 'dateToAdvance']"
|
:un-removable-params="['warehouseFk', 'dateFuture', 'dateToAdvance']"
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
|
@ -70,7 +70,6 @@ onMounted(async () => await getItemPackingTypes());
|
||||||
v-model="params.dateFuture"
|
v-model="params.dateFuture"
|
||||||
:label="t('params.dateFuture')"
|
:label="t('params.dateFuture')"
|
||||||
is-outlined
|
is-outlined
|
||||||
@update:model-value="searchFn()"
|
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
@ -80,7 +79,6 @@ onMounted(async () => await getItemPackingTypes());
|
||||||
v-model="params.dateToAdvance"
|
v-model="params.dateToAdvance"
|
||||||
:label="t('params.dateToAdvance')"
|
:label="t('params.dateToAdvance')"
|
||||||
is-outlined
|
is-outlined
|
||||||
@update:model-value="searchFn()"
|
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -49,8 +49,8 @@ const exprBuilder = (param, value) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const userParams = reactive({
|
const userParams = reactive({
|
||||||
futureDated: Date.vnNew(),
|
futureDated: Date.vnNew().toISOString(),
|
||||||
originDated: Date.vnNew(),
|
originDated: Date.vnNew().toISOString(),
|
||||||
warehouseFk: user.value.warehouseFk,
|
warehouseFk: user.value.warehouseFk,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ onMounted(async () => {
|
||||||
<VnFilterPanel
|
<VnFilterPanel
|
||||||
:data-key="props.dataKey"
|
:data-key="props.dataKey"
|
||||||
:hidden-tags="['search']"
|
:hidden-tags="['search']"
|
||||||
:unremovable-params="['warehouseFk', 'originDated', 'futureDated']"
|
:un-removable-params="['warehouseFk', 'originDated', 'futureDated']"
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
|
@ -83,7 +83,6 @@ onMounted(async () => {
|
||||||
v-model="params.originDated"
|
v-model="params.originDated"
|
||||||
:label="t('params.originDated')"
|
:label="t('params.originDated')"
|
||||||
is-outlined
|
is-outlined
|
||||||
@update:model-value="searchFn()"
|
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
@ -93,7 +92,6 @@ onMounted(async () => {
|
||||||
v-model="params.futureDated"
|
v-model="params.futureDated"
|
||||||
:label="t('params.futureDated')"
|
:label="t('params.futureDated')"
|
||||||
is-outlined
|
is-outlined
|
||||||
@update:model-value="searchFn()"
|
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
Loading…
Reference in New Issue