Commit 292ce296 by cen

详情

1 parent b4ff0eb0
......@@ -42,10 +42,8 @@
<view class="value" :style="{ color: i.statusColor }">{{ i.status }}</view>
</view>
<view class="item-mark">
<view :class="['circle', { first: index == 0, 'status-approved': i.status === '审批通过', 'status-pending': i.status === '审批中' }]"></view>
<template>
<view class="mark-line" v-if="index != logList.length - 1"></view>
</template>
<view :class="['circle', { first: index == 0, 'status-approved': i.status === '审批通过', 'status-pending': i.status === '审批中', 'status-rejected': i.status === '驳回' }]"></view>
<view class="mark-line" v-if="index != logList.length - 1"></view>
</view>
</view>
</template>
......@@ -337,10 +335,24 @@ export default {
}
},
computed: {
// 审批时间轴:1=区域经理审批中 2=区域经理通过/线上运营审批中 3=都通过(显示备注) 4=驳回
logList() {
const status = this.orderInfo.goodsOrderApplyStatus
const approved = { status: '审批通过', statusColor: '#2cca74' }
const pending = { status: '审批中', statusColor: '#ff9d0a' }
const empty = { status: '-', statusColor: '#999' }
const rejected = { status: '驳回', statusColor: '#f56c6c' }
return [
{ name: '区域经理', value: '1', status: '审批通过', statusColor: '#2cca74' },
{ name: '线上运营', value: '2', status: '审批中', statusColor: '#ff9d0a' }
{
name: '区域经理',
value: '1',
...(status === 1 ? pending : [2, 3, 4].includes(status) ? approved : empty)
},
{
name: '线上运营',
value: '2',
...(status === 1 ? empty : status === 2 ? pending : status === 3 ? approved : status === 4 ? rejected : empty)
}
]
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!