diff --git a/src/pages/05_quotation/MainPage.vue b/src/pages/05_quotation/MainPage.vue index b134b2dd..826cbe95 100644 --- a/src/pages/05_quotation/MainPage.vue +++ b/src/pages/05_quotation/MainPage.vue @@ -49,6 +49,7 @@ import { Quotation } from 'src/stores/quotations/types'; import TableQuotation from 'src/components/05_quotation/TableQuotation.vue'; import PaginationPageSize from 'src/components/PaginationPageSize.vue'; import { DialogContainer, DialogHeader } from 'src/components/dialog'; +import AdvanceSearch from 'src/components/shared/AdvanceSearch.vue'; const { t, locale } = useI18n(); const $q = useQuasar(); @@ -109,6 +110,7 @@ const pageState = reactive({ quotationModal: false, employeeModal: false, receiptModal: false, + searchDate: [], }); pageState.fieldSelected = [...columnQuotation.map((v) => v.name)]; @@ -327,6 +329,8 @@ async function fetchQuotationList(mobileFetch?: boolean) { : 'Issued', query: pageState.inputSearch, urgentFirst: true, + startDate: pageState.searchDate[0], + endDate: pageState.searchDate[1], }); if (ret) { @@ -350,7 +354,12 @@ async function fetchQuotationList(mobileFetch?: boolean) { } watch( - [() => pageState.currentTab, () => pageState.inputSearch, quotationPageSize], + [ + () => pageState.currentTab, + () => pageState.inputSearch, + () => pageState.searchDate, + quotationPageSize, + ], () => { quotationPage.value = 1; quotationData.value = []; @@ -517,6 +526,10 @@ async function storeDataLocal(id: string) { +
@@ -1126,13 +1139,13 @@ async function storeDataLocal(id: string) { id="form-basic-info-customer" :onCreate="customerFormState.dialogType === 'create'" @edit=" - (customerFormState.dialogType = 'edit'), - (customerFormState.readonly = false) + ((customerFormState.dialogType = 'edit'), + (customerFormState.readonly = false)) " @cancel="() => customerFormUndo(false)" @delete=" customerFormState.editCustomerId && - deleteCustomerById(customerFormState.editCustomerId) + deleteCustomerById(customerFormState.editCustomerId) " :customer-type="customerFormData.customerType" v-model:registered-branch-id="customerFormData.registeredBranchId" diff --git a/src/stores/quotations/index.ts b/src/stores/quotations/index.ts index 3be79081..e7faca39 100644 --- a/src/stores/quotations/index.ts +++ b/src/stores/quotations/index.ts @@ -76,6 +76,8 @@ export const useQuotationStore = defineStore('quotation-store', () => { includeRegisteredBranch?: boolean; forDebitNote?: boolean; cancelIncludeDebitNote?: boolean; + startDate?: string; + endDate?: string; }) { const res = await api.get>('/quotation', { params,