新增盘点管理路由配置注释说明

This commit is contained in:
WUSIJIAN
2026-02-11 17:00:42 +08:00
parent b7511a7342
commit d266e5f9e5
7 changed files with 1367 additions and 2 deletions

View File

@@ -0,0 +1,115 @@
import { newService } from '/@/utils/request';
// 盘点任务查询参数
export interface InventoryCountQueryParams {
title?: string;
status?: number;
countType?: number;
warehouseId?: string;
pageNum?: number;
pageSize?: number;
}
// 盘点任务创建/更新参数
export interface InventoryCountParams {
id?: string;
title: string;
description?: string;
warehouseId?: string;
zoneId?: string;
locationId?: string;
assetSkuId?: string;
countType?: number;
scope?: number;
plannedStartTime?: string;
plannedEndTime?: string;
assigneeId?: string;
participants?: string[];
remark?: string;
}
// 获取盘点任务列表
export function listInventoryCounts(params?: InventoryCountQueryParams) {
return newService({
url: '/inventory/count/listInventoryCounts',
method: 'get',
params,
});
}
// 获取盘点任务详情
export function getInventoryCount(id: string) {
return newService({
url: '/inventory/count/getInventoryCount',
method: 'get',
params: { id },
});
}
// 创建盘点任务
export function createInventoryCount(data: InventoryCountParams) {
return newService({
url: '/inventory/count/createInventoryCount',
method: 'post',
data,
});
}
// 更新盘点任务
export function updateInventoryCount(data: InventoryCountParams) {
return newService({
url: '/inventory/count/updateInventoryCount',
method: 'put',
data,
});
}
// 删除盘点任务
export function deleteInventoryCount(id: string) {
return newService({
url: '/inventory/count/deleteInventoryCount',
method: 'delete',
params: { id },
});
}
// 完成盘点
export function completeInventoryCount(id: string) {
return newService({
url: '/inventory/count/completeInventoryCount',
method: 'post',
data: { id },
});
}
// 取消盘点
export function cancelInventoryCount(id: string[], reason?: string) {
return newService({
url: '/inventory/count/cancelInventoryCount',
method: 'post',
data: { id, reason },
});
}
// 导出盘点模板
export function exportInventoryCountTemplate() {
return newService({
url: '/inventory/count/exportInventoryCountTemplate',
method: 'get',
responseType: 'blob',
});
}
// 上传盘点Excel
export function importInventoryCount(file: File) {
const formData = new FormData();
formData.append('file', file);
return newService({
url: '/inventory/count/importInventoryCount',
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data',
},
});
}