|
@@ -8,7 +8,7 @@ import VxeUI from 'vxe-table';
|
|
|
import ReviewMediaPreview from '@/service/ReviewMediaPreview.vue';
|
|
import ReviewMediaPreview from '@/service/ReviewMediaPreview.vue';
|
|
|
import type { MediaItem } from '@/service/ReviewMediaPreview.vue';
|
|
import type { MediaItem } from '@/service/ReviewMediaPreview.vue';
|
|
|
import seeEvaluate from '@/service/seeEvaluate.vue';
|
|
import seeEvaluate from '@/service/seeEvaluate.vue';
|
|
|
-import { getEvaluateDetailMethod, getApplyRecordMethod } from '@/request/api/order.api';
|
|
|
|
|
|
|
+import { getEvaluateDetailMethod, getApplyRecordMethod, getLogisticsMethod } from '@/request/api/order.api';
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
|
data: SystemCwModel['items'][number];
|
|
data: SystemCwModel['items'][number];
|
|
@@ -49,74 +49,24 @@ const mockSplitAccountList = computed(() => {
|
|
|
const mockLogisticsData = computed(() => {
|
|
const mockLogisticsData = computed(() => {
|
|
|
console.log('props.data===', props.data);
|
|
console.log('props.data===', props.data);
|
|
|
return {
|
|
return {
|
|
|
- trackingNumber: `${expressTypeText[props.data.expressType || '']} ${props.data.expressNo || ''}`,
|
|
|
|
|
|
|
+ expressName:`${expressTypeText[props.data.expressType || '']}`,
|
|
|
|
|
+ trackingNumber: `${props.data.expressNo || ''}`,
|
|
|
recipientName: props.data.liaison ? props.data.liaison + ', ' : '',
|
|
recipientName: props.data.liaison ? props.data.liaison + ', ' : '',
|
|
|
recipientPhone: props.data.phone ? props.data.phone + ', ' : '',
|
|
recipientPhone: props.data.phone ? props.data.phone + ', ' : '',
|
|
|
recipientAddress: (props.data.provinceName !== null ? props.data.provinceName + ' ' : '') + (props.data.cityName !== null ? props.data.cityName + ' ' : '') + (props.data.areaName !== null ? props.data.areaName + ' ' : '') + (props.data.detailAddress !== null ? props.data.detailAddress : '')
|
|
recipientAddress: (props.data.provinceName !== null ? props.data.provinceName + ' ' : '') + (props.data.cityName !== null ? props.data.cityName + ' ' : '') + (props.data.areaName !== null ? props.data.areaName + ' ' : '') + (props.data.detailAddress !== null ? props.data.detailAddress : '')
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
type LogisticsTimelineItem = {
|
|
type LogisticsTimelineItem = {
|
|
|
- title: string;
|
|
|
|
|
|
|
+ status: string;
|
|
|
time: string;
|
|
time: string;
|
|
|
- detail: string;
|
|
|
|
|
|
|
+ context: string;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const showAllLogistics = ref(false);
|
|
const showAllLogistics = ref(false);
|
|
|
-const mockLogisticsTimeline: LogisticsTimelineItem[] = [
|
|
|
|
|
- {
|
|
|
|
|
- title: '已签收',
|
|
|
|
|
- time: '01-09 19:15',
|
|
|
|
|
- detail: '您已在杭州金成花园15幢4号后完成取件,感谢使用菜鸟驿站,期待再次为您服务。',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '待取件',
|
|
|
|
|
- time: '01-09 16:11',
|
|
|
|
|
- detail: '您的快件已暂存在杭州金成花园15幢4号店菜鸟驿站,请凭取货码及时领取。如有疑问请联系15067159925',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '运输中',
|
|
|
|
|
- time: '01-09 13:26',
|
|
|
|
|
- detail: '快件离开杭州分拨中心,正在发往目的地站点。',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '包裹已揽收',
|
|
|
|
|
- time: '01-09 09:42',
|
|
|
|
|
- detail: '快递员已揽收您的包裹,正在安排发出。',
|
|
|
|
|
- },
|
|
|
|
|
-];
|
|
|
|
|
-
|
|
|
|
|
-function normalizeLogisticsItem(item: any): LogisticsTimelineItem | null {
|
|
|
|
|
- if (!item || typeof item !== 'object') return null;
|
|
|
|
|
- const time = String(item.time ?? item.acceptTime ?? item.ftime ?? item.createTime ?? item.updateTime ?? '').trim();
|
|
|
|
|
- const title = String(item.title ?? item.status ?? item.statusName ?? item.statusDesc ?? '').trim();
|
|
|
|
|
- const detail = String(item.content ?? item.context ?? item.remark ?? item.description ?? item.message ?? '').trim();
|
|
|
|
|
- const fallbackTitle = detail || title;
|
|
|
|
|
- if (!time && !fallbackTitle && !detail) return null;
|
|
|
|
|
- return {
|
|
|
|
|
- title: fallbackTitle || '-',
|
|
|
|
|
- time,
|
|
|
|
|
- detail: detail && detail !== fallbackTitle ? detail : '',
|
|
|
|
|
- };
|
|
|
|
|
-}
|
|
|
|
|
|
|
+let mockLogisticsTimeline = ref<string[]>([]);
|
|
|
|
|
|
|
|
const logisticsTimeline = computed<LogisticsTimelineItem[]>(() => {
|
|
const logisticsTimeline = computed<LogisticsTimelineItem[]>(() => {
|
|
|
- const source = props.data as any;
|
|
|
|
|
- const listCandidate =
|
|
|
|
|
- source?.expressDetails ??
|
|
|
|
|
- source?.logisticsDetails ??
|
|
|
|
|
- source?.logisticsList ??
|
|
|
|
|
- source?.expressRouteList ??
|
|
|
|
|
- source?.expressRoutes ??
|
|
|
|
|
- source?.traces ??
|
|
|
|
|
- source?.traceList ??
|
|
|
|
|
- source?.routeList ??
|
|
|
|
|
- source?.tracks ??
|
|
|
|
|
- [];
|
|
|
|
|
- if (!Array.isArray(listCandidate)) return mockLogisticsTimeline;
|
|
|
|
|
- const normalizedList = listCandidate
|
|
|
|
|
- .map((item: any) => normalizeLogisticsItem(item))
|
|
|
|
|
- .filter((item): item is LogisticsTimelineItem => Boolean(item));
|
|
|
|
|
- return normalizedList.length > 0 ? normalizedList : mockLogisticsTimeline;
|
|
|
|
|
|
|
+ return mockLogisticsTimeline.value
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const visibleLogisticsTimeline = computed(() => {
|
|
const visibleLogisticsTimeline = computed(() => {
|
|
@@ -226,9 +176,15 @@ async function getApplyRecord() {
|
|
|
if (!id) return;
|
|
if (!id) return;
|
|
|
const res = await getApplyRecordMethod(id);
|
|
const res = await getApplyRecordMethod(id);
|
|
|
if (!res) return;
|
|
if (!res) return;
|
|
|
- console.log(res, "获取预约");
|
|
|
|
|
applyRecordList.value = res ?? [];
|
|
applyRecordList.value = res ?? [];
|
|
|
- console.log(applyRecordList.value, "applyRecordList");
|
|
|
|
|
|
|
+}
|
|
|
|
|
+// 获取物流信息
|
|
|
|
|
+async function getLogistics() {
|
|
|
|
|
+ const id = (props.data as any)?.id;
|
|
|
|
|
+ if (!id) return;
|
|
|
|
|
+ const res = await getLogisticsMethod(id);
|
|
|
|
|
+ if (!res) return;
|
|
|
|
|
+ mockLogisticsTimeline.value = res?.tracks
|
|
|
}
|
|
}
|
|
|
const REVIEW_PREVIEW_MODAL_ID = 'review-media-preview-modal';
|
|
const REVIEW_PREVIEW_MODAL_ID = 'review-media-preview-modal';
|
|
|
//预览图片/视频
|
|
//预览图片/视频
|
|
@@ -254,6 +210,7 @@ function openPreview(list: MediaItem[], index: number) {
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
await getEvaluateDetail();
|
|
await getEvaluateDetail();
|
|
|
await getApplyRecord();
|
|
await getApplyRecord();
|
|
|
|
|
+ await getLogistics()
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
@@ -358,27 +315,30 @@ onMounted(async () => {
|
|
|
<div class="logistics-content" v-if="data.receiptType === '0'">
|
|
<div class="logistics-content" v-if="data.receiptType === '0'">
|
|
|
<template v-if="mockPackageItems.length > 0">
|
|
<template v-if="mockPackageItems.length > 0">
|
|
|
<div class="flex align-items-center justify-between">
|
|
<div class="flex align-items-center justify-between">
|
|
|
- <div class="logistics-tracking">
|
|
|
|
|
- <span class="tracking-number">{{ mockLogisticsData.trackingNumber }}</span>
|
|
|
|
|
- <a @click="handleCopyTracking" class="copy-link">复制</a>
|
|
|
|
|
|
|
+ <div class="logistics-tracking">
|
|
|
|
|
+ <span class="tracking-number">{{ mockLogisticsData.expressName }}</span>
|
|
|
|
|
+ <span class="tracking-number">{{ mockLogisticsData.trackingNumber }}</span>
|
|
|
|
|
+ <a @click="handleCopyTracking" class="copy-link">复制</a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- <div class="text-gray-500">联系电话:9554</div> -->
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="text-gray-500">联系电话:9554</div>
|
|
|
|
|
- </div>
|
|
|
|
|
<!-- 物流详情 -->
|
|
<!-- 物流详情 -->
|
|
|
<div class="logistics-detail">
|
|
<div class="logistics-detail">
|
|
|
<template v-if="logisticsTimeline.length > 0">
|
|
<template v-if="logisticsTimeline.length > 0">
|
|
|
<div class="logistics-timeline">
|
|
<div class="logistics-timeline">
|
|
|
- <div class="timeline-item" v-for="(item, index) in visibleLogisticsTimeline" :key="`${item.time}-${index}`">
|
|
|
|
|
|
|
+ <div class="timeline-item" v-for="(item, index) in visibleLogisticsTimeline"
|
|
|
|
|
+ :key="`${item.time}-${index}`">
|
|
|
<div class="timeline-dot-wrap">
|
|
<div class="timeline-dot-wrap">
|
|
|
<span class="timeline-dot" :class="{ active: index === 0 }" />
|
|
<span class="timeline-dot" :class="{ active: index === 0 }" />
|
|
|
- <span class="timeline-line" v-if="index !== visibleLogisticsTimeline.length - 1 || canExpandLogistics" />
|
|
|
|
|
|
|
+ <span class="timeline-line"
|
|
|
|
|
+ v-if="index !== visibleLogisticsTimeline.length - 1 || canExpandLogistics" />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="timeline-content">
|
|
<div class="timeline-content">
|
|
|
<div class="timeline-head">
|
|
<div class="timeline-head">
|
|
|
- <span class="timeline-title" :class="{ active: index === 0 }">{{ item.title || '-' }}</span>
|
|
|
|
|
|
|
+ <span class="timeline-title" :class="{ active: index === 0 }">{{ item.status || '-' }}</span>
|
|
|
<span class="timeline-time" :class="{ active: index === 0 }">{{ item.time || '-' }}</span>
|
|
<span class="timeline-time" :class="{ active: index === 0 }">{{ item.time || '-' }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="timeline-detail" v-if="item.detail">{{ item.detail }}</div>
|
|
|
|
|
|
|
+ <div class="timeline-detail" v-if="item.context">{{ item.context }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="timeline-item timeline-expand-item" v-if="canExpandLogistics">
|
|
<div class="timeline-item timeline-expand-item" v-if="canExpandLogistics">
|
|
@@ -475,7 +435,7 @@ onMounted(async () => {
|
|
|
<h3 class="info-title">
|
|
<h3 class="info-title">
|
|
|
服务记录
|
|
服务记录
|
|
|
<span class="title-count">({{ data?.patientConditioningOfflines?.length || 0 }}/{{ data?.totalMeasure || 0
|
|
<span class="title-count">({{ data?.patientConditioningOfflines?.length || 0 }}/{{ data?.totalMeasure || 0
|
|
|
- }})</span>
|
|
|
|
|
|
|
+ }})</span>
|
|
|
</h3>
|
|
</h3>
|
|
|
<vxe-table :data="data?.patientConditioningOfflines" border>
|
|
<vxe-table :data="data?.patientConditioningOfflines" border>
|
|
|
<vxe-column type="seq" title="序号" width="60" align="center" />
|
|
<vxe-column type="seq" title="序号" width="60" align="center" />
|
|
@@ -1046,7 +1006,7 @@ onMounted(async () => {
|
|
|
|
|
|
|
|
.recipient-info {
|
|
.recipient-info {
|
|
|
color: #333;
|
|
color: #333;
|
|
|
- font-weight: 400;
|
|
|
|
|
|
|
+ font-weight: 500;
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
}
|
|
}
|
|
|
|
|
|