feat: 完成后台联调与通用列表组件

This commit is contained in:
2026-08-01 12:17:33 +08:00
parent b53fe81999
commit 29dbae573f
50 changed files with 3394 additions and 580 deletions
+4 -4
View File
@@ -26,7 +26,7 @@ describe('platform first-leg order API', () => {
it('queries a tenant-scoped order page with server pagination and filters', async () => {
const page = { records: [], page: 2, size: 20, total: 0, pages: 0 }
vi.mocked(http.get).mockResolvedValue({ code: '0', message: 'success', data: page })
vi.mocked(http.get).mockResolvedValue({ code: '200', message: 'success', data: page })
await expect(listPlatformFirstLegOrders('10001', {
keyword: 'FL2026', status: 'SUBMITTED', createdFrom: '2026-07-01T00:00:00', createdTo: '2026-07-31T23:59:59', page: 2, size: 20,
@@ -39,8 +39,8 @@ describe('platform first-leg order API', () => {
})
it('uses the platform lifecycle routes and target tenant query parameter', async () => {
vi.mocked(http.get).mockResolvedValue({ code: '0', message: 'success', data: { order: {} } })
vi.mocked(http.post).mockResolvedValue({ code: '0', message: 'success', data: null })
vi.mocked(http.get).mockResolvedValue({ code: '200', message: 'success', data: { order: {} } })
vi.mocked(http.post).mockResolvedValue({ code: '200', message: 'success', data: null })
await getPlatformFirstLegOrder('10001', '90001')
await approvePlatformFirstLegOrder('10001', '90001')
@@ -60,7 +60,7 @@ describe('platform first-leg order API', () => {
})
it('writes the backend express contract as names, not a guessed master-data ID', async () => {
vi.mocked(http.put).mockResolvedValue({ code: '0', message: 'success', data: null })
vi.mocked(http.put).mockResolvedValue({ code: '200', message: 'success', data: null })
await updatePlatformFirstLegOrderExpress('10001', '90001', { expressCompany: '顺丰速运', expressTrackingNo: 'SF123456' })
expect(http.put).toHaveBeenCalledWith(