fix: refs #7404 some filter issues #921

Merged
pablone merged 2 commits from 7404-fixFilterIsssues into master 2024-11-13 11:25:32 +00:00
3 changed files with 12 additions and 4 deletions

View File

@ -99,7 +99,7 @@ const travelDialogRef = ref(false);
const tableRef = ref(); const tableRef = ref();
const travel = ref(null); const travel = ref(null);
const userParams = ref({ const userParams = ref({
dated: Date.vnNew(), dated: Date.vnNew().toJSON(),
}); });
const filter = ref({ const filter = ref({
@ -219,6 +219,7 @@ function round(value) {
data-key="StockBoughts" data-key="StockBoughts"
url="StockBoughts/getStockBought" url="StockBoughts/getStockBought"
save-url="StockBoughts/crud" save-url="StockBoughts/crud"
search-url="StockBoughts"
order="reserve DESC" order="reserve DESC"
:right-search="false" :right-search="false"
:is-editable="true" :is-editable="true"

View File

@ -18,7 +18,7 @@ const $props = defineProps({
required: true, required: true,
}, },
}); });
const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}&date=${$props.dated}`; const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}&dated=${$props.dated}`;
const columns = [ const columns = [
{ {
align: 'left', align: 'left',

View File

@ -27,7 +27,7 @@ onMounted(async () => {
<VnFilterPanel <VnFilterPanel
:data-key="props.dataKey" :data-key="props.dataKey"
:search-button="true" :search-button="true"
search-url="table" search-url="StockBoughts"
@set-user-params="setUserParams" @set-user-params="setUserParams"
> >
<template #tags="{ tag, formatFn }"> <template #tags="{ tag, formatFn }">
@ -36,12 +36,19 @@ onMounted(async () => {
<span>{{ formatFn(tag.value) }}</span> <span>{{ formatFn(tag.value) }}</span>
</div> </div>
</template> </template>
<template #body="{ params }"> <template #body="{ params, searchFn }">
<QItem class="q-my-sm"> <QItem class="q-my-sm">
<QItemSection> <QItemSection>
<VnInputDate <VnInputDate
id="date" id="date"
v-model="params.dated" v-model="params.dated"
@update:model-value="
(value) => {
params.dated = value;
setUserParams(params);
searchFn();
}
"
:label="t('Date')" :label="t('Date')"
is-outlined is-outlined
/> />