|
|
@@ -1,6 +1,7 @@
|
|
|
<!-- 交易商管理-开户管理-交易商开户-详情 -->
|
|
|
<template>
|
|
|
- <app-drawer :title="t('investor.user.open.details.title')" width="900" v-model:show="show" :refresh="refresh">
|
|
|
+ <app-drawer :title="t('investor.user.open.details.title')" width="900" v-model:show="state.show"
|
|
|
+ :refresh="state.refresh">
|
|
|
<app-table-details :data="data" :label-width="140" :cell-props="detailProps" :column="2">
|
|
|
<!-- 证件照正面 -->
|
|
|
<template #cardfrontphotourl="{ value }">
|
|
|
@@ -32,29 +33,36 @@
|
|
|
</template>
|
|
|
</app-table-details>
|
|
|
<template #footer>
|
|
|
- <el-button @click="onCancel(false)">{{ t('operation.close') }}</el-button>
|
|
|
+ <el-button @click="state.show = false">{{ t('operation.close') }}</el-button>
|
|
|
<template
|
|
|
v-if="audit && (userStore.userInfo.releType === 1 || (userStore.userInfo.releType === 2 && [2, 4].includes(record.userState)))">
|
|
|
- <el-button type="primary" @click="onAudit(1)">{{ t('investor.user.open.details.aduit') }}</el-button>
|
|
|
- <el-button type="primary" @click="onAudit(0)">{{ t('investor.user.open.details.unaduit') }}</el-button>
|
|
|
+ <el-button type="primary" @click="openAduitDialog(1)">
|
|
|
+ {{ t('investor.user.open.details.aduit') }}
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="openAduitDialog(0)">
|
|
|
+ {{ t('investor.user.open.details.unaduit') }}
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</template>
|
|
|
+ <AduitDialog v-model="state.dialogVisible" v-bind="{ record, auditflag: state.auditflag }" @closed="onCancel"
|
|
|
+ v-if="audit" />
|
|
|
</app-drawer>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, PropType, computed } from 'vue'
|
|
|
-import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
+import { reactive, PropType, computed } from 'vue'
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
import { getFirstPathFullUrl } from '@/filters'
|
|
|
import { decryptAES } from '@/services/crypto'
|
|
|
import { getUserInfoTypeName, getGenderName, UserInfoType } from '@/constants/member'
|
|
|
import { useEnum } from '@/hooks/enum'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
-import { queryInvestorDetail, investorProcess } from '@/services/api/investor'
|
|
|
+import { queryInvestorDetail } from '@/services/api/investor'
|
|
|
import { CellProp } from '@pc/components/base/table-details/types'
|
|
|
import { useUserStore, i18n } from '@/stores'
|
|
|
import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
import AppTableDetails from '@pc/components/base/table-details/index.vue'
|
|
|
+import AduitDialog from './aduit.vue'
|
|
|
|
|
|
const props = defineProps({
|
|
|
record: {
|
|
|
@@ -66,8 +74,12 @@ const props = defineProps({
|
|
|
|
|
|
const { global: { t } } = i18n
|
|
|
const userStore = useUserStore()
|
|
|
-const show = shallowRef(true)
|
|
|
-const refresh = shallowRef(false)
|
|
|
+const state = reactive({
|
|
|
+ show: true,
|
|
|
+ refresh: false,
|
|
|
+ dialogVisible: false,
|
|
|
+ auditflag: 0
|
|
|
+})
|
|
|
|
|
|
// 证件类型
|
|
|
const certificatetypeEnum = useEnum('certificatetype')
|
|
|
@@ -133,37 +145,15 @@ const detailProps = computed(() => {
|
|
|
return result
|
|
|
})
|
|
|
|
|
|
-const onAudit = (auditflag: number) => {
|
|
|
- ElMessageBox({
|
|
|
- title: t('common.alert'),
|
|
|
- message: t('investor.user.open.details.tips1'),
|
|
|
- showCancelButton: true,
|
|
|
- beforeClose: (action, instance, done) => {
|
|
|
- if (action === 'confirm') {
|
|
|
- instance.confirmButtonLoading = true
|
|
|
- investorProcess({
|
|
|
- data: {
|
|
|
- auditflag,
|
|
|
- auditid: props.record.userId,
|
|
|
- msg: ''
|
|
|
- }
|
|
|
- }).then(() => {
|
|
|
- ElMessage.success(t('investor.user.open.details.tips2'))
|
|
|
- onCancel(true)
|
|
|
- }).catch((err) => {
|
|
|
- ElMessage.error(t('investor.user.open.details.tips3') + err)
|
|
|
- }).finally(() => {
|
|
|
- done()
|
|
|
- })
|
|
|
- } else {
|
|
|
- done()
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+const openAduitDialog = (value: number) => {
|
|
|
+ state.auditflag = value
|
|
|
+ state.dialogVisible = true
|
|
|
}
|
|
|
|
|
|
-const onCancel = (isRefresh = false) => {
|
|
|
- show.value = false
|
|
|
- refresh.value = isRefresh
|
|
|
+const onCancel = (refresh: boolean) => {
|
|
|
+ if (refresh) {
|
|
|
+ state.show = false
|
|
|
+ state.refresh = true
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|