feat(consignment): 寄售仓库按寄卖分类筛选并支持动态规格过滤
This commit is contained in:
@@ -3,6 +3,7 @@ import type {
|
||||
AdminConsignmentProfilesResponse,
|
||||
ConsignmentContactSupporter,
|
||||
ConsignmentInventory,
|
||||
ConsignmentInventoryFilterOptionsResponse,
|
||||
ConsignmentMatchCandidatesResponse,
|
||||
ConsignmentProfile,
|
||||
ConsignmentStatsSummary,
|
||||
@@ -22,6 +23,16 @@ export function fetchAdminConsignmentProfiles() {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 寄售仓库筛选选项:只返回已开启寄卖(已发布配置)的分类,
|
||||
* 每个分类带出「支持筛选」的规格字段与可选值。
|
||||
*/
|
||||
export function fetchAdminConsignmentInventoryFilterOptions() {
|
||||
return apiGet<ConsignmentInventoryFilterOptionsResponse>(
|
||||
'/api/v1/admin/worker-platform/consignment/inventory-filter-options',
|
||||
)
|
||||
}
|
||||
|
||||
export function saveAdminConsignmentProfile(payload: Record<string, unknown>) {
|
||||
return apiPost<{ profile: ConsignmentProfile }>(
|
||||
'/api/v1/admin/worker-platform/consignment/profiles',
|
||||
@@ -127,8 +138,8 @@ export function fetchAdminConsignmentInventories(params?: Record<string, unknown
|
||||
)
|
||||
}
|
||||
|
||||
export function fetchAdminConsignmentStats() {
|
||||
return apiGet<ConsignmentStatsSummary>('/api/v1/admin/worker-platform/consignment/stats')
|
||||
export function fetchAdminConsignmentStats(params?: Record<string, unknown>) {
|
||||
return apiGet<ConsignmentStatsSummary>('/api/v1/admin/worker-platform/consignment/stats', params)
|
||||
}
|
||||
|
||||
export function getAdminConsignmentInventory(id: number | string) {
|
||||
@@ -230,8 +241,10 @@ export function fetchInventoryMatchableOrders(
|
||||
)
|
||||
}
|
||||
|
||||
/** 全局匹配看板:非拼单待抢单手枪 × 在库待匹配现货,按细粒度评分排序。 */
|
||||
/** 全局匹配看板:待抢单 × 在库待匹配现货,按细粒度评分排序。 */
|
||||
export function fetchPendingPistolMatches(params?: {
|
||||
/** 只统计该寄卖分类;不传 = 全部 */
|
||||
categoryId?: number
|
||||
keyword?: string
|
||||
includeConflicts?: boolean
|
||||
limit?: number
|
||||
@@ -239,6 +252,7 @@ export function fetchPendingPistolMatches(params?: {
|
||||
return apiGet<PendingPistolMatchResult>(
|
||||
'/api/v1/admin/worker-platform/consignment/pending-pistol-matches',
|
||||
{
|
||||
categoryId: params?.categoryId,
|
||||
keyword: params?.keyword?.trim() || undefined,
|
||||
includeConflicts: params?.includeConflicts ? 'true' : undefined,
|
||||
limit: params?.limit,
|
||||
|
||||
Reference in New Issue
Block a user