|
|
@ -2,21 +2,22 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-05-09 14:41:37
|
|
|
|
* @Date: 2022-05-09 14:41:37
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-05-09 19:55:10
|
|
|
|
* @LastEditTime: 2022-05-10 10:53:08
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
-->
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<ul class="step">
|
|
|
|
<ul class="step">
|
|
|
|
<li v-for="item in steps" :key="item.operationType">
|
|
|
|
<li v-for="item in steps" :key="item.id" :class="item.active && 'active'">
|
|
|
|
<img src="@/assets/img/account/order_status_1.png"/>
|
|
|
|
<img :src="item.active ? item.iconActive :item.icon"/>
|
|
|
|
<b>{{item.operationTypeDesc}}</b>
|
|
|
|
<b>{{item.name}}</b>
|
|
|
|
<span>{{item.createTime}}</span>
|
|
|
|
<span>{{item.date}}</span>
|
|
|
|
<span>{{item.createTime}}</span>
|
|
|
|
<span>{{item.time}}</span>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import UiButton from '../../../../../../components/UiButton.vue'
|
|
|
|
import UiButton from '../../../../../../components/UiButton.vue';
|
|
|
|
|
|
|
|
import {FormatDate} from '@/plugins/utils'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: { UiButton },
|
|
|
|
components: { UiButton },
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
@ -31,16 +32,79 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed:{
|
|
|
|
computed:{
|
|
|
|
steps(){
|
|
|
|
steps(){
|
|
|
|
const normalStep = [
|
|
|
|
const defaultStep = [
|
|
|
|
{type : 1, name : '待付款' },
|
|
|
|
{
|
|
|
|
{type : 6, name : '支付订单' },
|
|
|
|
id : 1, name : '提交订单',
|
|
|
|
{type : 7, name : '平台发货' },
|
|
|
|
icon: require('@/assets/img/account/order_status_1.png'),
|
|
|
|
{type : 1, name : '确认收货' },
|
|
|
|
iconActive : require('@/assets/img/account/order_status_1_active.png')
|
|
|
|
{type : 1, name : '交易完成' },
|
|
|
|
},
|
|
|
|
{type : 2, name : '交易关闭' }
|
|
|
|
{
|
|
|
|
|
|
|
|
id : 6, name : '支付订单' ,
|
|
|
|
|
|
|
|
icon: require('@/assets/img/account/order_status_2.png'),
|
|
|
|
|
|
|
|
iconActive : require('@/assets/img/account/order_status_2_active.png')
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
id : 7, name : '平台发货' ,
|
|
|
|
|
|
|
|
icon: require('@/assets/img/account/order_status_3.png'),
|
|
|
|
|
|
|
|
iconActive : require('@/assets/img/account/order_status_3_active.png')
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
id : 8, name : '确认收货' ,
|
|
|
|
|
|
|
|
icon: require('@/assets/img/account/order_status_4.png'),
|
|
|
|
|
|
|
|
iconActive : require('@/assets/img/account/order_status_4_active.png')
|
|
|
|
|
|
|
|
},
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
let showStep = [];
|
|
|
|
|
|
|
|
const logs = this.orderInfo.orderLogs;
|
|
|
|
|
|
|
|
if(!logs){
|
|
|
|
return [];
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(this.orderInfo.orderStatus === 2){
|
|
|
|
|
|
|
|
logs.forEach(item => {
|
|
|
|
|
|
|
|
const cur = defaultStep.find(i => i.id === item.operationType);
|
|
|
|
|
|
|
|
if(cur){
|
|
|
|
|
|
|
|
showStep.push({
|
|
|
|
|
|
|
|
...cur,
|
|
|
|
|
|
|
|
date : FormatDate(item.createTime,'yyyy-mm-dd'),
|
|
|
|
|
|
|
|
time : FormatDate(item.createTime, 'hh:ii:ss'),
|
|
|
|
|
|
|
|
active:true
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
const createTime = logs[logs.length - 1].createTime;
|
|
|
|
|
|
|
|
showStep.push({
|
|
|
|
|
|
|
|
type:-1, name: '交易关闭', active: true,
|
|
|
|
|
|
|
|
date : FormatDate(createTime,'yyyy-mm-dd'),
|
|
|
|
|
|
|
|
time : FormatDate(createTime, 'hh:ii:ss'),
|
|
|
|
|
|
|
|
icon: require('@/assets/img/account/order_status_close.png'),
|
|
|
|
|
|
|
|
iconActive : require('@/assets/img/account/order_status_close.png')
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
showStep = defaultStep.map(item => {
|
|
|
|
|
|
|
|
const cur = logs.find(i => i.operationType === item.id);
|
|
|
|
|
|
|
|
if(cur){
|
|
|
|
|
|
|
|
item.active = true;
|
|
|
|
|
|
|
|
item.date = FormatDate(cur.createTime,'yyyy-mm-dd');
|
|
|
|
|
|
|
|
item.time = FormatDate(cur.createTime, 'hh:ii:ss');
|
|
|
|
|
|
|
|
item.createTime = cur.createTime;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
let lastLog = logs[logs.length - 1];
|
|
|
|
|
|
|
|
let lastStep = {
|
|
|
|
|
|
|
|
type:-1, name: '交易完成',
|
|
|
|
|
|
|
|
icon: require('@/assets/img/account/order_status_5.png'),
|
|
|
|
|
|
|
|
iconActive : require('@/assets/img/account/order_status_5_active.png')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(lastLog.id === 8){
|
|
|
|
|
|
|
|
lastStep.createTime = lastLog.createTime;
|
|
|
|
|
|
|
|
lastStep.active = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
showStep.push(lastStep);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return showStep;
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
methods:{
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -66,6 +130,12 @@ export default {
|
|
|
|
span{
|
|
|
|
span{
|
|
|
|
display: block;
|
|
|
|
display: block;
|
|
|
|
color: #666;
|
|
|
|
color: #666;
|
|
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&.active{
|
|
|
|
|
|
|
|
b{
|
|
|
|
|
|
|
|
color: #FF875B;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|