Merge branch 'release/test' of http://8.163.30.128:10082/html/client-web into release/test

This commit is contained in:
wujinliang
2026-09-18 09:15:28 +08:00
24 changed files with 1003 additions and 244 deletions
+19 -2
View File
@@ -457,15 +457,32 @@ export interface MerchantPriceEstimate {
}
export function getMerchantWarehouses(params: MerchantWarehouseQuery = {}) {
return apiRequest<PageResult<MerchantWarehouse>>({
const request = apiRequest<PageResult<MerchantWarehouse>>({
method: 'GET',
url: '/merchant/v1/warehouses',
params: { page: 1, size: 200, status: 'ACTIVE', ...params },
})
if (params.warehouseType !== 'OVERSEAS') return request
return request.then(async (result) => {
const usableRecords = result.records.filter((item) => item.status === 'ACTIVE' && item.warehouseType === 'OVERSEAS')
if (usableRecords.length > 0) return { ...result, records: usableRecords }
const fallback = await apiRequest<PageResult<MerchantWarehouse>>({
method: 'GET',
url: '/platform/v1/warehouse-admin',
params: { page: params.page || 1, size: params.size || 200, tenantId: 0, warehouseType: 'OVERSEAS', status: 'ACTIVE' },
})
return {
...fallback,
records: fallback.records.filter((item) => item.status === 'ACTIVE' && item.warehouseType === 'OVERSEAS'),
}
})
}
export function getMerchantWarehouseDetail(id: number | string) {
return apiRequest<MerchantWarehouseDetail>({ method: 'GET', url: `/merchant/v1/warehouses/${id}` })
return apiRequest<MerchantWarehouseDetail>({ method: 'GET', url: `/merchant/v1/warehouses/${id}` }).catch(async () => {
const fallback = await apiRequest<MerchantWarehouseDetail>({ method: 'GET', url: `/platform/v1/warehouse-admin/${encodeURIComponent(id)}`, params: { tenantId: 0 } })
return fallback
})
}
export function getMerchantPricingChannels(originWarehouseId: number | string) {
@@ -35,5 +35,5 @@ test('keeps overseas warehouse operations first and renders readable list values
assert.match(overseas, /function formatDateTime\(value\?: string \| null\)/)
assert.match(overseas, /import SingleLineText from '@\/components\/common\/SingleLineText\.vue'/)
assert.match(overseas, /<SingleLineText :value="row\[String\(index\)\]"/)
assert.match(overseas, /<td><button class="warehouse-link"[^>]*>.*?查看<\/button><\/td><td v-for="\(_, index\) in config\.columns\.slice\(1\)"/s)
assert.match(overseas, /<td><div class="warehouse-list-actions"><button class="warehouse-link"[^>]*>.*?查看<\/button>.*?<\/div><\/td><td v-for="\(_, index\) in config\.columns\.slice\(1\)"/s)
})