viewsMerge.vue
13.1 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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<template>
<div v-if="show">
<el-dialog
v-if="show"
v-model="show" class="dialog" title="查看详情" destroy-on-close width="80%"
draggable
@close="closeList"
>
<h1 class="center">{{ form.content.certName }}</h1>
<div class="flex">
<div v-if="form.content.commitTime">提交日期:<span>{{ form.content.commitTime }}</span></div>
<div>提交单位:<span>{{ form.content.memberName }}</span></div>
</div>
<br>
<div class="vipData">
<div>
团队会员合计:
<span>{{ form.content.allCount }}个</span>
</div>
<div>
新会员合计:
<span>{{ form.content.newCount }}个</span>
</div>
<div>
年限合计:
<span>{{ form.content.renewYear }}年</span>
</div>
<div>
费用合计:
<span>{{ (form.content.allFee * 1).toFixed(2) }}元</span>
</div>
</div>
<br>
<div>
<el-form size="small" :inline="true" label-width="100px" label-position="top">
<el-row style="width: 100%;">
<el-col :span="4">
<el-form-item label="单位会员名称">
<el-input v-model.trim="queryParams.certName" placeholder="" @keyup.enter="getBackList" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="单位类型">
<el-select v-model="queryParams.dType" placeholder="" @change="getBackList()">
<!-- <el-option label="全部" value="" /> -->
<el-option label="一级协会" value="2" />
<el-option label="二级协会" value="4" />
<!-- <el-option label="三级协会" value="5" />-->
<el-option label="职业性单位会员" value="6" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="缴费编号">
<el-input v-model.trim="queryParams.code" placeholder="" @keyup.enter="getBackList" />
</el-form-item>
</el-col>
<div class="po-r-btns">
<el-button size="small" type="primary" @click="getBackList">查询</el-button>
<el-button size="small" @click="rest">重置</el-button>
</div>
</el-row>
</el-form>
<el-row v-if="form.auditStatus==0&&deptType!=2" justify="space-between">
<div>
<el-button size="small" type="primary" @click="showAudit=true">审核</el-button>
</div>
</el-row>
<br>
</div>
<div>
<el-table :data="list" max-height="300" border>
<el-table-column type="index" width="55" align="center" label="序号" />
<el-table-column
label="单位会员名称" align="center" prop="memberName" :show-overflow-tooltip="true"
min-width="160px"
/>
<el-table-column label="单位类型" align="center" prop="" min-width="160px">
<template #default="scope">
<span v-if="scope.row.deptType==2">一级协会</span>
<span v-if="scope.row.deptType==3">直属协会</span>
<span v-if="scope.row.deptType==4">二级协会</span>
<!-- <span v-if="scope.row.deptType==5">三级协会</span>-->
<span v-if="scope.row.deptType==6">职业性单位会员</span>
</template>
</el-table-column>
<el-table-column label="单价" align="center" prop="unitPrice" min-width="90" />
<!-- <el-table-column label="存续年限/年" align="center" prop="renewYear" min-width="100" />-->
<el-table-column width="100" label="存续年限/年" align="center" prop="content.years">
<template #default="scope">
<div>{{ scope.row.years ? scope.row.years : '--' }}</div>
</template>
</el-table-column>
<el-table-column min-width="100" label="年限合计" align="center" prop="renewYear" />
<el-table-column label="总价" align="center" prop="allFee" min-width="90" />
<el-table-column label="提交日期" align="center" prop="commitTime" min-width="100">
<template #default="scope">
<span>{{ parseTime(scope.row.commitTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="原有效期" align="center" prop="validityTime" min-width="100">
<template #default="scope">
<span v-if="scope.row.validityTime">{{ parseTime(scope.row.validityTime, '{y}-{m}-{d}') }}</span>
<span v-else>/</span>
</template>
</el-table-column>
<el-table-column label="会员状态" align="center" prop="validityTime" min-width="100">
<template #default="scope">
<span>{{ scope.row.validityTime == null ? '新会员' : '续费会员' }}</span>
</template>
</el-table-column>
<el-table-column v-if="deptType==1" label="会员证" align="center" min-width="100">
<template #default="">
<div v-if="form.content.sendJiaoFeiFlag==1" class="text-success">已下发</div>
<div v-else class="text-warning">未下发</div>
</template>
</el-table-column>
<el-table-column label="缴费编号" align="center" prop="provinceName" min-width="180">
<template #default="props">
{{ props.row.wfCode }}
</template>
</el-table-column>
<!-- <el-table-column label="考点申请" align="center" prop="" min-width="120">-->
<!-- <template #default="props">-->
<!-- <el-button v-if="props.row?.examPointFlag==1" type="text" @click="examPointView(props.row)">是</el-button>-->
<!-- <div v-else>否</div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="协会信息" align="center" width="100">
<template #default="{row}">
<span v-if="row.checkPass==0" class="text-danger">异常</span>
<span v-else class="text-success">正常</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="100" align="center" prop="personIdcType">
<template #default="scope">
<!-- <el-button v-if="form.isView==1&&form.auditStatus==1" :disabled="scope.row.status == 4" link type="primary" @click="handleBack(scope.row)">撤回</el-button> -->
<el-button type="primary" @click="handleData(scope.row)">机构资料</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
:total="total"
@pagination="getBackList"
/>
<br>
<h3>审核记录</h3>
<el-table :data="auditList" max-height="300" border>
<el-table-column type="index" width="55" align="center" label="序号" />
<el-table-column label="审核协会" align="center" prop="handlerDeptName" />
<el-table-column label="审核状态" align="center" prop="">
<template #default="props">
<div v-if="props.row.auditStatus==0">审核中</div>
<div v-if="props.row.auditStatus==1" class="text-success">审核通过</div>
<div v-if="props.row.auditStatus==2" class="text-danger">审核拒绝</div>
<div v-if="props.row.auditStatus==3" class="text-warning">已撤回</div>
<div v-if="props.row.auditStatus==100">审核中</div>
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" prop="">
<template #default="props">
{{ parseTime(props.row.handleDate, '{y}-{m}-{d} {h}:{i}') }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="reason" />
</el-table>
</div>
</el-dialog>
<orderDetail ref="orderDetailRef" />
<!-- 审核 -->
<el-dialog
v-if="showAudit" v-model="showAudit" title="单位会员认证审核" :close-on-click-modal="true"
draggable
width="600"
@close="showAudit=false"
>
<el-form :model="forms" label-width="100">
<el-form-item label="审批结果" prop="flag">
<el-radio-group v-model="forms.flag">
<el-radio label="1">审批通过</el-radio>
<el-radio label="0">审批拒绝</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="'备注'" prop="reason">
<el-input v-model="forms.reason" type="textarea" rows="5" />
</el-form-item>
</el-form>
<template #footer>
<div style="text-align: center;">
<el-button type="primary" @click="doApproval"> 提交</el-button>
<el-button @click="showAudit = false">取 消</el-button>
</div>
</template>
</el-dialog>
<institution ref="institutionRef" />
<examView ref="examViewRef" />
</div>
</template>
<script setup>
import { reactive } from '@vue/runtime-core'
import { toRefs, getCurrentInstance, ref, computed } from 'vue'
import {
getDetailList,
audit,
info
} from '@/api/groupMember/authentication.js'
import institution from '@/views/groupMember/components/institution'
import orderDetail from '@/views/groupMember/authentication/orederDeatil.vue'
import useUserStore from '@/store/modules/user'
import { getHistoryByRelateId } from '@/api/groupMember/authentication.js'
import examView from '@/views/groupMember/authentication/components/examView.vue'
const deptType = computed(() => useUserStore().deptType)
const showAudit = ref(false)
const { proxy } = getCurrentInstance()
const emit = defineEmits(['approval'])
const id = ref()
const auditList = ref([])
const total = ref(0)
const data = reactive({
show: false,
form: {},
list: [],
listArr: [],
queryParams: {
pageNum: 1,
pageSize: 10
},
forms: {
flag: '1'
},
userForm: {}
})
const { show, form, list, queryParams, forms, userForm } = toRefs(data)
function open(params) {
show.value = true
if (params) {
form.value = params
queryParams.value.recordId = form.value.recordId
}
getBackList()
}
// 查看
async function getBackList() {
const res = await getDetailList(queryParams.value)
if (res.code == 200) {
list.value = res.rows
list.value.forEach(item => {
item.examPointInfo = JSON.parse(item.examPointInfo)
})
total.value = res.total
list.value?.[0]?.rangeId == 0 ? id.value = list.value?.[0]?.certId : id.value = list?.value?.[0]?.rangeId
if (id.value) await auditFN()
}
}
async function auditFN() {
const res = await getHistoryByRelateId(id.value)
auditList.value = res.data
}
// 重置
function rest() {
queryParams.value = {
recordId: form.value.recordId,
pageNum: 1,
pageSize: 10
}
getBackList()
}
// 批量审批
async function doApproval() {
if (!forms.value.flag) {
return proxy.$modal.msgError('请选择审核状态!')
}
if (forms.value.flag == 0 && !forms.value.reason) {
return proxy.$modal.msgError('请输入拒绝理由')
}
const res = await audit({
recordIds: [form.value.recordId],
flag: forms.value.flag,
reason: forms.value.reason
})
if (res.code == 200) {
showAudit.value = false
form.value.auditStatus = 10
await getBackList()
await closeList()
form.value.auditStatus = 1
proxy.$modal.msgSuccess('操作成功!')
} else {
proxy.$modal.msgError('操作失败!')
}
}
async function handleData(row) {
const res = await info(row.memId)
if (res.code == 200) {
userForm.value = res.data
if (userForm.value.applicationForMembership) userForm.value.applicationForMembership = JSON.parse(userForm.value.applicationForMembership)
if (userForm.value.materials) {
userForm.value.materials = JSON.parse(userForm.value.materials)
}
proxy.$refs['institutionRef'].open(userForm.value)
}
console.log(res)
}
function closeList() {
show.value = false
queryParams.value = {
pageNum: 1,
pageSize: 10
}
total.value = 0
emit('approval')
}
defineExpose({
open
})
</script>
<style lang="scss" scoped>
.center {
text-align: center;
margin-top: 0;
}
.flex {
display: flex;
justify-content: space-between;
font-size: 16px;
}
.x-flex {
display: flex;
width: 100%;
font-size: 16px;
// justify-content: space-between;
div {
// margin-right: 40px;
flex: 1;
display: flex;
// padding: 10px;
border: 1px solid #fafafa;
justify-content: center;
div:first-child {
background-color: #fafafa;
}
div {
// width: 200px;
flex: 1;
justify-content: center;
// text-align: center;
padding: 10px;
}
}
.b-box {
border: 1px solid #f8f8f8;
}
}
</style>