This commit is contained in:
2026-09-15 15:01:01 +08:00
parent ac6b9ef9eb
commit 90f97e846f
3 changed files with 20 additions and 3 deletions
+3 -1
View File
@@ -403,7 +403,9 @@ onMounted(() => {
</div>
<span v-else class="muted-value">仅查看</span>
</template>
<template #feeItem="{ row }"><div class="fee-item-name"><strong>{{ (row as PlatformFeeItemResource).feeTypeName }}</strong><small>{{ (row as PlatformFeeItemResource).feeCode || '未分配编码' }}</small></div></template>
<template #feeItem="{ row }"><div class="fee-item-name"><strong>{{ (row as PlatformFeeItemResource).feeTypeName }}</strong>
<!-- <small>{{ (row as PlatformFeeItemResource).feeCode || '未分配编码' }}</small> -->
</div></template>
<template #tradeScope="{ row }"><el-tag effect="plain">{{ (row as PlatformFeeItemResource).tradeScope === 'DOMESTIC' ? '国内' : '国际' }}</el-tag></template>
<template #pickup="{ row }">{{ directionText((row as PlatformFeeItemResource).pickupPayable, (row as PlatformFeeItemResource).pickupReceivable) }}</template>
<template #warehouse="{ row }">{{ directionText((row as PlatformFeeItemResource).warehousePayable, (row as PlatformFeeItemResource).warehouseReceivable) }}</template>
+15
View File
@@ -1,7 +1,22 @@
import { describe, expect, it } from 'vitest'
import { mount } from '@vue/test-utils'
import StatusBadge from '@/shared/components/StatusBadge.vue'
import { loadingListStatusLabel } from './status'
describe('loading list status labels', () => {
it.each([
['WAIT_LOADING', '待装柜', 'warning'],
['EDITING', '预装柜中', 'warning'],
['LOADING', '拣货中', 'info'],
['COMPLETED', '装柜完成', 'success'],
['NEW_LOADING_STATE', '未知状态', 'neutral'],
])('renders %s with its shared status tone', (status, label, tone) => {
const wrapper = mount(StatusBadge, { props: { status: loadingListStatusLabel(status) } })
expect(wrapper.text()).toBe(label)
expect(wrapper.classes()).toContain(`is-${tone}`)
wrapper.unmount()
})
it('translates known states and hides unknown backend enums', () => {
expect(loadingListStatusLabel('EDITING')).toBe('预装柜中')
expect(loadingListStatusLabel('COMPLETED')).toBe('装柜完成')