<template>
|
<view class="all-orders-page">
|
<view class="tabs-wrap">
|
<u-tabs
|
:list="tabList"
|
:current="currentTab"
|
scrollable
|
lineColor="#004096"
|
lineWidth="42rpx"
|
lineHeight="4rpx"
|
:itemStyle="itemStyle"
|
:activeStyle="activeStyle"
|
:inactiveStyle="inactiveStyle"
|
@change="handleTabChange"
|
></u-tabs>
|
</view>
|
|
<view class="content-wrap">
|
<view class="page-padding card-list">
|
<view v-for="(item, index) in orders" :key="index" class="order-card">
|
<view class="status">
|
<view class="status-type yellow">就地寄存</view>
|
<text class="status-text">待支付</text>
|
</view>
|
|
<view class="goods-area">
|
<view v-for="goods in item.goods" :key="goods.name" class="goods-row">
|
<view class="goods-left">
|
<text class="goods-name">{{ goods.name }}</text>
|
<text class="goods-size">{{ goods.size }}</text>
|
</view>
|
<view class="goods-right">
|
<text class="goods-price">{{ goods.price }}</text>
|
<text class="goods-count">x1</text>
|
</view>
|
</view>
|
</view>
|
|
<view class="amount-area">
|
<view class="pay-row">
|
<text class="pay-label">实付款:</text>
|
<text class="pay-value">100</text>
|
</view>
|
<view class="insurance-row">
|
<text class="insurance-label">含行李保费:</text>
|
<text class="insurance-value">200</text>
|
</view>
|
</view>
|
|
<view class="card-footer">
|
<view class="pickup-wrap"></view>
|
<view class="footer-actions">
|
<view class="footer-btn contact-btn">联系门店</view>
|
<view class="footer-btn primary-btn">立即支付</view>
|
</view>
|
</view>
|
</view>
|
|
<view v-if="isLoadingMore" class="loading-text">加载中...</view>
|
<view v-else-if="!hasMore && visibleOrders.length" class="loading-text">没有更多了</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
currentTab: 5,
|
itemStyle: {
|
height: '90rpx',
|
padding: '0 22rpx'
|
},
|
activeStyle: {
|
color: '#222222',
|
fontSize: '32rpx',
|
fontWeight: '500'
|
},
|
inactiveStyle: {
|
color: '#666666',
|
fontSize: '30rpx',
|
fontWeight: '400'
|
},
|
tabList: [
|
{ name: '全部', value: 'all' },
|
{ name: '待核验', value: 'verify' },
|
{ name: '待配送', value: 'delivery' },
|
{ name: '待收货', value: 'receive' },
|
{ name: '已完成', value: 'done' },
|
{ name: '退款', value: 'refund' }
|
],
|
orders: [
|
{
|
id: 1,
|
mode: 'local',
|
status: '待核验',
|
statusKey: 'verify',
|
fromName: '中铁快运南站旗舰店',
|
userName: '蔡子瑄',
|
goods: [
|
{ name: '大件行李箱', size: '24-28寸', price: '¥35' },
|
{ name: '中件行李箱', size: '24-28寸', price: '¥35' },
|
{ name: '小件行李箱', size: '24-28寸', price: '¥35' }
|
],
|
payAmount: '¥125.00',
|
insurance: '¥20',
|
pickupTime: '2026-04-12 10:10',
|
actionText: '申请退款'
|
},
|
{
|
id: 2,
|
mode: 'city',
|
status: '待核验',
|
statusKey: 'verify',
|
fromName: '中铁快运南站旗舰店',
|
toName: '丽枫酒店34...',
|
userName: '蔡子瑄',
|
goods: [
|
{ name: '大件行李箱', size: '24-28寸', price: '¥35' },
|
{ name: '中件行李箱', size: '24-28寸', price: '¥35' }
|
],
|
payAmount: '¥90.00',
|
insurance: '¥20',
|
pickupTime: '',
|
actionText: '申请退款'
|
}
|
]
|
}
|
},
|
computed: {
|
filteredOrders() {
|
const current = this.tabList[this.currentTab]
|
if (!current || current.value === 'all') {
|
return this.orders
|
}
|
return this.orders.filter(item => item.statusKey === current.value)
|
}
|
},
|
methods: {
|
handleTabChange(item) {
|
this.currentTab = item.index
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.all-orders-page {
|
min-height: 100vh;
|
background: #f5f7fb;
|
}
|
|
.tabs-wrap {
|
background: #ffffff;
|
border-bottom: 1rpx solid #f0f1f4;
|
position: sticky;
|
top: 0;
|
left: 0;
|
z-index: 999;
|
width: 100%;
|
}
|
.content-wrap {
|
position: relative;
|
z-index: 1;
|
padding: 30rpx;
|
box-sizing: border-box;
|
}
|
|
.order-card {
|
margin-bottom: 20rpx;
|
background: #ffffff;
|
border-radius: 14rpx;
|
overflow: hidden;
|
.status {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
padding: 30rpx 30rpx 0 30rpx;
|
box-sizing: border-box;
|
.blue {
|
background: #10B2FA;
|
}
|
.yellow {
|
background-color: #FA8010;
|
}
|
.status-type {
|
width: 112rpx;
|
height: 38rpx;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
border-radius: 8rpx;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #FFFFFF;
|
}
|
.status-text {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #10B2FA;
|
flex-shrink: 0;
|
}
|
}
|
}
|
|
.order-head {
|
padding: 24rpx 30rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
box-sizing: border-box;
|
}
|
|
.local-head-bg {
|
background: #eff9ff;
|
}
|
|
.city-head-bg {
|
background: #fff4e8;
|
}
|
|
.head-local,
|
.head-city {
|
flex: 1;
|
min-width: 0;
|
display: flex;
|
align-items: center;
|
}
|
|
.head-copy {
|
min-width: 0;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
}
|
|
.single-copy,
|
.city-left,
|
.city-right {
|
flex: 1;
|
}
|
|
.align-right {
|
align-items: flex-end;
|
text-align: right;
|
}
|
|
.mode-tag {
|
width: 112rpx;
|
height: 38rpx;
|
border-radius: 8rpx;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #FFFFFF;
|
margin-right: 14rpx;
|
flex-shrink: 0;
|
}
|
|
.local-tag {
|
background: linear-gradient(90deg, #18abf8 0%, #39c5ff 100%);
|
}
|
|
.city-tag {
|
background: linear-gradient(90deg, #ff8b28 0%, #ffb14f 100%);
|
margin-right: 0;
|
margin-bottom: 8rpx;
|
}
|
|
.head-name {
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
font-weight: 600;
|
font-size: 30rpx;
|
color: #222222;
|
margin-top: 20rpx;
|
}
|
|
.head-user {
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
margin-top: 10rpx;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #666666;
|
}
|
|
.text-ellipsis {
|
white-space: nowrap;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
}
|
|
.city-arrow {
|
width: 82rpx;
|
margin: 0 54rpx;
|
position: relative;
|
height: 24rpx;
|
flex-shrink: 0;
|
}
|
|
.arrow-line {
|
position: absolute;
|
left: 8rpx;
|
top: 8rpx;
|
width: 42rpx;
|
height: 0;
|
border-top: 3rpx solid #ff8c1f;
|
}
|
|
.arrow-head {
|
position: absolute;
|
right: 8rpx;
|
top: 3rpx;
|
width: 12rpx;
|
height: 12rpx;
|
border-top: 3rpx solid #ff8c1f;
|
border-right: 3rpx solid #ff8c1f;
|
transform: rotate(45deg);
|
}
|
|
.status-text {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #10B2FA;
|
flex-shrink: 0;
|
}
|
|
.goods-area {
|
padding: 22rpx 30rpx;
|
box-sizing: border-box;
|
}
|
|
.goods-row {
|
display: flex;
|
align-items: flex-start;
|
justify-content: space-between;
|
margin-bottom: 26rpx;
|
&:last-child {
|
margin: 0 !important;
|
}
|
}
|
|
.goods-left {
|
flex: 1;
|
min-width: 0;
|
}
|
|
.goods-name {
|
display: block;
|
font-weight: 600;
|
font-size: 28rpx;
|
color: #333333;
|
}
|
|
.goods-size {
|
display: block;
|
margin-top: 12rpx;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #8C939F;
|
}
|
|
.goods-right {
|
width: 92rpx;
|
display: flex;
|
flex-direction: column;
|
align-items: flex-end;
|
}
|
|
.goods-price {
|
font-weight: 400;
|
font-size: 30rpx;
|
color: #333333;
|
}
|
|
.goods-count {
|
margin-top: 12rpx;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #8C939F;
|
}
|
|
.amount-area {
|
padding: 0 30rpx;
|
box-sizing: border-box;
|
display: flex;
|
flex-direction: column;
|
align-items: flex-end;
|
}
|
|
.pay-row,
|
.insurance-row {
|
display: flex;
|
align-items: baseline;
|
}
|
|
.pay-label,
|
.insurance-label {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #333333;
|
}
|
|
.pay-value {
|
font-weight: 600;
|
font-size: 26rpx;
|
color: #222222;
|
}
|
|
.insurance-row {
|
margin-top: 12rpx;
|
}
|
|
.insurance-value {
|
font-size: 20rpx;
|
color: #999999;
|
}
|
|
.card-footer {
|
padding: 0 30rpx 30rpx 30rpx;
|
box-sizing: border-box;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
margin-top: 30rpx;
|
}
|
|
.pickup-wrap {
|
display: flex;
|
align-items: flex-start;
|
flex-direction: column;
|
}
|
|
.pickup-label {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #333333;
|
}
|
|
.pickup-value {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #10B2FA;
|
}
|
|
.footer-actions {
|
margin-left: auto;
|
display: flex;
|
align-items: center;
|
gap: 10rpx;
|
margin: 0 !important;
|
}
|
|
.footer-btn {
|
height: 64rpx;
|
border-radius: 34rpx;
|
padding: 0 18rpx;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
font-size: 28rpx;
|
box-sizing: border-box;
|
margin-right: 20rpx;
|
&:last-child {
|
margin: 0 !important;
|
}
|
}
|
|
.contact-btn {
|
border: 1rpx solid #B2B2B2;
|
background: #ffffff;
|
color: #666666;
|
}
|
|
.primary-btn {
|
background: #10B2FA;
|
color: #ffffff;
|
}
|
|
.loading-text {
|
padding: 18rpx 0 8rpx;
|
text-align: center;
|
font-size: 22rpx;
|
color: #a5aab3;
|
}
|
</style>
|