装柜优化
This commit is contained in:
@@ -43,11 +43,11 @@ const detail = {
|
||||
describe('platform loading lists API', () => {
|
||||
beforeEach(() => vi.restoreAllMocks())
|
||||
|
||||
it('queries preload plans across all warehouses with fixed LOADING status', async () => {
|
||||
it('queries preload plans without forcing a status so EDITING and LOADING are returned', async () => {
|
||||
const get = vi.spyOn(http, 'get').mockResolvedValue({ code: '200', message: 'ok', data: { records: [preloadSummary], page: '1', size: '20', total: '1', pages: '1' } })
|
||||
const result = await listPreloadPlans({ page: 1, size: 20, keyword: 'PL' })
|
||||
|
||||
expect(get).toHaveBeenCalledWith('/platform/v1/first-leg/loading-plans', { params: { page: 1, size: 20, keyword: 'PL', status: 'LOADING' } })
|
||||
expect(get).toHaveBeenCalledWith('/platform/v1/first-leg/loading-plans', { params: { page: 1, size: 20, keyword: 'PL' } })
|
||||
expect(result.total).toBe(1)
|
||||
expect(result.records[0]?.planId).toBe('1900000000000000001')
|
||||
expect(result.records[0]?.customers[0]?.accountId).toBe('1900000000000000002')
|
||||
|
||||
@@ -203,7 +203,7 @@ function idempotencyKey(planId: string) {
|
||||
export async function listPreloadPlans(query: LoadingListQuery) {
|
||||
const response = await http.get<ApiEnvelope<RawPage<PreloadSummary>>, ApiEnvelope<RawPage<PreloadSummary>>>(
|
||||
`${basePath}/loading-plans`,
|
||||
{ params: { ...query, status: 'LOADING' } },
|
||||
{ params: query },
|
||||
)
|
||||
return normalizePage(unwrapApiResponse(response), normalizePreloadSummary)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user