xcx_temp_back/src/views/business/OrderManage/Orders/orderDetail.vue

183 lines
3.6 KiB
Vue

<template>
<!-- 订单进度步骤条 -->
<el-card class="box-card">
<div class="order-progress" :class="`progress-${progress}`">
<ul>
<li>
<span>下单时间</span>
<div class="tip">1</div>
<!-- <div class="tip">{{ record.create_time }}</div> -->
</li>
<li>
<span>付款</span>
<!-- <div v-if="record.pay_status == PayStatusEnum.SUCCESS.value" class="tip">付款于 {{ record.pay_time }}</div> -->
</li>
<li>
<span>发货</span>
<!-- <div v-if="record.delivery_status == DeliveryStatusEnum.DELIVERED.value" class="tip">发货于 {{
record.delivery_time }}</div> -->
</li>
<li>
<span>收货</span>
<!-- <div v-if="record.receipt_status == ReceiptStatusEnum.RECEIVED.value" class="tip">收货于 {{
record.receipt_time }}</div> -->
</li>
<li>
<span>完成</span>
<!-- <div v-if="record.order_status == OrderStatusEnum.COMPLETED.value" class="tip">完成于 {{
record.receipt_time }}</div> -->
</li>
</ul>
</div>
</el-card>
</template>
<script setup>
const progress = ref(2)
</script>
<style lang="scss" scoped>
.box-card {
margin-bottom: 50px;
}
// 分割线
.o-divider {
margin-bottom: 32px;
}
// 步骤条
.order-progress {
height: 26px;
line-height: 26px;
background: #f8f8f8;
border-radius: 13px;
font-size: 14px;
text-align: center;
position: relative;
li{
list-style: none;
}
&:before,
&:after {
content: '';
position: absolute;
z-index: 2;
left: 0;
top: 0;
bottom: 0;
border-radius: 13px;
background: #1890ff;
}
&:after {
background: #91d5ff;
z-index: 1;
}
&.progress-1 {
&:before {
width: 0;
}
&:after {
width: 20%;
}
}
&.progress-2 {
&:before {
width: 20%;
}
&:after {
width: 40%;
}
}
&.progress-3 {
&:before {
width: 40%;
}
&:after {
width: 60%;
}
}
&.progress-4 {
&:before {
width: 60%;
}
&:after {
width: 80%;
}
}
&.progress-5 {
&:before {
width: 100%;
}
&:after {
width: 100%;
}
li {
&:nth-child(5) {
color: #fff;
}
}
}
li {
width: 20%;
float: left;
border-radius: 13px;
position: relative;
z-index: 3;
}
.tip {
font-size: 12px;
padding-top: 10px;
color: #8c8c8c;
}
&.progress-1 li:nth-child(1),
&.progress-2 li:nth-child(1),
&.progress-3 li:nth-child(1),
&.progress-4 li:nth-child(1),
&.progress-5 li:nth-child(1) {
color: #fff;
}
&.progress-2 li:nth-child(2),
&.progress-3 li:nth-child(2),
&.progress-4 li:nth-child(2),
&.progress-5 li:nth-child(2) {
color: #fff;
}
&.progress-3 li:nth-child(3),
&.progress-4 li:nth-child(3),
&.progress-5 li:nth-child(3) {
color: #fff;
}
&.progress-4 li:nth-child(4),
&.progress-5 li:nth-child(4) {
color: #fff;
}
}
</style>