Files
jjx-admin/pages/notary-union-pay/list.vue
T
2026-10-08 18:19:39 +08:00

111 lines
4.3 KiB
Vue

<template>
<div class="page-body">
<vk-data-table-query v-model="queryForm1.formData" :columns="queryForm1.columns" @search="search"/>
<vk-data-table
ref="table1"
:action="table1.action"
:columns="table1.columns"
:query-form-param="queryForm1"
:pagination="true"
>
<template v-slot:action="{ row }">
<el-button size="mini" type="success" @click.native="changeStatus(row._id, 1)" v-if="row.profileStatus === 0 || row.profileStatus === 1">通过</el-button>
<el-button size="mini" type="danger" @click.native="refuse(row._id)" v-if="row.profileStatus === 0 || row.profileStatus === 1">拒绝</el-button>
</template>
<template v-slot:profileStatus="{ row }">
<el-tag v-if="row.profileStatus === 1" type="success">已通过</el-tag>
<el-tag v-else-if="row.profileStatus === 2" type="danger">已拒绝</el-tag>
<el-tag v-else-if="row.profileStatus === 0" type="warning">审核中</el-tag>
<el-tag v-else type="info">未提交</el-tag>
</template>
<template v-slot:files="{ row }">
<div v-if="row.notaryUnionPayProfile">
<div v-if="row.notaryUnionPayProfile.businessLicenseFile"><a href="javascript:;" @click="previewFile(row.notaryUnionPayProfile.businessLicenseFile)">营业执照</a></div>
<div v-if="row.notaryUnionPayProfile.legalIdCardFront"><a href="javascript:;" @click="previewFile(row.notaryUnionPayProfile.legalIdCardFront)">法人身份证正面</a></div>
<div v-if="row.notaryUnionPayProfile.legalIdCardBack"><a href="javascript:;" @click="previewFile(row.notaryUnionPayProfile.legalIdCardBack)">法人身份证反面</a></div>
</div>
</template>
</vk-data-table>
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="资料文件" @error="openPreviewFile"/>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
queryForm1: {
formData: {
onlyNotaryUnionPayProfile: true
},
columns: [
{key: 'nickname', title: '昵称', type: 'text', width: 160, mode: '%%'},
{key: 'mobile', title: '手机号', type: 'text', width: 160, mode: '%%'},
{key: 'profileStatus', title: '审核状态', type: 'select', width: 140, data: [
{value: -1, label: '未提交'},
{value: 0, label: '审核中'},
{value: 1, label: '已通过'},
{value: 2, label: '已拒绝'}
]}
]
},
table1: {
action: 'admin/system/user/sys/getList',
columns: [
{key: 'nickname', title: '昵称', type: 'text', width: 150},
{key: 'mobile', title: '手机号', type: 'text', width: 150},
{key: 'company.companyName', title: '企业名称', type: 'text', width: 220},
{key: 'profileStatus', title: '审核状态', type: 'html', width: 120},
{key: 'notaryUnionPayProfile.submitTime', title: '提交时间', type: 'text', width: 170},
{key: 'notaryUnionPayProfile.reviewTime', title: '审核时间', type: 'text', width: 170},
{key: 'files', title: '资料文件', type: 'html', width: 260},
{key: 'action', title: '操作', type: 'html', width: 200, fixed: 'right'}
]
},
showImagePreview: false,
previewImageUrl: ''
}
},
methods: {
search() {
this.$refs.table1.search()
},
changeStatus(id, status, refuseReason = null) {
vk.callFunction({
url: 'admin/system/user/sys/changeNotaryUnionPayProfileStatus',
data: {id, status, refuseReason}
}).then(() => {
this.$refs.table1.refresh()
})
},
refuse(id) {
this.$prompt('拒绝理由', {showInput: true}).then(({value, action}) => {
if (action === 'confirm') this.changeStatus(id, 2, value)
})
},
previewFile(url) {
if (!url) return
this.previewImageUrl = url
this.showImagePreview = true
},
openPreviewFile() {
const url = this.previewImageUrl
this.showImagePreview = false
this.previewImageUrl = ''
if (url) window.open(url, '_blank')
}
}
}
</script>
<style scoped>
.preview-image {
display: block;
max-width: 100%;
max-height: 75vh;
margin: 0 auto;
}
</style>