applyDetail.vue
5.15 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<template>
<view>
<view class="wBox">
<view class="tt">考级基本信息</view>
<view class="ddd">
<text class="lab">考级名称:</text>{{ form.name }}
</view>
<view class="ddd">
<text class="lab">申请日期:</text>{{form.applyTime}}
</view>
<view class="ddd">
<text class="lab">申请单位:</text>{{ form.memberName }}
</view>
<view class="ddd">
<text class="lab">考官:</text>{{form.examinerNames?.split(',').join('/')}}
</view>
<view class="ddd">
<text class="lab">考试开始时间:</text>{{form.startTime}}
</view>
<view class="ddd">
<text class="lab">考试结束时间:</text>{{form.endTime}}
</view>
<view class="ddd">
<text class="lab">考级地点:</text>{{form.address}}
</view>
<view class="ddd" v-if="app.globalData.showPrice">
<text class="lab">总金额:</text>{{(form.totalAmount*1).toFixed(2) }}
</view>
</view>
<view class="wBox">
<view class="tt">
考生信息
</view>
<view class="vipData">
<view>共 <text>{{ tablePersonInfo.total }}</text>人</view>
<view v-for="l in tablePersonInfo.levelArr" :key="l.level">
{{ szToHz(l.level) }}级: <text>{{ l.num }} </text>人
</view>
</view>
<view class="userlist">
<view class="item" v-for="n in list" style="background-color: #fffafa;">
<view class="w100">
<view class="name">{{n.realName}} <text>{{n.memName}}</text></view>
<!-- <view class="date">{{n.idcTypeStr}}:{{n.idcCode}}</view> -->
<view class="flexbox">
<view>
原有级别
<text v-if="n.levelOld">{{ szToHz(n.levelOld) }}级</text>
<text v-else>十级</text>
</view>
<view>
考试级别
<text>
{{ szToHz(n.levelNew) }}级
</text>
</view>
<view v-if="app.globalData.showPrice">
金额
<text>
{{ (n.examFee * 1).toFixed(2) }}
</text>
</view>
<view>
是否通过
<text v-if="n.isPass=='1'" class="text-success">通过</text>
<text v-else class="text-danger">未通过</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="wBox">
<view class="tt">
审核信息
</view>
<view>
<view class="stepItem" v-for="(n,index) in recordList">
<view class="time">{{n.handleDate||'待审批'}}</view>
<view class="content">
<view class="status">
<text :class="{
'text-success':n.auditStatus=='1',
'text-danger':n.auditStatus=='2',
'text-warning':n.auditStatus=='3'
}">{{ n.auditStatusStr }}</text>
</view>
<!-- <view class="name">第 {{index+1}} 步</view> -->
<view class="deptName">{{n.deptName}}</view>
<view v-if="n.auditStatus==2">
备注:{{n.reason||'/' }}
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'lodash'
import {
onMounted,
ref
} from 'vue'
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
const app = getApp();
const deptType = ref('')
const form = ref({})
const tablePersonInfo = ref({})
const recordList = ref([])
const list = ref([])
let examId = ''
onLoad((option) => {
examId = option.examId
})
onShow(() => {
if (app.globalData.isLogin) {
init()
} else {
app.firstLoadCallback = () => {
init()
};
}
})
function init() {
uni.showLoading({
title: '加载中'
})
deptType.value = app.globalData.deptType
getForm()
getRecordList()
getTablePersonInfo()
}
function getForm() {
api.getLevelApplyInfo(examId).then(res => {
uni.hideLoading()
form.value = res.data
})
}
function getRecordList() {
api.getApprovalRecord(examId).then(res => {
recordList.value = res.data.levelSteps
})
}
function getTablePersonInfo() {
api.getStudentList({
examId: examId
}).then(res=>{
list.value = res.rows
const total = list.value.length
const levelArr = []
_.each(list.value, (d) => {
const temp = _.find(levelArr, (l) => {
return l.level == d.levelNew
})
if (temp) {
temp.num++
} else {
levelArr.push({
level: d.levelNew,
num: 1
})
}
})
tablePersonInfo.value = {
total: total,
levelArr: _.sortBy(levelArr, (l) => {
return l.level
})
}
})
}
function szToHz(num) {
const hzArr = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
return hzArr[parseInt(num)]
}
</script>
<style scoped>
.wBox {
width: 700rpx;
padding: 30rpx;
margin: 20rpx auto;
background: #FFFFFF;
box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1);
border-radius: 15rpx;
.tt {
color: #0A1629;margin: 0 0 30rpx;
font-size: 30rpx;
}
.ddd{font-size: 28rpx;color: #333;
.lab{color: #999;display: inline-block;text-align: justify;}
}
}
</style>