diff --git a/src/stores/quotations/index.ts b/src/stores/quotations/index.ts index d5a54891..c434b677 100644 --- a/src/stores/quotations/index.ts +++ b/src/stores/quotations/index.ts @@ -44,21 +44,15 @@ export const useQuotationStore = defineStore('quotation-store', () => { return null; } - async function getQuotationList(opts?: { + async function getQuotationList(params?: { page?: number; pageSize?: number; payCondition?: 'Full' | 'Split' | 'BillFull' | 'BillSplit'; query?: string; }) { - const params = new URLSearchParams(); - for (const [k, v] of Object.entries(opts || {})) { - if (v !== undefined) params.append(k, v.toString()); - } - const query = params.toString(); - - const res = await api.get>( - `/quotation?${query}`, - ); + const res = await api.get>(`/quotation`, { + params, + }); if (res.status < 400) { return res.data; }