feat: add date range selection to credit note, debit note, and receipt management
This commit is contained in:
parent
1e6be274e2
commit
ac42ee60d8
6 changed files with 61 additions and 15 deletions
|
|
@ -24,6 +24,7 @@ import { pageTabs, columns, hslaColors } from './constants';
|
|||
import { DebitNoteStatus, useDebitNote } from 'src/stores/debit-note';
|
||||
import { dialogWarningClose } from 'src/stores/utils';
|
||||
import { useQuasar } from 'quasar';
|
||||
import AdvanceSearch from 'src/components/shared/AdvanceSearch.vue';
|
||||
|
||||
const $q = useQuasar();
|
||||
const { t } = useI18n();
|
||||
|
|
@ -46,6 +47,7 @@ const pageState = reactive({
|
|||
total: 0,
|
||||
|
||||
debitDialog: false,
|
||||
searchDate: [],
|
||||
});
|
||||
|
||||
const fieldSelectedOption = computed(() => {
|
||||
|
|
@ -68,6 +70,8 @@ async function getList(opts?: { page?: number; pageSize?: number }) {
|
|||
? undefined
|
||||
: pageState.currentTab) as DebitNoteStatus,
|
||||
includeRegisteredBranch: true,
|
||||
startDate: pageState.searchDate[0],
|
||||
endDate: pageState.searchDate[1],
|
||||
});
|
||||
|
||||
if (res) {
|
||||
|
|
@ -149,6 +153,7 @@ watch(
|
|||
() => pageState.inputSearch,
|
||||
() => pageSize.value,
|
||||
() => pageState.statusFilter,
|
||||
() => pageState.searchDate,
|
||||
],
|
||||
() => getList(),
|
||||
);
|
||||
|
|
@ -256,6 +261,10 @@ watch(
|
|||
<template #prepend>
|
||||
<q-icon name="mdi-magnify" />
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<q-separator vertical inset class="q-mr-xs" />
|
||||
<AdvanceSearch v-model="pageState.searchDate" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<div class="row col-md-5 justify-end" style="white-space: nowrap">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue