修复订单显示bug

This commit is contained in:
2026-06-10 20:20:47 +08:00
parent de62513987
commit 9fbc6f8cd1
45 changed files with 7514 additions and 2025 deletions

View File

@@ -16,7 +16,7 @@
<view class="order-top" @click="goDetail(item.id)">
<view class="order-main">
<text class="order-title">{{ item.serviceName }}</text>
<text class="order-subtitle">{{ item.elderName }} · {{ item.appointmentTime }}</text>
<text class="order-subtitle">{{ item.elderName }} · {{ formatDateTime(item.appointmentTime) }}</text>
</view>
<text class="order-status">{{ item.statusText }}</text>
</view>
@@ -50,6 +50,7 @@ import {
} from '@/services/deliveryService.uts'
import { getDeliveryOrderTabs, getPrimaryActionText } from '@/utils/deliveryCareUi.uts'
import { requireDeliveryAuth } from '@/utils/deliveryAuth.uts'
import { formatDateTime } from '@/utils/utils.uts'
const tabs = getDeliveryOrderTabs()
const currentTab = ref('pending')
@@ -68,13 +69,16 @@ async function loadData() {
}
if (currentTab.value == 'pending') {
orders.value = await getPendingServiceOrders()
console.warn('[orders/index] pending orders:', JSON.stringify(orders.value))
return
}
if (currentTab.value == 'history') {
orders.value = await getHistoryServiceOrders()
console.warn('[orders/index] history orders:', JSON.stringify(orders.value))
return
}
orders.value = await getTodayServiceOrders()
console.warn('[orders/index] today orders:', JSON.stringify(orders.value))
}
function consumeStoredTab(): void {
@@ -342,4 +346,4 @@ onShow(() => {
.empty-box {
padding: 24rpx 0;
}
</style>
</style>