From c91c87784e1cb2088c8bb88d44c58f0151fb4ee1 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Thu, 20 Aug 2026 18:05:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../loading-lists/components/ContainerFeesPanel.test.ts | 3 ++- src/modules/loading-lists/components/ContainerFeesPanel.vue | 6 +++++- .../components/InboundFeeDetailManager.test.ts | 6 ++++-- .../unified-orders/components/InboundFeeDetailManager.vue | 6 +++++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/modules/loading-lists/components/ContainerFeesPanel.test.ts b/src/modules/loading-lists/components/ContainerFeesPanel.test.ts index 456bb437..a6f2e4f2 100644 --- a/src/modules/loading-lists/components/ContainerFeesPanel.test.ts +++ b/src/modules/loading-lists/components/ContainerFeesPanel.test.ts @@ -225,7 +225,8 @@ describe('ContainerFeesPanel contract', () => { vi.mocked(listContainerFeeSupplierOptions).mockResolvedValue([{ id: '41', supplierName: '承运商A', category: 'TRUCKING' }]) const wrapper = await mountPanel(['firstleg:inbound:fee-detail:view', 'firstleg:inbound:fee-detail:edit', 'firstleg:fee-item:view', 'platform:supplier:list']) const state = (wrapper.vm.$ as unknown as { setupState: { openCreate(): void; save(): Promise; selectVoucher(event: Event): Promise; form: { direction: string; feeItemId: string; supplierId: string | null; settlementMode: string | null; paidAt: string | null; paymentMethod: string | null; paymentReferenceNo: string | null; amount: number } } }).setupState - state.openCreate(); await flushPromises(); Object.assign(state.form, { direction: 'PAYABLE', feeItemId: '7', supplierId: '41', settlementMode: 'DIRECT_PAID', paidAt: '2026-08-12T10:00:00', paymentMethod: 'ONLINE', paymentReferenceNo: null, amount: 100 }); await flushPromises() + state.openCreate(); await flushPromises(); Object.assign(state.form, { direction: 'PAYABLE', feeItemId: '7' }); await flushPromises() + Object.assign(state.form, { supplierId: '41', settlementMode: 'DIRECT_PAID', paidAt: '2026-08-12T10:00:00', paymentMethod: 'ONLINE', paymentReferenceNo: null, amount: 100 }); await flushPromises() await state.save(); expect(createContainerFee).not.toHaveBeenCalled() const input = document.createElement('input'); Object.defineProperty(input, 'files', { value: [new File(['x'], '付款凭证.pdf')] }) await state.selectVoucher({ target: input } as unknown as Event); await state.save() diff --git a/src/modules/loading-lists/components/ContainerFeesPanel.vue b/src/modules/loading-lists/components/ContainerFeesPanel.vue index 757b278c..90c315f6 100644 --- a/src/modules/loading-lists/components/ContainerFeesPanel.vue +++ b/src/modules/loading-lists/components/ContainerFeesPanel.vue @@ -13,6 +13,10 @@ import { adjustContainerFee, approveContainerFee, createContainerFee, listApplic const props = defineProps<{ planId: string; containerBookingId: string; customers: Array<{ accountId: string; customerName: string | null }> }>() const access = useAccessPreviewStore() +const settlementModeModel = computed({ + get: () => form.settlementMode ?? '', + set: (value) => { form.settlementMode = value === 'ON_ACCOUNT' || value === 'DIRECT_PAID' ? value : null }, +}) const accountId = ref('') const fees = ref([]) const feeItems = ref([]) @@ -293,7 +297,7 @@ onMounted(() => void load()) - 账期应付已付成本 + 账期应付已付成本