From dcbca0bf8554207a1fde1c0558a1e8bf0fb5f797 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Mon, 17 Aug 2026 20:01:51 +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 --- .../api/platformContainerLoading.test.ts | 4 ++-- .../container-loading/pages/ContainersView.test.ts | 14 ++++++++++++++ .../container-loading/pages/ContainersView.vue | 2 +- .../loading-lists/api/platformLoadingLists.test.ts | 4 ++-- .../components/LoadingListDetailDrawer.vue | 4 ++-- .../components/LoadingListsView.test.ts | 2 ++ .../api/platformOceanBookings.test.ts | 5 +++-- .../ocean-bookings/pages/OceanBookingsView.test.ts | 3 ++- .../ocean-bookings/pages/OceanBookingsView.vue | 6 +++--- .../pages/OutboundDispatchesView.test.ts | 3 ++- .../pages/OutboundDispatchesView.vue | 4 ++-- src/modules/trucking/api/platformTrucking.test.ts | 4 ++-- .../trucking/pages/TruckAppointmentsView.test.ts | 12 +++++++++--- 13 files changed, 46 insertions(+), 21 deletions(-) diff --git a/src/modules/container-loading/api/platformContainerLoading.test.ts b/src/modules/container-loading/api/platformContainerLoading.test.ts index 32a14e33..bf348c5b 100644 --- a/src/modules/container-loading/api/platformContainerLoading.test.ts +++ b/src/modules/container-loading/api/platformContainerLoading.test.ts @@ -15,7 +15,7 @@ vi.mock('@/shared/api/http', () => ({ unwrapApiResponse: (response: { data: T }) => response.data, })) -const container = { id: 9007199254740993, planId: 9007199254740994, warehouseId: 9007199254740995, shippingCompanyId: 9007199254740996, sourceType: 'SIMULATION', recordStatus: 'ACTIVE', mergedIntoContainerBookingId: null, channelCode: 'NY_EXX', channelName: '纽约EXX海铁', version: '2', capacityCbm: '76', maxWeightKg: '28000' } +const container = { id: 9007199254740993, planId: 9007199254740994, planNo: 'LP-001', warehouseId: 9007199254740995, shippingCompanyId: 9007199254740996, sourceType: 'SIMULATION', recordStatus: 'ACTIVE', mergedIntoContainerBookingId: null, channelCode: 'NY_EXX', channelName: '纽约EXX海铁', exceptionActive: true, destinationClearanceDocumentStatus: 'COMPLETED', customsDeclarationDocumentStatus: 'UPLOADED', deliveryOrderDocumentStatus: 'UPLOADED', pickupOrderDocumentStatus: 'MISSING', version: '2', capacityCbm: '76', maxWeightKg: '28000' } const plan = { id: 9007199254740993, bookingId: 9007199254740994, version: '3', status: 'LOADING', canAssign: true, canEdit: true, blockedReason: null, finalCompletionStatus: 'NOT_STARTED', @@ -38,7 +38,7 @@ describe('platform container loading API', () => { it('normalizes paged container ids and numeric metadata', async () => { vi.mocked(http.get).mockResolvedValueOnce({ code: '200', data: { records: [container], page: '1', size: '20', total: '1', pages: '1' } }) const result = await listContainers({ page: 1, size: 20 }) - expect(result.records[0]).toMatchObject({ id: String(container.id), planId: String(container.planId), warehouseId: String(container.warehouseId), channelCode: 'NY_EXX', channelName: '纽约EXX海铁', version: 2, capacityCbm: 76 }) + expect(result.records[0]).toMatchObject({ id: String(container.id), planId: String(container.planId), planNo: 'LP-001', warehouseId: String(container.warehouseId), channelCode: 'NY_EXX', channelName: '纽约EXX海铁', exceptionActive: true, destinationClearanceDocumentStatus: 'COMPLETED', customsDeclarationDocumentStatus: 'UPLOADED', deliveryOrderDocumentStatus: 'UPLOADED', pickupOrderDocumentStatus: 'MISSING', version: 2, capacityCbm: 76 }) expect(http.get).toHaveBeenCalledWith('/platform/v1/containers', { params: { page: 1, size: 20 } }) }) diff --git a/src/modules/container-loading/pages/ContainersView.test.ts b/src/modules/container-loading/pages/ContainersView.test.ts index 89e6e825..420218bd 100644 --- a/src/modules/container-loading/pages/ContainersView.test.ts +++ b/src/modules/container-loading/pages/ContainersView.test.ts @@ -261,6 +261,20 @@ describe('ContainersView', () => { }) describe('ContainersView trucking supplier contract', () => { + it('shows the frozen plan, exception and document aggregates without deriving them client-side', () => { + const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/ContainersView.vue'), 'utf8') + const fields = ['containerNo', 'planNo', 'planStatus', 'exceptionActive', 'cabinetNo', 'destinationClearanceDocumentStatus', 'customsDeclarationDocumentStatus', 'deliveryOrderDocumentStatus', 'pickupOrderDocumentStatus'] + let previous = source.indexOf("key: 'actions'") + for (const field of fields) { + const current = source.indexOf(`key: '${field}'`, previous + 1) + expect(current, field).toBeGreaterThan(previous) + previous = current + } + expect(source).toContain("MISSING: '未上传', UPLOADED: '已上传', COMPLETED: '已完成'") + expect(source).toContain("detail.planNo || '—'") + expect(source).toContain("detail.exceptionActive ? '异常' : '正常'") + }) + it('uses active TRUCKING suppliers without allowing free-text carrier names', () => { const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/ContainersView.vue'), 'utf8') expect(source).toContain("listSuppliers({ page: 1, size: 200, category: 'TRUCKING', status: 'ACTIVE' })") diff --git a/src/modules/container-loading/pages/ContainersView.vue b/src/modules/container-loading/pages/ContainersView.vue index 0bc5eef2..c69acc7c 100644 --- a/src/modules/container-loading/pages/ContainersView.vue +++ b/src/modules/container-loading/pages/ContainersView.vue @@ -606,7 +606,7 @@ onMounted(() => { void Promise.all([loadCustomers(), loadWarehouses(), loadBusin - + diff --git a/src/modules/loading-lists/api/platformLoadingLists.test.ts b/src/modules/loading-lists/api/platformLoadingLists.test.ts index 622ee401..3e00ea18 100644 --- a/src/modules/loading-lists/api/platformLoadingLists.test.ts +++ b/src/modules/loading-lists/api/platformLoadingLists.test.ts @@ -49,7 +49,7 @@ const preloadSummary = { const detail = { summary: preloadSummary, items: [{ - itemId: 11, accountId: 12, inboundId: 13, inboundDetailId: 14, productQuantity: 20, + itemId: 11, accountId: 12, orderId: 15, orderNo: 'ORD-001', inboundId: 13, inboundDetailId: 14, containerNo: 'MSCU1234567', productQuantity: 20, customerName: '测试客户', inboundCode: 'RK001', skuCode: 'SKU001', destinationWarehouse: 'ONT8', chineseName: '产品', englishName: null, goodsImageUrl: null, packageCount: 2, palletCount: 1, grossWeightKg: 10, netWeightKg: 9, volumeCbm: 1, dimensionalWeightKg: 2, unitsPerPackage: 10, fbaTrackingNo: null, shipmentNo: null, shippingMark: null, @@ -77,7 +77,7 @@ describe('platform loading lists API', () => { vi.spyOn(http, 'get').mockResolvedValue({ code: '200', message: 'ok', data: detail }) const result = await getPreloadPlan('100', '300') - expect(result.items[0]).toMatchObject({ itemId: '11', accountId: '12', inboundId: '13', inboundDetailId: '14', productQuantity: '20' }) + expect(result.items[0]).toMatchObject({ itemId: '11', accountId: '12', orderId: '15', orderNo: 'ORD-001', inboundId: '13', inboundDetailId: '14', containerNo: 'MSCU1234567', productQuantity: '20' }) expect(result.summary.containerBookingId).toBe('1900000000000000004') expect(result.histories[0]).toMatchObject({ historyId: '21', itemId: '11', operatorId: '22' }) }) diff --git a/src/modules/loading-lists/components/LoadingListDetailDrawer.vue b/src/modules/loading-lists/components/LoadingListDetailDrawer.vue index b2a967cc..e087efc9 100644 --- a/src/modules/loading-lists/components/LoadingListDetailDrawer.vue +++ b/src/modules/loading-lists/components/LoadingListDetailDrawer.vue @@ -9,7 +9,7 @@ import StatusBadge from '@/shared/components/StatusBadge.vue' import ContainerFeesPanel from './ContainerFeesPanel.vue' import { loadingListStatusLabel } from '../status' import type { ApiErrorDetails } from '@/shared/api/http' -import type { LoadingDetail, LoadingListMode, LoadingListSummary, PreloadSummary } from '../api/platformLoadingLists' +import type { LoadingDetail, LoadingItem, LoadingListMode, LoadingListSummary, PreloadSummary } from '../api/platformLoadingLists' const props = defineProps<{ mode: LoadingListMode @@ -28,7 +28,7 @@ const itemColumns: DataTableColumn[] = [ { key: 'sequence', prop: 'loadSequence', label: '装柜顺序', fixed: 'left', width: 92, hideable: false, movable: false }, { key: 'inboundCode', prop: 'inboundCode', label: '入仓码', minWidth: 150 }, { key: 'orderNo', prop: 'orderNo', label: '订单号', minWidth: 150 }, - { key: 'containerNo', prop: 'containerNo', label: '集装箱号', minWidth: 145 }, + { key: 'containerNo', prop: 'containerNo', label: '集装箱号', minWidth: 145, formatter: (row: LoadingItem) => row.containerNo || '—' }, { key: 'skuCode', prop: 'skuCode', label: 'SKU', minWidth: 130 }, { key: 'destinationWarehouse', prop: 'destinationWarehouse', label: '目的仓', minWidth: 130 }, { key: 'customerName', prop: 'customerName', label: '客户', minWidth: 150 }, diff --git a/src/modules/loading-lists/components/LoadingListsView.test.ts b/src/modules/loading-lists/components/LoadingListsView.test.ts index 65833782..37d50eda 100644 --- a/src/modules/loading-lists/components/LoadingListsView.test.ts +++ b/src/modules/loading-lists/components/LoadingListsView.test.ts @@ -142,6 +142,8 @@ describe('LoadingListsView', () => { }) it('shows every prototype detail field that is backed by the loading item contract', () => { + expect(detailSource.indexOf("key: 'orderNo'")).toBeLessThan(detailSource.indexOf("key: 'containerNo'")) + expect(detailSource.indexOf("key: 'containerNo'")).toBeLessThan(detailSource.indexOf("key: 'skuCode'")) const fields = [ 'chineseName', 'englishName', diff --git a/src/modules/ocean-bookings/api/platformOceanBookings.test.ts b/src/modules/ocean-bookings/api/platformOceanBookings.test.ts index d75ca394..a0d1d629 100644 --- a/src/modules/ocean-bookings/api/platformOceanBookings.test.ts +++ b/src/modules/ocean-bookings/api/platformOceanBookings.test.ts @@ -4,7 +4,7 @@ import { http } from '@/shared/api/http' const detailResponse = (version = 0, status = 'CONFIRMED') => ({ oceanBooking: { - id: 123, bookingNo: 'OB123', status, version, customerId: 456, customerName: '客户', + id: 123, bookingNo: 'OB123', status, version, customerId: 456, customerName: '客户', shipperName: '发货企业', consigneeName: '收货企业', containerCount: '2', }, parties: [], containers: [{ containerBookingId: 9007199254740993, cabinetNo: 'CAB-1', containerNo: 'MSCU1234567', requirementId: 9007199254740994, allocationId: 9007199254740995, containerType: '40HC', containerKind: 'FCL', capacityCbm: 76, maxWeightKg: 28000, warehouseId: 9007199254740996, warehouseName: '义乌仓', channelCode: 'SEA', channelName: '海运', customerId: 456, customerName: '客户' }], @@ -13,12 +13,13 @@ const detailResponse = (version = 0, status = 'CONFIRMED') => ({ describe('ocean bookings api', () => { it('normalizes pagination and long ids', async () => { - vi.spyOn(http, 'get').mockResolvedValueOnce({ code: '200', message: 'ok', data: { records: [{ id: 123, customerId: 456, containers: [] }], page: '2', size: '20', total: '21', pages: '2' } }) + vi.spyOn(http, 'get').mockResolvedValueOnce({ code: '200', message: 'ok', data: { records: [{ id: 123, customerId: 456, shipperName: '发货企业', consigneeName: '收货企业', containerCount: '3' }], page: '2', size: '20', total: '21', pages: '2' } }) const result = await listOceanBookings({ page: 1, size: 10 }) expect(result.page).toBe(2) expect(result.total).toBe(21) expect(result.records[0]?.id).toBe('123') expect(result.records[0]?.customerId).toBe('456') + expect(result.records[0]).toMatchObject({ shipperName: '发货企业', consigneeName: '收货企业', containerCount: 3 }) }) it('uses version zero for create and extracts the id from the returned Detail', async () => { diff --git a/src/modules/ocean-bookings/pages/OceanBookingsView.test.ts b/src/modules/ocean-bookings/pages/OceanBookingsView.test.ts index f7922bd9..64a8313c 100644 --- a/src/modules/ocean-bookings/pages/OceanBookingsView.test.ts +++ b/src/modules/ocean-bookings/pages/OceanBookingsView.test.ts @@ -7,7 +7,7 @@ describe('OceanBookingsView prototype field matrix', () => { const source = readFileSync(resolve(process.cwd(), 'src/modules/ocean-bookings/pages/OceanBookingsView.vue'), 'utf8') it('keeps the frozen business field sequence after the first action column', () => { - const fields = ['bookingNo', 'customerName', 'billOfLadingNo', 'carrierName', 'bookingAgent', 'vesselName', 'pol', 'pod', 'etd', 'eta', 'status', 'updatedAt'] + const fields = ['bookingNo', 'customerName', 'billOfLadingNo', 'shipperName', 'consigneeName', 'containerCount', 'carrierName', 'bookingAgent', 'vesselName', 'pol', 'pod', 'etd', 'eta', 'status', 'updatedAt'] let previous = source.indexOf("key: 'actions'") for (const field of fields) { const current = source.indexOf(`prop: '${field}'`, previous + 1) @@ -18,6 +18,7 @@ describe('OceanBookingsView prototype field matrix', () => { it('formats schedule and update timestamps without adding print actions', () => { expect(source).toContain("prop: 'billOfLadingNo', label: '提单号'") + expect(source).toContain("prop: 'containerCount', label: '柜量'") expect(source).toContain('') expect(source).toContain('') expect(source).not.toContain('打印') diff --git a/src/modules/ocean-bookings/pages/OceanBookingsView.vue b/src/modules/ocean-bookings/pages/OceanBookingsView.vue index 69227961..813a4979 100644 --- a/src/modules/ocean-bookings/pages/OceanBookingsView.vue +++ b/src/modules/ocean-bookings/pages/OceanBookingsView.vue @@ -39,9 +39,9 @@ const columns = [ { key: 'actions', label: '操作', fixed: 'left', width: 100, slotName: 'actions', hideable: false, movable: false }, { prop: 'bookingNo', label: '订舱号', minWidth: 150 }, { prop: 'customerName', label: '客户', minWidth: 160 }, - { prop: 'billOfLadingNo', label: '提单号', minWidth: 155 }, - { prop: 'shipperName', label: '提单发货人', minWidth: 160 }, - { prop: 'consigneeName', label: '提单收货人', minWidth: 160 }, + { prop: 'billOfLadingNo', label: '提单号', minWidth: 155, formatter: (row: OceanBookingResource) => row.billOfLadingNo || '—' }, + { prop: 'shipperName', label: '提单发货人', minWidth: 160, formatter: (row: OceanBookingResource) => row.shipperName || '—' }, + { prop: 'consigneeName', label: '提单收货人', minWidth: 160, formatter: (row: OceanBookingResource) => row.consigneeName || '—' }, { prop: 'containerCount', label: '柜量', width: 90, align: 'right' }, { prop: 'carrierName', label: '船公司', minWidth: 130 }, { prop: 'bookingAgent', label: '订舱代理', minWidth: 140 }, diff --git a/src/modules/outbound-dispatch/pages/OutboundDispatchesView.test.ts b/src/modules/outbound-dispatch/pages/OutboundDispatchesView.test.ts index 914bc6a0..f6604778 100644 --- a/src/modules/outbound-dispatch/pages/OutboundDispatchesView.test.ts +++ b/src/modules/outbound-dispatch/pages/OutboundDispatchesView.test.ts @@ -22,7 +22,7 @@ const customer = { id: '10001', tenantCode: 'CUS-1', tenantName: '示例客户', const order = { orderId: '20001', orderNo: 'ORD-001', inboundId: '30001', inboundCode: 'IN-001', customerId: '10001', customerName: '示例客户' } as UnifiedOrderResource const secondOrder = { ...order, orderId: '20002', orderNo: 'ORD-002', inboundId: '30002', inboundCode: 'IN-002' } as UnifiedOrderResource const container = { id: '40001', bookingNo: 'BK-001', cabinetNo: 'CAB-001', containerNo: 'MSCU-001' } as ContainerBookingResource -const row = { orderId: '20001', orderNo: 'ORD-001', inboundId: '30001', inboundCode: 'IN-001', customerId: '10001', customerName: '示例客户', containerBookingId: '40001', containerNo: 'MSCU-001', oceanBookingStatus: 'RELEASED', truckAppointmentStatus: 'COMPLETED', pickTaskStatus: 'AWAITING_REVIEW', dispatchStatus: 'READY_FOR_DISPATCH', version: 1, gate: { passed: true, items: [], checkedAt: '2026-08-11T10:00:00' } } as OutboundDispatchResource +const row = { orderId: '20001', orderNo: 'ORD-001', inboundId: '30001', inboundCode: 'IN-001', customerId: '10001', customerName: '示例客户', containerBookingId: '40001', cabinetNo: 'CAB-001', containerNo: 'MSCU-001', oceanBookingStatus: 'RELEASED', truckAppointmentStatus: 'COMPLETED', pickTaskStatus: 'AWAITING_REVIEW', dispatchStatus: 'READY_FOR_DISPATCH', version: 1, gate: { passed: true, items: [], checkedAt: '2026-08-11T10:00:00' } } as OutboundDispatchResource enableAutoUnmount(afterEach) @@ -145,6 +145,7 @@ describe('OutboundDispatchesView', () => { const columnSource = source.slice(source.indexOf('const columns')) expect(columnSource.indexOf("key: 'actions'")).toBeLessThan(columnSource.indexOf("prop: 'inboundCode'")) expect(columnSource).not.toContain("prop: 'orderNo'") + expect(columnSource.indexOf("prop: 'cabinetNo', label: '柜次号'")).toBeLessThan(columnSource.indexOf("prop: 'containerNo', label: '集装箱号'")) expect(columnSource).toContain("fixed: 'left'") expect(source).toContain('aggregate.gate?.items') expect(source).toContain('detail.timeline') diff --git a/src/modules/outbound-dispatch/pages/OutboundDispatchesView.vue b/src/modules/outbound-dispatch/pages/OutboundDispatchesView.vue index ca218a19..70d3d756 100644 --- a/src/modules/outbound-dispatch/pages/OutboundDispatchesView.vue +++ b/src/modules/outbound-dispatch/pages/OutboundDispatchesView.vue @@ -48,8 +48,8 @@ const columns = [ { key: 'actions', label: '操作', fixed: 'left', width: 240, slotName: 'actions', hideable: false, movable: false }, { prop: 'inboundCode', label: '入仓码', minWidth: 145 }, { prop: 'customerName', label: '客户', minWidth: 140 }, - { prop: 'cabinetNo', label: '柜次号', minWidth: 145 }, - { prop: 'containerNo', label: '集装箱号', minWidth: 145 }, + { prop: 'cabinetNo', label: '柜次号', minWidth: 145, formatter: (row: OutboundDispatchResource) => row.cabinetNo || '—' }, + { prop: 'containerNo', label: '集装箱号', minWidth: 145, formatter: (row: OutboundDispatchResource) => row.containerNo || '—' }, { prop: 'oceanBookingStatus', label: '订舱', width: 105, slotName: 'booking' }, { prop: 'truckAppointmentStatus', label: '拖车', width: 105, slotName: 'truck' }, { prop: 'pickTaskStatus', label: '拣货', width: 105, slotName: 'pick' }, diff --git a/src/modules/trucking/api/platformTrucking.test.ts b/src/modules/trucking/api/platformTrucking.test.ts index d133877a..678df507 100644 --- a/src/modules/trucking/api/platformTrucking.test.ts +++ b/src/modules/trucking/api/platformTrucking.test.ts @@ -8,8 +8,8 @@ describe('truck appointment API', () => { beforeEach(() => { vi.clearAllMocks() }) it('normalizes page values and maps filters', async () => { - vi.mocked(http.get).mockResolvedValue({ data: { records: [], page: '2', size: '20', total: '21', pages: '2' } }) - await expect(listTruckAppointments({ page: 2, size: 20, keyword: ' BY ', status: 'DISPATCHED', containerBookingId: '77' })).resolves.toMatchObject({ page: 2, total: 21, pages: 2 }) + vi.mocked(http.get).mockResolvedValue({ data: { records: [{ id: 1, oceanBookingId: 2, containerBookingId: 3, warehouseId: 4, shippingCompanyId: 5, bookingAgentId: 6, oceanBookingNo: 'OB-1', cabinetNo: 'CAB-1', containerNo: 'MSCU-1', warehouseName: '义乌仓', shippingCompanyName: '船公司', bookingAgentName: '订舱代理', attachmentCount: '2' }], page: '2', size: '20', total: '21', pages: '2' } }) + await expect(listTruckAppointments({ page: 2, size: 20, keyword: ' BY ', status: 'DISPATCHED', containerBookingId: '77' })).resolves.toMatchObject({ page: 2, total: 21, pages: 2, records: [{ id: '1', oceanBookingId: '2', containerBookingId: '3', warehouseId: '4', shippingCompanyId: '5', bookingAgentId: '6', oceanBookingNo: 'OB-1', cabinetNo: 'CAB-1', containerNo: 'MSCU-1', attachmentCount: 2 }] }) expect(http.get).toHaveBeenCalledWith('/platform/v1/truck-appointments', { params: { page: 2, size: 20, keyword: 'BY', status: 'DISPATCHED', containerBookingId: '77' } }) }) diff --git a/src/modules/trucking/pages/TruckAppointmentsView.test.ts b/src/modules/trucking/pages/TruckAppointmentsView.test.ts index 6dce9231..c3cbee69 100644 --- a/src/modules/trucking/pages/TruckAppointmentsView.test.ts +++ b/src/modules/trucking/pages/TruckAppointmentsView.test.ts @@ -19,9 +19,9 @@ vi.mock('@/modules/iam', () => ({ })) const row: TruckAppointmentResource = { - id: '9001', appointmentNo: 'TA-9001', status: 'DISPATCHED', customerName: '示例企业', orderNo: 'ORD-1', containerBookingId: '77', - containerNo: 'CONT-1', carrierName: '宁波运输', driverName: '王强', vehicleNo: '浙B12345', - plannedLoadingAt: '2026-08-10T10:00:00', payableAmount: '3200.00', receivableAmount: '3800.00', attachments: [], + id: '9001', appointmentNo: 'TA-9001', status: 'DISPATCHED', customerName: '示例企业', orderNo: 'ORD-1', oceanBookingNo: 'OB-1', containerBookingId: '77', cabinetNo: 'CAB-1', + containerNo: 'CONT-1', warehouseName: '义乌仓', shippingCompanyName: '船公司A', bookingAgentName: '代理A', carrierName: '宁波运输', driverName: '王强', vehicleNo: '浙B12345', + plannedLoadingAt: '2026-08-10T10:00:00', payableAmount: '3200.00', receivableAmount: '3800.00', attachmentCount: 2, attachments: [], } describe('TruckAppointmentsView', () => { @@ -40,6 +40,11 @@ describe('TruckAppointmentsView', () => { expect(listTruckAppointments).toHaveBeenCalledWith({ page: 1, size: 20, customerId: '', keyword: '', status: '', containerBookingId: '', containerType: '' }) expect(wrapper.text()).toContain('TA-9001') expect(wrapper.text()).toContain('CONT-1') + expect(wrapper.text()).toContain('CAB-1') + expect(wrapper.text()).toContain('OB-1') + expect(wrapper.text()).toContain('义乌仓') + expect(wrapper.text()).toContain('船公司A') + expect(wrapper.text()).toContain('代理A') expect(wrapper.text()).not.toContain('77') expect(wrapper.text()).toContain('宁波运输') expect(wrapper.find('button[aria-label="查看 TA-9001"]').exists()).toBe(true) @@ -125,6 +130,7 @@ describe('TruckAppointmentsView', () => { expect(source.indexOf("key: 'payableAmount'")).toBeLessThan(source.indexOf("key: 'receivableAmount'")) expect(source.indexOf("key: 'receivableAmount'")).toBeLessThan(source.indexOf("key: 'plannedLoadingAt'")) expect(source).toContain("toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })") + expect(source).toContain("key: 'attachmentCount'") }) it('filters with an active name-only customer selector and stable customerId', () => { expect(source).toContain("listPlatformTenants({ page: 1, size: 200, status: 'ACTIVE' })")