diff --git a/src/modules/finance/financeDelivery.test.ts b/src/modules/finance/financeDelivery.test.ts index 56ff0eee..753724de 100644 --- a/src/modules/finance/financeDelivery.test.ts +++ b/src/modules/finance/financeDelivery.test.ts @@ -69,7 +69,7 @@ describe('finance five-page delivery contract', () => { '`${basePath}/fee-sources/${feeSourceId}/settlement-inclusion`', ]) expect(api).toContain(marker) for (const operation of ['getFinanceFeeSource', 'reviewFinanceFeeSource', 'updateFinanceFeeSourceSettlementInclusion']) expect(page).toContain(operation) - for (const permission of ['platform:finance:fee-source:view', 'platform:finance:fee-source:review', 'platform:finance:fee-source:settlement']) expect(page).toContain(permission) + for (const permission of ['platform:finance:customer-arap:list', 'platform:finance:fee-source:review', 'platform:finance:fee-source:settlement']) expect(page).toContain(permission) expect(page).toContain('expectedVersion: detail.value.operationVersion') const columns = page.slice(page.indexOf('const columns:')) expect(columns.indexOf("key: 'actions'")).toBeLessThan(columns.indexOf("key: 'direction'")) diff --git a/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts b/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts index 108ee48f..f688eef8 100644 --- a/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts +++ b/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts @@ -58,7 +58,7 @@ describe('FinanceCustomerAccountsView delivery', () => { it('restores account summary and ledger after opening the detail URL directly', async () => { const pinia = createPinia(); setActivePinia(pinia) - const auth = useAuthStore(); auth.token = 'token'; auth.permissions = ['platform:finance:account:view'] + const auth = useAuthStore(); auth.token = 'token'; auth.permissions = ['platform:finance:customer-account:list'] useAccessPreviewStore().initializeAfterLogin() const router = createRouter({ history: createMemoryHistory(), routes: [ { path: '/finance/customer-accounts', name: 'finance-customer-accounts', component: FinanceCustomerAccountsView }, diff --git a/src/modules/finance/pages/FinanceCustomerArapView.test.ts b/src/modules/finance/pages/FinanceCustomerArapView.test.ts index 9f589d05..a3c3ada9 100644 --- a/src/modules/finance/pages/FinanceCustomerArapView.test.ts +++ b/src/modules/finance/pages/FinanceCustomerArapView.test.ts @@ -118,7 +118,7 @@ describe('FinanceCustomerArapView G2 operations', () => { }) it('loads detail and submits review and settlement changes with the returned version', async () => { - const wrapper = await mountView(['platform:finance:customer-arap:list', 'platform:finance:fee-source:view', 'platform:finance:fee-source:review', 'platform:finance:fee-source:settlement']) + const wrapper = await mountView(['platform:finance:customer-arap:list', 'platform:finance:fee-source:review', 'platform:finance:fee-source:settlement']) await loadRows(wrapper) const vm = wrapper.vm as unknown as { openDetail(row: Record): Promise @@ -145,7 +145,7 @@ describe('FinanceCustomerArapView G2 operations', () => { it('renders request and trace ids when detail loading fails', async () => { vi.mocked(getFinanceFeeSource).mockRejectedValueOnce(new ApiResponseError('费用来源不可用', 'FIN-FEE-404', 404, undefined, 'req-g2-error', 'trace-g2-error')) - const wrapper = await mountView(['platform:finance:customer-arap:list', 'platform:finance:fee-source:view']) + const wrapper = await mountView(['platform:finance:customer-arap:list']) await loadRows(wrapper) const vm = wrapper.vm as unknown as { openDetail(row: Record): Promise } diff --git a/src/modules/finance/pages/FinanceCustomerStatementsView.test.ts b/src/modules/finance/pages/FinanceCustomerStatementsView.test.ts index d1d47aee..b90d9d07 100644 --- a/src/modules/finance/pages/FinanceCustomerStatementsView.test.ts +++ b/src/modules/finance/pages/FinanceCustomerStatementsView.test.ts @@ -34,7 +34,7 @@ const detail: FinanceReconciliationDetail = { revisions: [], } -async function mountPage(permissions = ['platform:finance:customer-statement:list', 'platform:finance:fee-source:view']) { +async function mountPage(permissions = ['platform:finance:customer-statement:list']) { const pinia = createPinia(); setActivePinia(pinia) const auth = useAuthStore(); auth.token = 'token'; auth.permissions = permissions useAccessPreviewStore().initializeAfterLogin() @@ -115,12 +115,12 @@ describe('FinanceCustomerStatementsView', () => { expect(listPlatformTenants).not.toHaveBeenCalled() }) - it('does not request fee-source details without its permission and keeps frozen trace fields visible', async () => { + it('uses statement list permission for fee-source details and keeps frozen trace fields visible', async () => { const wrapper = await mountPage(['platform:finance:customer-statement:list']) await (wrapper.vm as unknown as { openDetail(row: FinanceStatementReadModel): Promise }).openDetail(statement) await flushPromises() - expect(getFinanceFeeSource).not.toHaveBeenCalled() - expect(document.body.textContent).toContain('柜次ID 31') + expect(getFinanceFeeSource).toHaveBeenCalledWith('81') + expect(document.body.textContent).toContain('CONT-31') expect(document.body.textContent).toContain('hash-81') }) diff --git a/src/modules/inbounds/core/InboundSummaryPanel.vue b/src/modules/inbounds/core/InboundSummaryPanel.vue index 46fb4345..9c40bcf8 100644 --- a/src/modules/inbounds/core/InboundSummaryPanel.vue +++ b/src/modules/inbounds/core/InboundSummaryPanel.vue @@ -8,7 +8,7 @@ withDefaults(defineProps<{ summary: InboundOrderSummary; publicRemark?: string | function processLabel(status: string) { return inboundStatusLabel(status, inboundProcessStatusLabels, '未知状态') } function processType(status: string) { - if (status === 'INBOUNDED') return 'success' + if (status === 'WAIT_SPLIT') return 'success' if (status === 'MEASURE_REJECTED' || status === 'VOIDED') return 'danger' if (status === 'MEASURING' || status === 'INBOUNDING') return 'info' return 'warning' diff --git a/src/modules/inbounds/core/types.ts b/src/modules/inbounds/core/types.ts index bd0b7aa8..f5bba715 100644 --- a/src/modules/inbounds/core/types.ts +++ b/src/modules/inbounds/core/types.ts @@ -1,4 +1,4 @@ -export type InboundListTab = 'WAIT_MEASURE' | 'WAIT_REVIEW' | 'WAIT_FEE_SEND' | 'INBOUNDED' +export type InboundListTab = 'WAIT_MEASURE' | 'WAIT_REVIEW' | 'WAIT_FEE_SEND' | 'WAIT_SPLIT' export type InboundProcessStatus = | 'WAIT_MEASURE' @@ -8,7 +8,7 @@ export type InboundProcessStatus = | 'WAIT_PRICING' | 'FEE_CONFIRMING' | 'INBOUNDING' - | 'INBOUNDED' + | 'WAIT_SPLIT' | 'VOIDED' export type InboundFeeStatus = 'UNPRICED' | 'CALCULATED' | 'CONFIRMED' | 'SENT' | 'VOIDED' | string diff --git a/src/modules/inbounds/fee/InboundFeePanel.test.ts b/src/modules/inbounds/fee/InboundFeePanel.test.ts index c8ada965..42164874 100644 --- a/src/modules/inbounds/fee/InboundFeePanel.test.ts +++ b/src/modules/inbounds/fee/InboundFeePanel.test.ts @@ -35,7 +35,7 @@ const snapshot: InboundFeeSnapshot = { totalAmount: 1235.6, currency: 'CNY', rateEffectiveFrom: '2026-08-01T00:00:00', rateEffectiveTo: null, calculatedAt: '2026-08-04T10:00:00', confirmedAt: '2026-08-04T10:01:00', sentAt: '2026-08-04T10:02:00', - nextProcessStatus: 'INBOUNDED', + nextProcessStatus: 'WAIT_SPLIT', } enableAutoUnmount(afterEach) diff --git a/src/modules/inbounds/fee/InboundFeePanel.vue b/src/modules/inbounds/fee/InboundFeePanel.vue index 06cd9191..67a2888f 100644 --- a/src/modules/inbounds/fee/InboundFeePanel.vue +++ b/src/modules/inbounds/fee/InboundFeePanel.vue @@ -62,7 +62,7 @@ const canAdjust = computed(() => access.can('firstleg:fba-pricing:adjust')) const customerContextId = computed(() => props.customerId || props.tenantId || '') const adjustmentEligible = computed(() => ( snapshot.value?.feeStatus === 'SENT' - && snapshot.value.nextProcessStatus === 'INBOUNDED' + && snapshot.value.nextProcessStatus === 'WAIT_SPLIT' )) const chargeModeLabel = computed(() => snapshot.value?.chargeMode === 'KG' ? '按重量计费' : '按体积计费') const chargeUnitLabel = computed(() => snapshot.value?.chargeUnit === 'KG' ? 'KG' : 'CBM') diff --git a/src/modules/inbounds/measurement/types.ts b/src/modules/inbounds/measurement/types.ts index e7cbc76a..cf88c644 100644 --- a/src/modules/inbounds/measurement/types.ts +++ b/src/modules/inbounds/measurement/types.ts @@ -8,7 +8,7 @@ export type InboundMeasurementProcessStatus = | 'WAIT_PRICING' | 'FEE_CONFIRMING' | 'INBOUNDING' - | 'INBOUNDED' + | 'WAIT_SPLIT' | 'VOIDED' export interface InboundMeasurementItem { diff --git a/src/modules/inbounds/pages/InboundOrdersView.vue b/src/modules/inbounds/pages/InboundOrdersView.vue index 4ff86e5a..e07b2d84 100644 --- a/src/modules/inbounds/pages/InboundOrdersView.vue +++ b/src/modules/inbounds/pages/InboundOrdersView.vue @@ -65,7 +65,7 @@ const tabs: Array<{ value: InboundListTab | ''; label: string; description: stri { value: 'WAIT_MEASURE', label: '待测量', description: '等待测量或补正' }, { value: 'WAIT_REVIEW', label: '待审核', description: '等待测量审核' }, { value: 'WAIT_FEE_SEND', label: '待费用/入库', description: '等待费用编排完成' }, - { value: 'INBOUNDED', label: '已入库', description: '费用已发布并完成入库' }, + { value: 'WAIT_SPLIT', label: '待分柜', description: '费用已发布并完成入库,等待分柜' }, ] const advancedFilterKeys = new Set(['orderStatus', 'feeReviewStatus', 'customerName', 'destinationCode', 'holdFlag']) @@ -91,7 +91,7 @@ const allQueryFields = computed(() => [ { label: '待测量', value: 'WAIT_MEASURE' }, { label: '测量中', value: 'MEASURING' }, { label: '待测量审核', value: 'MEASURE_PENDING' }, { label: '测量已驳回', value: 'MEASURE_REJECTED' }, { label: '待计费', value: 'WAIT_PRICING' }, { label: '费用处理中', value: 'FEE_CONFIRMING' }, - { label: '入库处理中', value: 'INBOUNDING' }, { label: '已入库', value: 'INBOUNDED' }, { label: '已作废', value: 'VOIDED' }, + { label: '入库处理中', value: 'INBOUNDING' }, { label: '待分柜', value: 'WAIT_SPLIT' }, { label: '已作废', value: 'VOIDED' }, ] }, { key: 'orderStatus', type: 'select', width: 180, label: '订单状态', placeholder: '全部订单状态', options: Object.entries(inboundOrderStatusLabels).map(([value, label]) => ({ value, label })) }, { key: 'measureReviewStatus', type: 'select', width: 160, label: '测量审核状态', placeholder: '测量审核状态', options: [ @@ -318,7 +318,7 @@ function statusLabel(status: string) { return inboundStatusLabel(status, inboundProcessStatusLabels, '未知状态') } function statusType(status: string) { - if (status === 'INBOUNDED') return 'success' + if (status === 'WAIT_SPLIT') return 'success' if (status === 'MEASURE_REJECTED' || status === 'VOIDED') return 'danger' if (status === 'MEASURING' || status === 'INBOUNDING') return 'info' return 'warning' diff --git a/src/modules/inbounds/review/MeasurementReviewPanel.test.ts b/src/modules/inbounds/review/MeasurementReviewPanel.test.ts index a9f00f3b..e2db43a4 100644 --- a/src/modules/inbounds/review/MeasurementReviewPanel.test.ts +++ b/src/modules/inbounds/review/MeasurementReviewPanel.test.ts @@ -77,7 +77,7 @@ describe('MeasurementReviewPanel', () => { }) it('emits changed after a successful review write', async () => { - vi.mocked(approveMeasurement).mockResolvedValue({ feeId: '1', feeNo: 'FEE-1', feeVersion: 1, feeStatus: 'SENT', inboundId: '90001', totalAmount: 100, currency: 'CNY', nextProcessStatus: 'INBOUNDED' }) + vi.mocked(approveMeasurement).mockResolvedValue({ feeId: '1', feeNo: 'FEE-1', feeVersion: 1, feeStatus: 'SENT', inboundId: '90001', totalAmount: 100, currency: 'CNY', nextProcessStatus: 'WAIT_SPLIT' }) vi.spyOn(ElMessageBox, 'confirm').mockResolvedValue(undefined as never) const wrapper = mount(MeasurementReviewPanel, { props: { customerId: '10001', inboundId: '90001' }, global: { plugins: [ElementPlus] } }) await flushPromises() diff --git a/src/modules/inbounds/status.ts b/src/modules/inbounds/status.ts index 388a8101..d044e776 100644 --- a/src/modules/inbounds/status.ts +++ b/src/modules/inbounds/status.ts @@ -1,12 +1,12 @@ export const inboundProcessStatusLabels: Record = { WAIT_MEASURE: '待测量', MEASURING: '测量中', MEASURE_PENDING: '待测量审核', MEASURE_REJECTED: '测量已驳回', - WAIT_PRICING: '待计费', FEE_CONFIRMING: '费用处理中', INBOUNDING: '入库处理中', INBOUNDED: '已入库', VOIDED: '已作废', + WAIT_PRICING: '待计费', FEE_CONFIRMING: '费用处理中', INBOUNDING: '入库处理中', WAIT_SPLIT: '待分柜', VOIDED: '已作废', } export const inboundOrderStatusLabels: Record = { DRAFT: '草稿', SUBMITTED: '待审核', APPROVED: '已审核', ACCEPTED: '已受理', REJECTED: '已驳回', PROCESSING: '处理中', COMPLETED: '已完成', CANCELLED: '已取消', PENDING_REVIEW: '待审核', - WAIT_MEASURE: '待测量', INBOUNDED: '已入库', WAIT_SPLIT: '待分柜', LOADING: '装柜中', + WAIT_MEASURE: '待测量', WAIT_SPLIT: '待分柜', LOADING: '装柜中', LOADED: '装柜完成', DELIVERED: '派送完成', } diff --git a/src/modules/outbound-dispatch/statusLabels.test.ts b/src/modules/outbound-dispatch/statusLabels.test.ts index b5dbb90f..9d01d3c2 100644 --- a/src/modules/outbound-dispatch/statusLabels.test.ts +++ b/src/modules/outbound-dispatch/statusLabels.test.ts @@ -19,7 +19,7 @@ describe('outbound dispatch status labels', () => { expect(timelineStatusLabel('OUTBOUND_DISPATCH', 'READY_FOR_DISPATCH')).toBe('待确认出仓') expect(timelineStatusLabel('OCEAN_BOOKING', 'RELEASED')).toBe('已放舱') expect(timelineStatusLabel('TRUCK_APPOINTMENT', 'COMPLETED')).toBe('已完成') - expect(timelineStatusLabel('INBOUND', 'INBOUNDED')).toBe('已入库') + expect(timelineStatusLabel('INBOUND', 'WAIT_SPLIT')).toBe('待分柜') }) it('does not expose unknown backend enum values', () => { diff --git a/src/modules/outbound-dispatch/statusLabels.ts b/src/modules/outbound-dispatch/statusLabels.ts index a91f5e28..58b7a1fc 100644 --- a/src/modules/outbound-dispatch/statusLabels.ts +++ b/src/modules/outbound-dispatch/statusLabels.ts @@ -22,7 +22,7 @@ const inboundStatusLabels: Record = { WAIT_PRICING: '待计费', FEE_CONFIRMING: '费用处理中', INBOUNDING: '入库处理中', - INBOUNDED: '已入库', + WAIT_SPLIT: '待分柜', VOIDED: '已作废', }