You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
273 lines
8.8 KiB
273 lines
8.8 KiB
3 months ago
|
<template>
|
||
|
<div class="bg">
|
||
|
<!-- 订单状态时间线 -->
|
||
|
<div class="normal-margin-bottom">
|
||
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||
|
<el-breadcrumb-item :to="{ path: '/User/UserCenter' }">个人中心</el-breadcrumb-item>
|
||
|
<el-breadcrumb-item :to="{ path: '/User/OrderList' }">我的订单</el-breadcrumb-item>
|
||
|
<el-breadcrumb-item> 订单详情</el-breadcrumb-item>
|
||
|
</el-breadcrumb>
|
||
|
</div>
|
||
|
|
||
|
<div class="common-card normal-margin-bottom" style="padding: 20px 0;display: flex;">
|
||
|
<div class="order-status">
|
||
|
<div class="order-no">订单号: 209907091214560078 <el-button style="color: #999;" type="text" icon="el-icon-document-copy"></el-button></div>
|
||
|
<div class="status-title">
|
||
|
<i class="el-icon-time" style="color: #ff9800;font-size: 32px;"></i>
|
||
|
<span style="height: 24px;line-height: 24px;padding-left: 5px;">订单状态: 待付款</span>
|
||
|
</div>
|
||
|
|
||
|
<el-button type="primary" size="medium">在线付款</el-button>
|
||
|
<el-button type="text" size="small" style="padding: 0;">打印订单</el-button>
|
||
|
|
||
|
</div>
|
||
|
<div class="order-step">
|
||
|
<el-steps :active="2" align-center style="width: 100%;">
|
||
|
<el-step v-for="(item,i) in activities" :key="i">
|
||
|
<div class="process-title" slot="title">{{ item.status }}</div>
|
||
|
<div slot="icon">
|
||
|
<span v-if="i>=2">{{i+1}}</span>
|
||
|
<i v-else style="color: #fff;" class="el-icon-check"></i>
|
||
|
</div>
|
||
|
<div class="process-description" slot="description">{{ item.timestamp }}</div>
|
||
|
</el-step>
|
||
|
|
||
|
</el-steps>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<!-- 订单信息卡片 -->
|
||
|
<div class="common-card normal-margin-bottom order-info-card" style="display: flex;padding: 20px 0;">
|
||
|
<el-descriptions title="订单信息" :column="1">
|
||
|
<el-descriptions-item label="订单号">{{ orderInfo.orderNumber }}</el-descriptions-item>
|
||
|
<el-descriptions-item label="订单状态">{{ orderInfo.status }}</el-descriptions-item>
|
||
|
<el-descriptions-item label="下单时间">{{ orderInfo.orderTime }}</el-descriptions-item>
|
||
|
</el-descriptions>
|
||
|
<el-descriptions title="配送信息" :column="1">
|
||
|
<el-descriptions-item label="收货人">{{ deliveryInfo.receiver }}</el-descriptions-item>
|
||
|
<el-descriptions-item label="地址">{{ deliveryInfo.address }}</el-descriptions-item>
|
||
|
<el-descriptions-item label="手机号码">{{ deliveryInfo.phone }}</el-descriptions-item>
|
||
|
<el-descriptions-item label="配送方式">{{ deliveryInfo.deliveryMethod }}</el-descriptions-item>
|
||
|
<el-descriptions-item label="期望送达时间">{{ deliveryInfo.expectedDeliveryTime }}</el-descriptions-item>
|
||
|
</el-descriptions>
|
||
|
<el-descriptions title="支付信息" :column="1" style="border: none;">
|
||
|
<el-descriptions-item label="支付方式">{{ paymentInfo.paymentMethod }}</el-descriptions-item>
|
||
|
<el-descriptions-item label="支付状态">{{ paymentInfo.paymentStatus }}</el-descriptions-item>
|
||
|
<el-descriptions-item label="支付时间">{{ paymentInfo.paymentTime }}</el-descriptions-item>
|
||
|
</el-descriptions>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<!-- 商品列表 -->
|
||
|
|
||
|
<el-table :data="productList" style="width: 100%">
|
||
|
<el-table-column prop="name" label="商品名称" align="center">
|
||
|
<template slot-scope="{row}">
|
||
|
<div style="display: flex;align-items: center;">
|
||
|
<img :src="row.image" class="product-image" :alt="row.name"/>
|
||
|
<div>{{ row.name }}</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
</el-table-column>
|
||
|
<el-table-column prop="spec" label="规格" align="center"></el-table-column>
|
||
|
<el-table-column prop="price" label="单价(元)" align="center" width="200"></el-table-column>
|
||
|
<el-table-column prop="quantity" label="数量" align="center" width="100"></el-table-column>
|
||
|
<el-table-column prop="subtotal" label="小计(元)" align="center" width="200">
|
||
|
<template slot-scope="{row}">
|
||
|
<div style="color: #ff1111;">¥{{ row.subtotal }}</div>
|
||
|
</template>
|
||
|
</el-table-column>
|
||
|
</el-table>
|
||
|
|
||
|
|
||
|
<!-- 订单总价 -->
|
||
|
<div class="common-card normal-margin-bottom total-card">
|
||
|
<el-descriptions :column="1">
|
||
|
<el-descriptions-item label="商品总价">¥{{ totalPrice.productTotal }}</el-descriptions-item>
|
||
|
<el-descriptions-item label="运费">¥{{ totalPrice.shippingFee }}</el-descriptions-item>
|
||
|
<el-descriptions-item label="实付款">
|
||
|
<span style="font-size: 16px;font-weight: bold;color: #ff1111;">¥{{ totalPrice.actualPayment }}</span>
|
||
|
</el-descriptions-item>
|
||
|
</el-descriptions>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: 'OrderDetail',
|
||
|
data() {
|
||
|
return {
|
||
|
activities: [
|
||
|
{ status: '提交订单', timestamp: '2025-08-01 15:30:00' },
|
||
|
{ status: '支付成功', timestamp: '2025-08-01 15:35:00' },
|
||
|
{ status: '商家接单', timestamp: '2025-08-01 15:40:00' },
|
||
|
{ status: '商品出库', timestamp: '2025-08-01 16:00:00' },
|
||
|
{ status: '配送中', timestamp: '2025-08-01 16:30:00' },
|
||
|
{ status: '已完成', timestamp: '2025-08-01 17:00:00' }
|
||
|
],
|
||
|
orderInfo: {
|
||
|
orderNumber: '20250801123456',
|
||
|
status: '已完成',
|
||
|
orderTime: '2025-08-01 15:30:00'
|
||
|
},
|
||
|
deliveryInfo: {
|
||
|
receiver: '张三',
|
||
|
address: '北京市海淀区xxx街道xxx小区',
|
||
|
phone: '13800138000',
|
||
|
deliveryMethod: '快递',
|
||
|
expectedDeliveryTime: '2025-08-02'
|
||
|
},
|
||
|
paymentInfo: {
|
||
|
paymentMethod: '支付宝',
|
||
|
paymentStatus: '已支付',
|
||
|
paymentTime: '2025-08-01 15:35:00'
|
||
|
},
|
||
|
productList: [
|
||
|
{ name: '商品1', spec: '规格1', price: 100, quantity: 1, subtotal: 100,image: 'https://picsum.photos/200/200?random=1', },
|
||
|
{ name: '商品2', spec: '规格2', price: 200, quantity: 2, subtotal: 400,image: 'https://picsum.photos/200/200?random=1', }
|
||
|
],
|
||
|
totalPrice: {
|
||
|
productTotal: 500,
|
||
|
shippingFee: 0,
|
||
|
actualPayment: 500
|
||
|
}
|
||
|
};
|
||
|
},
|
||
|
computed: {
|
||
|
|
||
|
},
|
||
|
methods: {
|
||
|
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss" scoped>
|
||
|
.bg{
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
font-size: 14px;
|
||
|
}
|
||
|
.common-card{
|
||
|
width: 100%;
|
||
|
background-color: white;
|
||
|
padding: 20px;
|
||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||
|
}
|
||
|
.order-status {
|
||
|
border-right: 1px solid #eee;
|
||
|
width: 350px;
|
||
|
height: 220px;
|
||
|
flex-shrink: 0;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
align-items: center;
|
||
|
justify-content: space-between;
|
||
|
.order-no{
|
||
|
color: #999;
|
||
|
.el-button{
|
||
|
width: fit-content;
|
||
|
margin: 0;
|
||
|
display: inline-block;
|
||
|
padding: 0;
|
||
|
}
|
||
|
}
|
||
|
.status-title {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
font-size: 16px;
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
.status-title i {
|
||
|
font-size: 24px;
|
||
|
}
|
||
|
|
||
|
.el-button {
|
||
|
width: 120px;
|
||
|
display: block;
|
||
|
margin: 0 auto;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
.order-step{
|
||
|
flex: 1;
|
||
|
width: 1px;
|
||
|
padding: 0 20px;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
::v-deep .el-step__icon.is-text{
|
||
|
border: none;
|
||
|
width: 30px;
|
||
|
height: 30px;
|
||
|
border-radius: 50%;
|
||
|
background: #C0C4CC;
|
||
|
color: white;
|
||
|
}
|
||
|
::v-deep .el-step__line{
|
||
|
top: 13px;
|
||
|
}
|
||
|
::v-deep .el-step__line-inner{
|
||
|
border-color: #C0C4CC;
|
||
|
}
|
||
|
.process-title{
|
||
|
color:#666;
|
||
|
font-weight: bold;
|
||
|
font-size:14px;
|
||
|
margin-top: -70px;
|
||
|
}
|
||
|
.process-description{
|
||
|
color:#666;
|
||
|
font-size:12px;
|
||
|
margin-top: 45px;
|
||
|
}
|
||
|
::v-deep .is-finish .el-step__icon{
|
||
|
background: #67C23A;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.order-info-card{
|
||
|
display: flex;
|
||
|
::v-deep .el-descriptions{
|
||
|
flex: 1;
|
||
|
flex-shrink: 0;
|
||
|
border-right: 1px solid rgba(153,153,153, 0.1);
|
||
|
padding: 0 20px;
|
||
|
.el-descriptions-item__label{
|
||
|
width: 90px;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.product-image {
|
||
|
width: 80px;
|
||
|
height: 80px;
|
||
|
object-fit: cover;
|
||
|
margin-right: 15px;
|
||
|
border-radius: 4px;
|
||
|
}
|
||
|
.total-card{
|
||
|
margin-top: 20px;
|
||
|
background: #fafafa;
|
||
|
box-shadow: none;
|
||
|
::v-deep .el-descriptions__body{
|
||
|
background: none;
|
||
|
text-align: right;
|
||
|
|
||
|
.el-descriptions-item__label{
|
||
|
width: 90%;
|
||
|
text-align: right;
|
||
|
justify-content: flex-end;
|
||
|
}
|
||
|
.el-descriptions-item__content{
|
||
|
justify-content: flex-end;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|