完善delivery运行bug
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
import { computed, ref } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import ServicePageScaffold from '@/components/homeService/ServicePageScaffold.uvue'
|
||||
import type { DeliveryDashboardType, DeliveryInfoType } from '@/types/delivery.uts'
|
||||
import type { DeliveryInfoType } from '@/types/delivery.uts'
|
||||
import { acceptServiceOrder, getDeliveryDashboardStats, getDeliveryProfile, markDeparted } from '@/services/deliveryService.uts'
|
||||
import { getNextStepText, getPrimaryActionText } from '@/utils/deliveryCareUi.uts'
|
||||
import { requireDeliveryAuth } from '@/utils/deliveryAuth.uts'
|
||||
@@ -105,7 +105,7 @@ const dashboard = ref({
|
||||
onlineStatus: 'online',
|
||||
nextOrder: null,
|
||||
recentOrders: [] as Array<any>
|
||||
} as DeliveryDashboardType)
|
||||
})
|
||||
const profile = ref<DeliveryInfoType | null>(null)
|
||||
|
||||
const profileName = computed((): string => profile.value != null ? profile.value.name : '服务人员')
|
||||
@@ -428,577 +428,3 @@ onShow(() => {
|
||||
padding: 24rpx 0;
|
||||
}
|
||||
</style>
|
||||
console.log('[deliveryHome] loadData complete, elapsed=' + (Date.now() - startedAt))
|
||||
}
|
||||
|
||||
function goOrders(tab: string) {
|
||||
uni.setStorageSync('delivery_orders_tab', tab)
|
||||
uni.switchTab({ url: '/pages/mall/delivery/orders/index' })
|
||||
}
|
||||
|
||||
function goDetail(id: string) {
|
||||
uni.navigateTo({ url: '/pages/mall/delivery/orders/detail?id=' + id })
|
||||
}
|
||||
|
||||
function goMessages() {
|
||||
uni.switchTab({ url: '/pages/mall/delivery/messages/index' })
|
||||
}
|
||||
|
||||
function goRecords() {
|
||||
uni.navigateTo({ url: '/pages/mall/delivery/records/index' })
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
loadData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.delivery-home-page {
|
||||
min-height: 100%;
|
||||
margin-left: -24rpx;
|
||||
margin-right: -24rpx;
|
||||
margin-top: -24rpx;
|
||||
padding-bottom: 32rpx;
|
||||
background-color: #f4f8fb;
|
||||
}
|
||||
|
||||
.delivery-home-hero {
|
||||
padding: 72rpx 28rpx 34rpx;
|
||||
border-bottom-left-radius: 36rpx;
|
||||
border-bottom-right-radius: 36rpx;
|
||||
background-color: #0f766e;
|
||||
}
|
||||
|
||||
.delivery-home-hero-top,
|
||||
.card-top,
|
||||
.current-task-top,
|
||||
.current-task-footer,
|
||||
.delivery-home-alert-card,
|
||||
.shortcut-grid,
|
||||
.order-footer {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.delivery-home-hero-top {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.delivery-home-hero-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
|
||||
.delivery-home-hero-title {
|
||||
font-size: 38rpx;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.delivery-home-hero-subtitle {
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.delivery-home-user-tags {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-top: 12rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.delivery-home-user-tag {
|
||||
padding: 6rpx 14rpx;
|
||||
border-radius: 999rpx;
|
||||
font-size: 22rpx;
|
||||
margin-right: 10rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.delivery-home-user-tag-light {
|
||||
color: #ffffff;
|
||||
background-color: rgba(255, 255, 255, 0.22);
|
||||
}
|
||||
|
||||
.delivery-home-user-tag-soft {
|
||||
margin-right: 10rpx;
|
||||
margin-bottom: 8rpx;
|
||||
color: #0f766e;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.delivery-home-hero-actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.delivery-home-hero-action {
|
||||
margin-left: 16rpx;
|
||||
padding: 10rpx 18rpx;
|
||||
border-radius: 999rpx;
|
||||
background-color: rgba(255, 255, 255, 0.18);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.delivery-home-hero-action-text {
|
||||
font-size: 24rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.delivery-home-hero-info-row {
|
||||
margin-top: 32rpx;
|
||||
padding: 22rpx 18rpx;
|
||||
border-radius: 26rpx;
|
||||
background-color: rgba(255, 255, 255, 0.18);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.delivery-home-hero-info-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.delivery-home-hero-info-value {
|
||||
max-width: 180rpx;
|
||||
text-align: center;
|
||||
line-height: 34rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.delivery-home-hero-info-label {
|
||||
margin-top: 8rpx;
|
||||
font-size: 22rpx;
|
||||
color: rgba(255, 255, 255, 0.78);
|
||||
}
|
||||
|
||||
.delivery-home-card,
|
||||
.delivery-home-alert-card {
|
||||
margin-left: 24rpx;
|
||||
margin-right: 24rpx;
|
||||
margin-top: 22rpx;
|
||||
padding: 26rpx;
|
||||
border-radius: 28rpx;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 10rpx 28rpx rgba(15, 35, 55, 0.06);
|
||||
}
|
||||
|
||||
.delivery-home-overview-card {
|
||||
margin-top: -18rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.delivery-home-card-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.delivery-home-card-title,
|
||||
.delivery-status-title,
|
||||
.delivery-alert-title,
|
||||
.current-task-title,
|
||||
.order-title,
|
||||
.shortcut-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: #16324f;
|
||||
}
|
||||
|
||||
.delivery-home-card-subtitle,
|
||||
.delivery-overview-label,
|
||||
.delivery-status-desc,
|
||||
.current-task-field-label,
|
||||
.current-task-step-label,
|
||||
.order-meta,
|
||||
.empty-text,
|
||||
.shortcut-desc,
|
||||
.delivery-alert-desc {
|
||||
display: block;
|
||||
font-size: 22rpx;
|
||||
line-height: 34rpx;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.delivery-status-pill {
|
||||
font-size: 22rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: 999rpx;
|
||||
}
|
||||
|
||||
.delivery-status-online {
|
||||
color: #0ea5a4;
|
||||
background: #e6fffb;
|
||||
}
|
||||
|
||||
.delivery-status-busy {
|
||||
color: #f97316;
|
||||
background: #fff4eb;
|
||||
}
|
||||
|
||||
.delivery-status-resting {
|
||||
color: #64748b;
|
||||
background: #eef2f7;
|
||||
}
|
||||
|
||||
.delivery-overview-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding-top: 24rpx;
|
||||
padding-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.delivery-overview-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.delivery-overview-num,
|
||||
.delivery-exception-num {
|
||||
font-size: 42rpx;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.delivery-overview-num {
|
||||
color: #1f2937;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.delivery-overview-num-warning {
|
||||
color: #f97316;
|
||||
}
|
||||
|
||||
.delivery-overview-num-active {
|
||||
color: #1677ff;
|
||||
}
|
||||
|
||||
.delivery-overview-num-teal {
|
||||
color: #0ea5a4;
|
||||
}
|
||||
|
||||
.delivery-overview-num-success {
|
||||
color: #16a34a;
|
||||
}
|
||||
|
||||
.delivery-home-inline-alert {
|
||||
margin-top: 18rpx;
|
||||
padding: 20rpx 22rpx;
|
||||
border-radius: 20rpx;
|
||||
background-color: #f8fbff;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.delivery-status-left {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-right: 16rpx;
|
||||
}
|
||||
|
||||
.delivery-status-title {
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.delivery-status-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.delivery-exception-num {
|
||||
color: #ef4444;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.delivery-inline-link {
|
||||
font-size: 22rpx;
|
||||
color: #0f766e;
|
||||
}
|
||||
|
||||
.delivery-home-alert-card {
|
||||
align-items: center;
|
||||
background: linear-gradient(135deg, #fff4eb, #fff8f3);
|
||||
border-width: 1rpx;
|
||||
border-style: solid;
|
||||
border-color: #fed7aa;
|
||||
}
|
||||
|
||||
.delivery-alert-main {
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.delivery-alert-title {
|
||||
margin-bottom: 8rpx;
|
||||
color: #9a3412;
|
||||
}
|
||||
|
||||
.delivery-alert-desc {
|
||||
color: #9a3412;
|
||||
}
|
||||
|
||||
.delivery-alert-action {
|
||||
padding: 14rpx 22rpx;
|
||||
border-radius: 999rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.delivery-alert-action-text {
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
color: #ef4444;
|
||||
}
|
||||
|
||||
.current-task-card,
|
||||
.order-card {
|
||||
margin-top: 22rpx;
|
||||
background: #f8fbfc;
|
||||
border-radius: 24rpx;
|
||||
padding: 24rpx;
|
||||
border-width: 1rpx;
|
||||
border-style: solid;
|
||||
border-color: #e5edf5;
|
||||
border-top-width: 8rpx;
|
||||
}
|
||||
|
||||
.current-task-card {
|
||||
background: linear-gradient(180deg, #f9fcff, #f5fbfb);
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.status-surface-warning {
|
||||
border-top-color: #b45309;
|
||||
background: linear-gradient(180deg, #fffaf5, #f8fbfc);
|
||||
}
|
||||
|
||||
.status-surface-primary {
|
||||
border-top-color: #2563eb;
|
||||
background: linear-gradient(180deg, #f5f9ff, #f8fbfc);
|
||||
}
|
||||
|
||||
.status-surface-teal {
|
||||
border-top-color: #0f766e;
|
||||
background: linear-gradient(180deg, #f3fbfa, #f8fbfc);
|
||||
}
|
||||
|
||||
.status-surface-success {
|
||||
border-top-color: #15803d;
|
||||
background: linear-gradient(180deg, #f4fbf6, #f8fbfc);
|
||||
}
|
||||
|
||||
.status-surface-danger {
|
||||
border-top-color: #dc2626;
|
||||
background: linear-gradient(180deg, #fff6f6, #f8fbfc);
|
||||
}
|
||||
|
||||
.status-surface-default {
|
||||
border-top-color: #94a3b8;
|
||||
}
|
||||
|
||||
.current-task-top,
|
||||
.card-top {
|
||||
align-items: flex-start;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.current-task-main,
|
||||
.order-main {
|
||||
flex: 1;
|
||||
padding-right: 16rpx;
|
||||
}
|
||||
|
||||
.current-task-subtitle {
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #6b7280;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.current-task-info-card,
|
||||
.order-info-box {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.current-task-field {
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom-width: 1rpx;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #eef2f7;
|
||||
}
|
||||
|
||||
.current-task-field-last {
|
||||
padding-bottom: 0;
|
||||
margin-top: 16rpx;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
.current-task-field-value,
|
||||
.current-task-step-text,
|
||||
.order-next-text {
|
||||
font-size: 26rpx;
|
||||
line-height: 38rpx;
|
||||
color: #16324f;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.current-task-footer,
|
||||
.order-footer {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.current-task-step {
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.current-task-btn,
|
||||
.order-action-btn {
|
||||
padding-top: 14rpx;
|
||||
padding-bottom: 14rpx;
|
||||
padding-left: 22rpx;
|
||||
padding-right: 22rpx;
|
||||
border-radius: 18rpx;
|
||||
min-width: 148rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.current-task-btn-text,
|
||||
.order-action-btn-text {
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.action-warning {
|
||||
background: #b45309;
|
||||
}
|
||||
|
||||
.action-primary {
|
||||
background: #2563eb;
|
||||
}
|
||||
|
||||
.action-teal {
|
||||
background: #0f766e;
|
||||
}
|
||||
|
||||
.action-success {
|
||||
background: #15803d;
|
||||
}
|
||||
|
||||
.action-danger {
|
||||
background: #dc2626;
|
||||
}
|
||||
|
||||
.action-default {
|
||||
background: #64748b;
|
||||
}
|
||||
|
||||
.shortcut-grid {
|
||||
margin-top: 22rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.shortcut-item {
|
||||
width: 48%;
|
||||
padding: 24rpx 22rpx;
|
||||
margin-bottom: 18rpx;
|
||||
background: #f8fbfc;
|
||||
border-radius: 22rpx;
|
||||
border-width: 1rpx;
|
||||
border-style: solid;
|
||||
border-color: #e5edf5;
|
||||
}
|
||||
|
||||
.shortcut-icon {
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
border-radius: 18rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.shortcut-icon-warning {
|
||||
background: #fff4eb;
|
||||
}
|
||||
|
||||
.shortcut-icon-primary {
|
||||
background: #eef4ff;
|
||||
}
|
||||
|
||||
.shortcut-icon-teal {
|
||||
background: #e8fbfb;
|
||||
}
|
||||
|
||||
.shortcut-icon-success {
|
||||
background: #edf9f0;
|
||||
}
|
||||
|
||||
.shortcut-icon-text {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #16324f;
|
||||
}
|
||||
|
||||
.shortcut-title {
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.shortcut-desc {
|
||||
line-height: 34rpx;
|
||||
}
|
||||
|
||||
.order-card {
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.empty-box {
|
||||
padding: 24rpx;
|
||||
border-radius: 22rpx;
|
||||
background: #f8fbfc;
|
||||
margin-top: 20rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.order-next-text {
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.delivery-home-safe {
|
||||
height: 40rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user