mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import { BaseApiService } from '@/services/api/base';
|
|
import { BaseApiResponse } from '@/types/api/api-general';
|
|
import { LogisticPurchasePerSupplierReport } from '@/types/api/report/logistic-stock';
|
|
|
|
export class LogisticApiService extends BaseApiService<
|
|
LogisticPurchasePerSupplierReport,
|
|
unknown,
|
|
unknown
|
|
> {
|
|
constructor(basePath: string) {
|
|
super(basePath);
|
|
}
|
|
|
|
async getLogisticPurchasePerSupplierReport(
|
|
area_id?: number,
|
|
supplier_id?: number,
|
|
product_id?: number,
|
|
product_category_id?: number,
|
|
received_date?: string,
|
|
po_date?: string,
|
|
start_date?: string,
|
|
end_date?: string,
|
|
sort_by?: string,
|
|
filter_by?: string,
|
|
page?: number,
|
|
limit?: number
|
|
): Promise<BaseApiResponse<LogisticPurchasePerSupplierReport> | undefined> {
|
|
return await this.customRequest<
|
|
BaseApiResponse<LogisticPurchasePerSupplierReport>
|
|
>(`purchase-supplier`, {
|
|
method: 'GET',
|
|
params: {
|
|
area_id: area_id,
|
|
supplier_id: supplier_id,
|
|
product_id: product_id,
|
|
product_category_id: product_category_id,
|
|
received_date: received_date,
|
|
po_date: po_date,
|
|
start_date: start_date,
|
|
end_date: end_date,
|
|
sort_by: sort_by,
|
|
filter_by: filter_by,
|
|
page: page,
|
|
limit: limit,
|
|
},
|
|
});
|
|
}
|
|
}
|
|
|
|
// TODO: REPLACE WITH PRODUCTION URL
|
|
export const LogisticApi = new LogisticApiService(
|
|
'http://localhost:4010/api/reports/logistics'
|
|
);
|