From 315cb8e663d9200ee993b54a16cdc27dbef313ad Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Sun, 11 Oct 2026 15:33:09 +0800 Subject: [PATCH] fix: align appointment viewing and fleet follow-up navigation --- .../AppointmentCalendarPanel.test.ts | 11 +++++ .../AppointmentCalendarPanel.vue | 5 +- .../AppointmentCalendarView.test.ts | 15 ++++++ .../AppointmentCalendarView.vue | 3 +- .../pages/OverseasBusinessViews.test.ts | 13 +++++ .../pages/TransportOrdersView.vue | 11 ++++- .../components/CapacityInquiryDialog.vue | 6 ++- .../TripBookingFulfillmentDialog.test.ts | 2 + .../TripBookingFulfillmentDialog.vue | 2 +- src/modules/overseas-master-data/index.ts | 1 + .../inquiryNavigation.test.ts | 16 +++++++ .../overseas-master-data/inquiryNavigation.ts | 16 +++++++ .../pages/CapacityOfferDetailView.vue | 33 ++++++++++--- .../pages/CapacityOffersBehavior.test.ts | 47 +++++++++++++++++-- .../pages/CapacityOffersView.vue | 23 +++++++-- .../pages/TripDetailView.vue | 3 +- .../pages/DispatchDetailView.test.ts | 13 ++++- .../pages/DispatchDetailView.vue | 5 +- .../InboundOrdersView.appointment.test.ts | 27 ++++++++--- .../pages/InboundOrdersView.vue | 18 ++++--- .../pages/prototypeContract.test.ts | 3 +- 21 files changed, 232 insertions(+), 41 deletions(-) create mode 100644 src/modules/overseas-master-data/inquiryNavigation.test.ts create mode 100644 src/modules/overseas-master-data/inquiryNavigation.ts diff --git a/src/modules/appointment-calendar/AppointmentCalendarPanel.test.ts b/src/modules/appointment-calendar/AppointmentCalendarPanel.test.ts index 6d522a2a..b252e473 100644 --- a/src/modules/appointment-calendar/AppointmentCalendarPanel.test.ts +++ b/src/modules/appointment-calendar/AppointmentCalendarPanel.test.ts @@ -10,6 +10,17 @@ describe('appointment calendar interactions', () => { global: { stubs: { ElButton: { template: '' } }, directives: { loading: {} } }, }) + it('opens a readable appointment without exposing write actions', async () => { + const wrapper = render() + const event = {key:'a',type:'delivery' as const,date:'2026-09-24',time:'09:00',title:'预约',fields:[],canView:true,canEdit:false,canDelete:false} + await wrapper.setProps({events:[event]}) + const actions=wrapper.get('.detail-event footer') + expect(actions.text()).toBe('查看预约') + await actions.get('button').trigger('click') + expect(wrapper.emitted('view')?.[0]).toEqual([event]) + expect(wrapper.emitted('edit')).toBeUndefined() + wrapper.unmount() + }) it('hides optional references by default and counts only appointments after enabling them', async () => { const wrapper = render() await wrapper.setProps({ events: [ diff --git a/src/modules/appointment-calendar/AppointmentCalendarPanel.vue b/src/modules/appointment-calendar/AppointmentCalendarPanel.vue index 6e88fc04..cd4d492f 100644 --- a/src/modules/appointment-calendar/AppointmentCalendarPanel.vue +++ b/src/modules/appointment-calendar/AppointmentCalendarPanel.vue @@ -15,6 +15,7 @@ export interface CalendarEvent { fields: Array<{ label: string; value?: string | null }> inboundCodes?: Array canEdit?: boolean + canView?: boolean canDelete?: boolean sourcePath?: string } @@ -32,6 +33,7 @@ const emit = defineEmits<{ range: [range: { from: string; to: string }] create: [date: string] edit: [event: CalendarEvent] + view: [event: CalendarEvent] delete: [event: CalendarEvent] open: [event: CalendarEvent] }>() @@ -124,7 +126,8 @@ defineExpose({ selectedDate, mode })

{{ event.title }}

{{ event.subtitle }}

{{ field.label }}
{{ field.value || '—' }}
-