feat: 订单详情交互调整

This commit is contained in:
duanshuwen
2025-10-30 21:21:05 +08:00
parent 2b9afb936e
commit 90723fa277
10 changed files with 230 additions and 308 deletions

View File

@@ -70,14 +70,8 @@ const displayItems = computed(() => {
const { orderData } = props;
const { orderType } = orderData;
// 工单情况orderType 为 undefined
if (orderType === undefined) {
return [
{ label: LABELS.CREATE_TIME, value: orderData.createTime },
{ label: LABELS.CONTACT_GUEST, value: orderData.userName },
{ label: LABELS.CONTACT_PHONE, value: orderData.userPhone },
];
}
// 去掉末尾连续、、
const formattedPhone = orderData.contactPhone.replace(/、+$/, "");
// 订单情况:根据 orderType 返回不同的显示项
switch (orderType) {
@@ -97,7 +91,7 @@ const displayItems = computed(() => {
),
},
{ label: LABELS.VISITOR_NAME, value: orderData.visitorName },
{ label: LABELS.CONTACT_PHONE, value: orderData.contactPhone },
{ label: LABELS.CONTACT_PHONE, value: formattedPhone },
];
case ORDER_TYPES.TICKET:

View File

@@ -1,7 +1,7 @@
<template>
<view
class="order-card bg-white border-box p-12 rounded-12 m-12"
@click="handleCardClick"
@click.stop="handleCardClick"
>
<!-- 卡片头部 -->
<view class="card-header flex items-center">
@@ -24,6 +24,15 @@
<!-- 卡片内容 -->
<OrderCardContent :order-data="orderData" />
<view v-if="orderData.orderStatus === '0'" class="text-right">
<button
class="go-pay border-box border-none font-size-14 color-white bg-FF3D60 rounded-5 inline-block text-center line-height-30"
@click.stop="handleCardClick"
>
去支付
</button>
</view>
</view>
</template>