reviewStatus.vue
4.41 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 class="status-wrap">
<div class="status-item" v-for="(item, index) in statusList" :key="index">
<div :class="['info', item.active && item.type == 1 ? 'active' : '']">
<div class="circle-box">
<div class="circle">
<img v-if="item.active" class="status-img" :src="IMG_URL + 'equity/review_icon.png'" />
<img v-if="item.type == 2" class="status-img" :src="IMG_URL + 'equity/review_success_icon.png'" />
<img v-if="item.active && item.type == 3" class="status-img" :src="IMG_URL + 'equity/review_error_icon.png'" />
<div v-if="!item.active && item.type < 2" class="circle_text">{{ index + 1 }}</div>
</div>
</div>
<div class="name" :style="{ color: item.active || item.type > 1 ? '#292D33' : '#999EA8' }">{{ item.name }}</div>
<!-- <template>
<div v-if="(index == 1 || index == 2) && item.type > 1" class="status-text" :style="{ color: item.type == 2 ? '#292D33' : '#E75E58' }">{{ item.type == 2 ? '通过' : '不通过' }}</div>
<div style="height: var(--fontSize32)" v-else>{{ ' ' }}</div>
</template> -->
</div>
<div :class="['line', item.type == 2 ? 'line_color' : '']" v-if="index != statusList.length - 1"></div>
</div>
</div>
</template>
<script>
export default {
props: {
infoData: {
type: Object,
default: () => {}
},
status: {
type: Number,
default: 0
}
},
watch: {
infoData:{
handler(val){
this.updateSatus(val)
},
immediate: true
}
},
data() {
return {
staffType: this.$route.query.staffType,// (2-运营审核 3-商务审核 4-采购发货审核)
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/',
statusList: [
{ name: '运营审核', active: false, type: 1 },
{ name: '商务审核', active: false, type: 1 },
{ name: '调拨发货审核', active: false, type: 1 }
]
}
},
methods: {
updateSatus(val) {
console.log('updateSatus', val)
this.statusList.forEach(item => {
item.active = false
item.type=1
})
if (val.billStatus == 1) {
this.statusList[0].active = true
this.statusList[0].type = 1
if (this.staffType == 2) {
this.statusList[0].active = true
}
} else if (val.billStatus == 2) {
this.statusList[0].type = 2
this.statusList[1].active = true
this.statusList[1].type = 1
} else if (val.billStatus == 5) {
this.statusList.forEach(item => {
item.active = true
item.type = 2
})
this.statusList[2].active = true
this.statusList[2].type = 2
} else {
this.statusList.forEach(item => {
item.active = false
})
}
}
}
}
</script>
<style lang="scss" scoped>
.status-wrap {
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
margin: 16px 0;
.status-item {
display: flex;
flex-wrap: nowrap;
font-size: 12px;
font-weight: 500;
color: #999ea8;
.info {
display: flex;
flex-direction: column;
align-items: center;
width: 80rpx;
.circle-box {
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.circle {
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: 12px;
font-weight: 500;
.circle_text {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
border-radius: 50%;
background: #dee0e3;
}
}
.status-img {
position: absolute;
top: 0;
left: 0;
z-index: 1;
width: 28px;
height: 28px;
}
}
.name {
margin-top: 10px;
font-weight: 500;
white-space: nowrap;
color: #7a8299;
margin-bottom: 2px;
}
}
.line {
margin: 12px 4px 0;
width: 50px;
height: 4px;
background: #dee0e3;
border-radius: 4px;
}
.line_color {
background: #347bff1a;
}
}
}
</style>