diff --git a/apps/web-antd/src/views/order/hall/components/BoardColumn.vue b/apps/web-antd/src/views/order/hall/components/BoardColumn.vue index c59b8a0..c9440f1 100644 --- a/apps/web-antd/src/views/order/hall/components/BoardColumn.vue +++ b/apps/web-antd/src/views/order/hall/components/BoardColumn.vue @@ -4,6 +4,8 @@ import type { BoardColumnKey } from '../types'; import type { OrderBoardCard } from '#/api/order-hall'; +import { computed } from 'vue'; + import BoardOrderCard from './BoardOrderCard.vue'; const { @@ -13,11 +15,11 @@ const { columnKey, title = '', } = defineProps<{ - cards: OrderBoardCard[]; - colorClass: string; + cards?: OrderBoardCard[]; + colorClass?: string; columnKey: BoardColumnKey; - isLoading: boolean; - title: string; + isLoading?: boolean; + title?: string; }>(); const emit = defineEmits<{ @@ -26,20 +28,49 @@ const emit = defineEmits<{ confirmDelivery: [orderId: string]; reject: [orderId: string]; }>(); + +const deliveryChannelCount = computed( + () => cards.filter((item) => item.deliveryType === 2).length, +); + +const shouldShowCount = computed(() => columnKey !== 'completed'); + +const countText = computed(() => { + if (columnKey === 'delivering') { + return `(${deliveryChannelCount.value}/${cards.length})`; + } + + return String(cards.length); +});