Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 6m27s
62 lines
1.4 KiB
TypeScript
62 lines
1.4 KiB
TypeScript
import type { DepotVO, DepotForm, DepotQuery } from './model';
|
|
|
|
import type { ID, IDS } from '#/api/common';
|
|
import type { PageResult } from '#/api/common';
|
|
|
|
import { commonExport } from '#/api/helper';
|
|
import { requestClient } from '#/api/request';
|
|
|
|
/**
|
|
* 查询仓库管理列表
|
|
* @param params
|
|
* @returns 仓库管理列表
|
|
*/
|
|
export function depotList(params?: DepotQuery) {
|
|
return requestClient.get<PageResult<DepotVO>>('/property/depot/list', { params });
|
|
}
|
|
|
|
/**
|
|
* 导出仓库管理列表
|
|
* @param params
|
|
* @returns 仓库管理列表
|
|
*/
|
|
export function depotExport(params?: DepotQuery) {
|
|
return commonExport('/property/depot/export', params ?? {});
|
|
}
|
|
|
|
/**
|
|
* 查询仓库管理详情
|
|
* @param id id
|
|
* @returns 仓库管理详情
|
|
*/
|
|
export function depotInfo(id: ID) {
|
|
return requestClient.get<DepotVO>(`/property/depot/${id}`);
|
|
}
|
|
|
|
/**
|
|
* 新增仓库管理
|
|
* @param data
|
|
* @returns void
|
|
*/
|
|
export function depotAdd(data: DepotForm) {
|
|
return requestClient.postWithMsg<void>('/property/depot', data);
|
|
}
|
|
|
|
/**
|
|
* 更新仓库管理
|
|
* @param data
|
|
* @returns void
|
|
*/
|
|
export function depotUpdate(data: DepotForm) {
|
|
return requestClient.putWithMsg<void>('/property/depot', data);
|
|
}
|
|
|
|
/**
|
|
* 删除仓库管理
|
|
* @param id id
|
|
* @returns void
|
|
*/
|
|
export function depotRemove(id: ID | IDS) {
|
|
return requestClient.deleteWithMsg<void>(`/property/depot/${id}`);
|
|
}
|