|
@@ -25,17 +25,26 @@
|
|
|
>
|
|
>
|
|
|
<!-- 订单头部 -->
|
|
<!-- 订单头部 -->
|
|
|
<view class="order-header">
|
|
<view class="order-header">
|
|
|
- <view class="order-id-section">
|
|
|
|
|
|
|
+ <view class="order-header-row">
|
|
|
<text class="order-id-label">订单号</text>
|
|
<text class="order-id-label">订单号</text>
|
|
|
- <text class="order-id">{{ order.orderId }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="status-tags">
|
|
|
|
|
<text
|
|
<text
|
|
|
class="order-status"
|
|
class="order-status"
|
|
|
:style="getOrderStatusStyle(order.orderStatus)"
|
|
:style="getOrderStatusStyle(order.orderStatus)"
|
|
|
>
|
|
>
|
|
|
{{ getOrderStatusText(order.orderStatus) }}
|
|
{{ getOrderStatusText(order.orderStatus) }}
|
|
|
</text>
|
|
</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="order-header-row">
|
|
|
|
|
+ <view class="order-id-wrapper">
|
|
|
|
|
+ <text class="order-id">{{ order.orderId }}</text>
|
|
|
|
|
+ <AppIcon
|
|
|
|
|
+ name="copy"
|
|
|
|
|
+ :size="28"
|
|
|
|
|
+ color="#C6171E"
|
|
|
|
|
+ class="copy-icon"
|
|
|
|
|
+ @click.stop="copyOrderId(order.orderId)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </view>
|
|
|
<text
|
|
<text
|
|
|
class="pay-status"
|
|
class="pay-status"
|
|
|
:style="getPayStatusStyle(order.payStatus)"
|
|
:style="getPayStatusStyle(order.payStatus)"
|
|
@@ -48,13 +57,23 @@
|
|
|
<!-- 订单核心信息 -->
|
|
<!-- 订单核心信息 -->
|
|
|
<view class="order-core-info">
|
|
<view class="order-core-info">
|
|
|
<view class="info-item">
|
|
<view class="info-item">
|
|
|
- <text class="info-label">设备编号</text>
|
|
|
|
|
- <text class="info-value">{{ order.shortId || '未知设备' }}</text>
|
|
|
|
|
|
|
+ <text class="info-label">消费站点</text>
|
|
|
|
|
+ <text class="info-value">{{ order.stationName || '未知站点' }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="info-item">
|
|
|
|
|
+ <text class="info-label">归属站点</text>
|
|
|
|
|
+ <text class="info-value">{{ order.userStationName || '未知站点' }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="order-core-info">
|
|
|
<view class="info-item">
|
|
<view class="info-item">
|
|
|
<text class="info-label">用户手机号</text>
|
|
<text class="info-label">用户手机号</text>
|
|
|
<text class="info-value">{{ order.mobilePhone || '匿名用户' }}</text>
|
|
<text class="info-value">{{ order.mobilePhone || '匿名用户' }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="info-item">
|
|
|
|
|
+ <text class="info-label">设备编号</text>
|
|
|
|
|
+ <text class="info-value">{{ order.shortId || '未知设备' }}</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 时间信息 -->
|
|
<!-- 时间信息 -->
|
|
@@ -75,15 +94,14 @@
|
|
|
<text class="amount-label">消费总额</text>
|
|
<text class="amount-label">消费总额</text>
|
|
|
<text class="amount-value">¥{{ formatAmount(order.amount) }}</text>
|
|
<text class="amount-value">¥{{ formatAmount(order.amount) }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="amount-item">
|
|
|
|
|
- <text class="amount-label">实收金额</text>
|
|
|
|
|
- <text class="amount-value highlight">¥{{ formatAmount(order.amountReceived) }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <!-- 显示应收金额 -->
|
|
|
|
|
<view class="amount-item" v-if="order.amountReceivable !== undefined">
|
|
<view class="amount-item" v-if="order.amountReceivable !== undefined">
|
|
|
<text class="amount-label">应收金额</text>
|
|
<text class="amount-label">应收金额</text>
|
|
|
<text class="amount-value">¥{{ formatAmount(order.amountReceivable) }}</text>
|
|
<text class="amount-value">¥{{ formatAmount(order.amountReceivable) }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="amount-item">
|
|
|
|
|
+ <text class="amount-label">实收金额</text>
|
|
|
|
|
+ <text class="amount-value highlight">¥{{ formatAmount(order.amountReceived) }}</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 订单底部 -->
|
|
<!-- 订单底部 -->
|
|
@@ -259,6 +277,15 @@ const handleSearch = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+const copyOrderId = (orderId) => {
|
|
|
|
|
+ uni.setClipboardData({
|
|
|
|
|
+ data: String(orderId),
|
|
|
|
|
+ success: () => {
|
|
|
|
|
+ showToast('订单号已复制', 'success')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const viewOrderDetail = (orderId) => {
|
|
const viewOrderDetail = (orderId) => {
|
|
|
if (!orderId) {
|
|
if (!orderId) {
|
|
|
showToast('订单ID不存在')
|
|
showToast('订单ID不存在')
|
|
@@ -426,23 +453,35 @@ const onPullDownRefresh = () => {
|
|
|
/* 订单头部 */
|
|
/* 订单头部 */
|
|
|
.order-header {
|
|
.order-header {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: flex-start;
|
|
|
|
|
|
|
+ flex-direction: column;
|
|
|
margin-bottom: 24rpx;
|
|
margin-bottom: 24rpx;
|
|
|
padding-bottom: 24rpx;
|
|
padding-bottom: 24rpx;
|
|
|
border-bottom: 2rpx solid #F0F0F0;
|
|
border-bottom: 2rpx solid #F0F0F0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.order-id-section {
|
|
|
|
|
|
|
+.order-header-row {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- flex-direction: column;
|
|
|
|
|
- gap: 12rpx;
|
|
|
|
|
- flex: 1;
|
|
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ margin-bottom: 12rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.order-header-row:last-child {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.order-id-label {
|
|
.order-id-label {
|
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
|
color: #999999;
|
|
color: #999999;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.order-id-wrapper {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ margin-right: 16rpx;
|
|
|
|
|
+ min-width: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.order-id {
|
|
.order-id {
|
|
@@ -453,12 +492,8 @@ const onPullDownRefresh = () => {
|
|
|
line-height: 1.4;
|
|
line-height: 1.4;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/* 状态标签容器 */
|
|
|
|
|
-.status-tags {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- align-items: flex-end;
|
|
|
|
|
- gap: 8rpx;
|
|
|
|
|
|
|
+.copy-icon {
|
|
|
|
|
+ margin-left: 12rpx;
|
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -482,6 +517,11 @@ const onPullDownRefresh = () => {
|
|
|
border-bottom: 2rpx solid #F0F0F0;
|
|
border-bottom: 2rpx solid #F0F0F0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.order-core-info--single {
|
|
|
|
|
+ margin-bottom: 16rpx;
|
|
|
|
|
+ padding-bottom: 16rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.order-time-info {
|
|
.order-time-info {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
@@ -539,7 +579,6 @@ const onPullDownRefresh = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.amount-value.highlight {
|
|
.amount-value.highlight {
|
|
|
- font-size: 36rpx;
|
|
|
|
|
color: #C6171E;
|
|
color: #C6171E;
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
|
}
|
|
}
|