progress.vue
3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<template>
<div
v-loading="loading"
class="progress-box"
element-loading-text="hard working..."
>
<ul class="el-timeline">
<template v-if="progressList.length>0">
<el-timeline>
<!-- <li class="el-timeline-item" :key="index" v-for="(item,index) in progressList" placement="top"> -->
<el-timeline-item
v-for="(item,index) in progressList"
:key="index"
class="el-timeline-item"
placement="top"
>
<el-card>
<div>
<span class="black-cl fw-blod">【{{ item.name ? item.name : '--' }}】{{ item.progressType ? AUDITORDERPROGRESS[item.progressType] : '--' }}</span>
<span class="fr gray-cl">{{ item.createTime ? item.createTime : '--' }}</span>
</div>
<template v-if="item.progressType == 2 || item.progressType == 4">
<p>退回原因:{{ item.reason }}</p>
</template>
</el-card>
</el-timeline-item>
</el-timeline>
</template>
<div
v-else
class="noData"
>
<svg-icon
icon-class="nodata"
class="icon"
/>
</div>
</ul>
</div>
</template>
<script>
import {
// getOrderProgress,
getAuditOrderDetailById
// getDictDataListByKey,
} from '@/api/system'
export default {
components: {
},
props: {
params: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
AUDITORDERPROGRESS: this.$Constants.AUDITORDERPROGRESS,
progressList: [],
loading: true,
overdueOptions: {},
reserveOptions: {}
}
},
mounted() {
this.getOrderProgress()
},
methods: {
getOrderProgress() {
getAuditOrderDetailById({ 'id': Number(this.params.id) }).then(response => {
this.loading = false
if (!response || response.code != 200) return
// console.log(response.data.auditStatusList)
const detail = response.data.auditStatusList
if (!detail || !(detail.length > 0)) return
var arr = []
detail.forEach(item => {
arr.push({
// 1待审核,2已退回,3正常通过,4退回通过
progressType: item.auditStatus,
name: item.createName || '--',
createTime: item.createTime,
remark: item.remark,
reason: item.reason
})
})
this.$set(this, 'progressList', arr)
})
}
}
}
</script>
<style lang="scss" scope>
.progress-box {
height: 490px;
padding-right: 10px;
padding-top: 20px;
p {
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
Microsoft YaHei, Arial, sans-serif;
font-size: 12px;
margin: 15px 0 0;
padding-left: 7px;
}
.noData {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 55px;
left: 0;
right: 0;
bottom: 0;
background: #fff;
text-align: center;
line-height: 400px;
.icon {
width: 100px;
height: 100px;
}
}
.el-timeline {
margin: 0;
font-size: 14px;
list-style: none;
}
.el-timeline .el-timeline-item:last-child .el-timeline-item__tail {
display: none;
}
.el-timeline-item {
position: relative;
}
.el-timeline-item__wrapper {
position: relative;
padding-left: 28px;
padding-bottom: 20px;
top: -3px;
}
.el-timeline-item__tail {
position: absolute;
left: 4px;
height: 100%;
border-left: 2px solid #e4e7ed;
}
}
</style>
<style lang="scss">
.progress-box {
.el-timeline-item {
width: 90%;
}
}
</style>