|
|
@@ -67,7 +67,7 @@ const expressTypeText: Record<string, string> = {
|
|
|
};
|
|
|
// 包裹数据
|
|
|
const mockPackageItems = computed(() => {
|
|
|
- return (props.data as any).sameExpress
|
|
|
+ return (props.data as any).sameExpress ?? []
|
|
|
});
|
|
|
// 商品状态映射 - 收货状态(实体商品使用)
|
|
|
const receiptStatusText: Record<string, string> = {
|
|
|
@@ -236,30 +236,45 @@ onMounted(() => {
|
|
|
<!-- 分账信息 -->
|
|
|
<div class="info-section">
|
|
|
<h3 class="info-title">分账信息</h3>
|
|
|
- <vxe-table :data="mockSplitAccountList" border>
|
|
|
+ <vxe-table
|
|
|
+ class="split-account-table"
|
|
|
+ :data="mockSplitAccountList"
|
|
|
+ border
|
|
|
+ >
|
|
|
<vxe-column field="profitSharingTime" title="分账时间" align="center" />
|
|
|
<vxe-column field="conditioningProgramSupplierName" title="供应商" align="center" />
|
|
|
+ <vxe-column field="profitSharingStatus" title="分账状态" align="center" >
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.profitSharingStatus === '1' ? '未分账' : row.profitSharingStatus === '2' ? '已分账' : row.profitSharingStatus === '3' ? '分账异常' : '' }}
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
<vxe-column field="profitSharing" title="分账比例" align="center">
|
|
|
<template #default="{ row }">
|
|
|
{{ row.profitSharing || '-' }}%
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column field="realAmount" title="分账金额" align="center">
|
|
|
+ <vxe-column field="profitSharingAmount" title="预计分账金额" align="center" >
|
|
|
<template #default="{ row }">
|
|
|
- {{ row.realAmount ?? 0 }}元
|
|
|
+ {{ row.profitSharingAmount ? row.profitSharingAmount + '元' : '' }}
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="realAmount" title="到账金额" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.realAmount ? row.realAmount + '元' : '' }}
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
|
</div>
|
|
|
<!-- 物流信息和包裹内商品 实体商品才显示 sellType==='1'-->
|
|
|
- <div class="info-section" v-if="data.sellType === '1' && data.receiptType !== null">
|
|
|
+ <div class="info-section" v-if="data.sellType === '1'">
|
|
|
<!-- receiptType 收货方式 0-快递 1-线下取货 -->
|
|
|
<!-- <h3 class="info-title">{{ data.receiptType === '0' ? '物流信息' : data.receiptType === '1' ? '线下取货' : '' }}</h3> -->
|
|
|
<h3 class="info-title">物流信息</h3>
|
|
|
- <div v-if="data.receiptType !== null">
|
|
|
- <div class="info-content-wrapper" v-if="data.receiptStatus !== null">
|
|
|
- <!-- 物流信息 -->
|
|
|
- <div class="logistics-content" v-if="data.receiptType === '0'">
|
|
|
+
|
|
|
+ <div class="info-content-wrapper" v-if="data.receiptType">
|
|
|
+ <!-- 物流信息 -->
|
|
|
+ <div class="logistics-content" v-if="data.receiptType === '0'">
|
|
|
+ <template v-if="mockPackageItems.length > 0">
|
|
|
<div class="logistics-tracking">
|
|
|
<span class="tracking-number">{{ mockLogisticsData.trackingNumber }}</span>
|
|
|
<a @click="handleCopyTracking" class="copy-link">复制</a>
|
|
|
@@ -272,41 +287,44 @@ onMounted(() => {
|
|
|
mockLogisticsData.recipientAddress || '' }}
|
|
|
</span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="logistics-content" v-if="data.receiptType === '1'">
|
|
|
- 线下取货
|
|
|
- </div>
|
|
|
- <!-- 包裹内商品 -->
|
|
|
- <div class="package-items-wrapper" v-if="mockPackageItems.length > 0">
|
|
|
- <h3 class="info-title package-title" v-if="data.receiptType === '0'">
|
|
|
- <span class="star-icon">★</span>
|
|
|
- 包裹内商品
|
|
|
- </h3>
|
|
|
- <div class="package-items">
|
|
|
-
|
|
|
- <div v-for="(item, index) in mockPackageItems" :key="index" class="package-item">
|
|
|
- <div class="package-item-image" v-if="item.conditioningProgramPhoto">
|
|
|
- <a-image v-if="item.conditioningProgramPhoto" :width="60" :height="60" style="border-radius: 4px;"
|
|
|
- :src="item.conditioningProgramPhoto" class="item-img" />
|
|
|
- </div>
|
|
|
- <div class="package-item-placeholder" v-else>
|
|
|
- <text class="placeholder-icon">📦</text>
|
|
|
- </div>
|
|
|
- <div class="package-item-details">
|
|
|
- <div class="package-item-name">{{ item.conditioningProgramName }}</div>
|
|
|
- <div class="package-item-spec">{{ item.convertDose }} {{ item.convertUnit }}</div>
|
|
|
- </div>
|
|
|
- <div class="package-item-details">
|
|
|
- <div class="package-item-price">¥{{ item.unitPrice }}</div>
|
|
|
- <div class="package-item-quantity">x{{ item.totalMeasure }}</div>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ 暂无
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <div class="logistics-content" v-if="data.receiptType === '1'">
|
|
|
+ 线下取货
|
|
|
+ </div>
|
|
|
+ <!-- 包裹内商品 -->
|
|
|
+ <div class="package-items-wrapper" v-if="mockPackageItems.length > 0">
|
|
|
+ <h3 class="info-title package-title" v-if="data.receiptType === '0'">
|
|
|
+ <span class="star-icon">★</span>
|
|
|
+ 包裹内商品
|
|
|
+ </h3>
|
|
|
+ <div class="package-items">
|
|
|
+
|
|
|
+ <div v-for="(item, index) in mockPackageItems" :key="index" class="package-item">
|
|
|
+ <div class="package-item-image" v-if="item.conditioningProgramPhoto">
|
|
|
+ <a-image v-if="item.conditioningProgramPhoto" :width="60" :height="60" style="border-radius: 4px;"
|
|
|
+ :src="item.conditioningProgramPhoto" class="item-img" />
|
|
|
+ </div>
|
|
|
+ <div class="package-item-placeholder" v-else>
|
|
|
+ <text class="placeholder-icon">📦</text>
|
|
|
+ </div>
|
|
|
+ <div class="package-item-details">
|
|
|
+ <div class="package-item-name">{{ item.conditioningProgramName }}</div>
|
|
|
+ <div class="package-item-spec">{{ item.convertDose }} {{ item.convertUnit }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="package-item-details">
|
|
|
+ <div class="package-item-price">¥{{ item.unitPrice }}</div>
|
|
|
+ <div class="package-item-quantity">x{{ item.totalMeasure }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="info-content-wrapper" v-else>
|
|
|
- 暂无信息
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <div class="info-content-wrapper" v-else>
|
|
|
+ 暂无
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -606,6 +624,21 @@ onMounted(() => {
|
|
|
padding: 10px 20px;
|
|
|
}
|
|
|
|
|
|
+ /* 分账表格仅按内容自适应高度,避免一行数据时出现多余空白 */
|
|
|
+ .split-account-table {
|
|
|
+ :deep(.vxe-table--wrapper),
|
|
|
+ :deep(.vxe-table) {
|
|
|
+ height: auto !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.vxe-table--body-wrapper) {
|
|
|
+ height: auto !important;
|
|
|
+ min-height: 0 !important;
|
|
|
+ max-height: none !important;
|
|
|
+ flex: unset !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.empty-text {
|
|
|
color: #999;
|
|
|
font-size: 14px;
|