This commit is contained in:
2026-08-06 14:55:17 +08:00
parent a813426588
commit 4ac0adac62
18 changed files with 379 additions and 352 deletions
@@ -64,6 +64,13 @@ describe('CarrierRatesView source contract', () => {
expect(source).toContain('customerLabel(detail.tenantId)')
})
it('loads shared carrier master data under the platform public scope', () => {
expect(source).toContain('listPlatformPartners({ page: 1, size: 200, type: \'CARRIER\', status: \'ACTIVE\' })')
expect(source).toContain('平台仓库或船司资料加载失败')
expect(source).not.toContain('listPlatformPartners(customerId,')
expect(source).not.toContain('所属企业的仓库或船司资料加载失败')
})
it('inherits QueryToolbar wrapping and full-width mobile controls', () => {
expect(queryToolbarSource).toContain('flex-wrap: wrap')
expect(queryToolbarSource).toContain('@media (max-width: 720px)')
@@ -276,7 +276,7 @@ async function loadCustomerMasterData(customerId: string) {
try {
const [warehouseResult, partnerResult] = await Promise.all([
listPlatformWarehouses(1, 200),
listPlatformPartners(customerId, { page: 1, size: 200, type: 'CARRIER', status: 'ACTIVE' }),
listPlatformPartners({ page: 1, size: 200, type: 'CARRIER', status: 'ACTIVE' }),
])
if (sequence !== masterDataSequence) return false
warehouses.value = warehouseResult.records.map((item) => ({ ...item, id: String(item.id), tenantId: String(item.tenantId) }))
@@ -288,7 +288,7 @@ async function loadCustomerMasterData(customerId: string) {
warehouses.value = []
carriers.value = []
loadedCustomerId.value = null
ElMessage.error(getApiErrorDetails(error, '所属企业的仓库或船司资料加载失败').message)
ElMessage.error(getApiErrorDetails(error, '平台仓库或船司资料加载失败').message)
}
return false
} finally {