detail.vue
6.73 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
<template>
<div class="app-container">
<el-dialog
v-if="show"
v-model="show" class="dialog" title="查看详情" :close-on-click-modal="true" width="80%"
draggable
@close="close"
>
<h1 v-if="form.memCode" style="text-align: center;">{{ form.memCode }}</h1>
<div>
<el-form :inline="true" label-position="top" size="small">
<el-row>
<el-col :span="4">
<el-form-item label="团队会员" prop="name" label-width="90px">
<el-input
v-model="queryParams.name"
style="width: 100%;"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="省份" prop="provinceId" label-width="60px">
<el-select v-model="queryParams.provinceId" placeholder="" style="width: 100%;">
<el-option v-for="item in options" :key="item.value" :label="item.text" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="过期时间" prop="memCode" label-width="90px">
<el-date-picker
v-model="validityDateRange"
type="datetimerange"
value-format="YYYY-MM-DD HH:mm:ss"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
style="width: 100%;"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row justify="space-between">
<div>
<el-button v-if="form.auditStatus==0" size="small" type="primary" @click="auditFn">审核</el-button>
</div>
<div>
<el-button size="small" type="primary" @click="getList">查询</el-button>
<el-button size="small" @click="rest">重置</el-button>
</div>
</el-row>
</div>
<br>
<div>
<el-table v-loading="loading" :data="list" max-height="300" border>
<el-table-column type="index" width="55" align="center" label="序号" />
<el-table-column type="index" width="55" label="序号" align="center" />
<el-table-column label="会员编号" align="center" prop="memCode" min-width="100" />
<el-table-column label="单位名称" align="center" prop="name" min-width="140px" />
<el-table-column label="所属省份" align="center" prop="provinceStr" />
<el-table-column v-if="deptType==8||deptType==7" label="一级协会" align="center" prop="deptId" min-width="100px">
<template #default="scope">
<div v-if="scope.row.ancestorsNameList">{{ scope.row.ancestorsNameList[0] }}</div>
</template>
</el-table-column>
<el-table-column v-if="deptType==8" label="二级协会" align="center" prop="deptId" min-width="100px">
<template #default="scope">
<div v-if="scope.row.ancestorsNameList">{{ scope.row.ancestorsNameList[1] }}</div>
</template>
</el-table-column>
<el-table-column label="有效会员/全部会员" align="center" prop="validityMemberCount" min-width="140px" />
<el-table-column label="过期日期" align="center" prop="" min-width="100px">
<template #default="scope">
<span>{{ parseTime(scope.row.validityDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="valiStr" />
<el-table-column label="续存年限" align="center" prop="years" />
</el-table>
</div>
<pagination
v-show="total>0"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
</el-dialog>
</div>
</template>
<script setup>
import { reactive } from '@vue/runtime-core'
import { toRefs, getCurrentInstance, ref } from 'vue'
import { selectPageList } from '@/api/groupMember/index.js'
import { regionsList, certifiedDeptTree } from '@/api/system/userInfo.js'
const { proxy } = getCurrentInstance()
const emit = defineEmits(['approval'])
const data = reactive({
show: false,
form: {},
list: [],
queryParams: {
pageNum: 1,
pageSize: 10
},
getAuditList: [],
forms: {},
options: []
})
const optionList = ref([])
const { show, form, list, queryParams, options } = toRefs(data)
const total = ref(0)
const deptType = ref()
const pType = ref()
const exam = null
const validityDateRange = ref([])
const loading = ref(false)
function open(params, num, type) {
show.value = true
if (params) form.value = params
queryParams.value.parentDeptId = form.value.deptId
deptType.value = num
pType.value = type
getList()
// getGroupList()
}
// /** 查询团体会员列表 */
function getList() {
loading.value = true
if (validityDateRange.value.length > 1) queryParams.value.expiredTimeRange = validityDateRange.value.toString()
selectPageList(queryParams.value).then(response => {
list.value = response.rows
total.value = response.total
})
loading.value = false
}
// 省份
addressFn()
async function addressFn() {
const res = await regionsList()
options.value = res.data
}
// 协会
getClass()
async function getClass() {
const res = await certifiedDeptTree()
optionList.value = res.data
}
// // 查询全体会员
// async function getGroupList() {
// const res = await getMemberCountInfo(queryParams.value.deptType)
// forms.value = res
// }
// 重置
function rest() {
queryParams.value = {
pageNum: 1,
pageSize: 10
}
getList()
}
function auditFn() {
const fromData = JSON.parse(JSON.stringify(form.value))
fromData.content = JSON.stringify(fromData.content)
proxy.$refs['DoAudit'].open(JSON.stringify([fromData]))
}
function close() {
emit('approval', exam)
queryParams.value = {
pageNum: 1,
pageSize: 10
}
show.value = false
}
defineExpose({
open,
close
})
</script>
<style lang="scss" scoped>
.center{
text-align: center;
}
.flex{
display: flex;
justify-content: center;
font-size: 16px;
div{
margin-left: 40px;
margin-right: 40px;
}
}
.x-flex{
display: flex;
font-size: 16px;
div{
margin-right: 40px;
span{
color: #920f20;
font-size: 20px;
}
}
}
.el-button {
margin-bottom: 18px;
}
.table{
display: flex;
}
.text-center{
display: flex;
margin-top: 10px;
margin-bottom: 40px;
}
.text-center>div{
margin-left: 20px;
}
.text-center span{
color: #920f20;
font-size: 20px;
font-weight: 600;
}
:deep(.el-form-item){
margin-bottom: 5px;
}
</style>