feat: show overseas funding and pallet summaries

This commit is contained in:
2026-09-05 22:26:37 +08:00
parent 92b24cc9a6
commit ccf16b823b
19 changed files with 116 additions and 28 deletions
@@ -12,6 +12,7 @@ import QueryToolbar from '@/shared/components/QueryToolbar.vue'
import {
createPlatformPallet,
getPlatformPallet,
getPlatformPalletSummary,
listPlatformPallets,
type PlatformPalletResource,
} from '../api/platformPallets'
@@ -22,6 +23,7 @@ const palletsSource = readFileSync(resolve(process.cwd(), 'src/modules/warehouse
vi.mock('@/modules/warehouses', () => ({ listAllPlatformWarehouses: vi.fn() }))
vi.mock('../api/platformPallets', () => ({
listPlatformPallets: vi.fn(),
getPlatformPalletSummary: vi.fn(),
getPlatformPallet: vi.fn(),
createPlatformPallet: vi.fn(),
updatePlatformPallet: vi.fn(),
@@ -134,6 +136,7 @@ describe('PalletsView', () => {
document.body.innerHTML = ''
vi.mocked(listAllPlatformWarehouses).mockReset().mockResolvedValue([warehouse, fbaWarehouse, overseasWarehouse])
vi.mocked(listPlatformPallets).mockReset().mockResolvedValue({ records: [pallet], page: 1, size: 20, total: 1, pages: 1 })
vi.mocked(getPlatformPalletSummary).mockReset().mockResolvedValue({ totalCount: 1, idleCount: 1, occupiedCount: 0 })
vi.mocked(getPlatformPallet).mockReset().mockResolvedValue(pallet)
vi.mocked(createPlatformPallet).mockReset().mockResolvedValue('20002')
})