|
|
@@ -1,7 +1,104 @@
|
|
|
<!-- 交易商管理-交易商管理-交易商销户审核 -->
|
|
|
<template>
|
|
|
- <app-view></app-view>
|
|
|
+ <app-view>
|
|
|
+ <template #header>
|
|
|
+ <app-filter :option="filterOption" />
|
|
|
+ </template>
|
|
|
+ <app-table :data="dataList" :columns="tableColumns" :loading="loading">
|
|
|
+ <!-- 交易商名称 -->
|
|
|
+ <template #userid="{ row }">
|
|
|
+ {{ `(${row.userid})${row.accountname}` }}
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template #operate="{ row }">
|
|
|
+ <app-operation size="small" :data-list="handleOperateButtons(row)"
|
|
|
+ @click="(code: string) => openComponent(code, row)" circle />
|
|
|
+ </template>
|
|
|
+ <template #footer>
|
|
|
+ <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
|
|
|
+ @change="onSearch" />
|
|
|
+ </template>
|
|
|
+ </app-table>
|
|
|
+ <component :is="componentMap.get(componentId)" v-bind="{ record }" @closed="closeComponent"
|
|
|
+ v-if="componentId" />
|
|
|
+ </app-view>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
+import { shallowRef } from 'vue'
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
+import { formatDate, handleNoneValue } from '@/filters'
|
|
|
+import { useEnum } from '@/hooks/enum'
|
|
|
+import { useRequest } from '@/hooks/request'
|
|
|
+import { useDataFilter } from '@/hooks/datatable-v2'
|
|
|
+import { useOperation } from '@/hooks/operation'
|
|
|
+import { investorUserCancelApply } from '@/services/api/investor'
|
|
|
+import AppTable from '@pc/components/base/table/index.vue'
|
|
|
+import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
|
|
|
+import AppPagination from '@pc/components/base/pagination/index.vue'
|
|
|
+import AppOperation from '@pc/components/base/operation/index.vue'
|
|
|
+import { i18n } from '@/stores'
|
|
|
+
|
|
|
+const { global: { t } } = i18n
|
|
|
+
|
|
|
+// 申请状态
|
|
|
+const ucapplystatusEnum = useEnum('ucapplystatus')
|
|
|
+// 处理状态
|
|
|
+const handlestatusEnum = useEnum('handlestatus')
|
|
|
+
|
|
|
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.InvestorUserCancelApplyRsp>({
|
|
|
+ onClose: () => onSearch()
|
|
|
+})
|
|
|
+
|
|
|
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(investorUserCancelApply, {
|
|
|
+ params: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20
|
|
|
+ },
|
|
|
+ onError: (err) => {
|
|
|
+ ElMessage.error(err)
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
+ { field: 'userid', label: '交易商名称' },
|
|
|
+ { field: 'applystatus', label: '申请状态', formatValue: (val) => ucapplystatusEnum.getEnumTypeName(val) },
|
|
|
+ { field: 'applytime', label: '申请时间', formatValue: (val) => formatDate(val) },
|
|
|
+ { field: 'handlestatus', label: '处理状态', formatValue: (val) => handlestatusEnum.getEnumTypeName(val) },
|
|
|
+ { field: 'auditlogincode', label: '审核人' },
|
|
|
+ { field: 'audittime', label: '审核时间', formatValue: (val) => formatDate(val) },
|
|
|
+ { field: 'operate', label: 'common.operate', fixed: 'right' }
|
|
|
+])
|
|
|
+
|
|
|
+const { filterOption, getQueryParams, resetFilters } = useDataFilter<Model.InvestorUserCancelApplyReq>({
|
|
|
+ filters: [
|
|
|
+ {
|
|
|
+ field: 'accountname',
|
|
|
+ label: '交易商'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'handlestatus',
|
|
|
+ label: '交易商状态',
|
|
|
+ options: () => handlestatusEnum.getEnumOptions()
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ buttons: [
|
|
|
+ { label: t('operation.search'), className: 'el-button--primary', onClick: () => onSearch() },
|
|
|
+ { label: t('operation.reset'), className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
|
|
|
+ ]
|
|
|
+})
|
|
|
+
|
|
|
+// 处理操作按钮
|
|
|
+const handleOperateButtons = (row: Model.InvestorUserCancelApplyRsp) => {
|
|
|
+ const buttons = ['investor_manage_cancelapply_details']
|
|
|
+ if (!row.handlestatus) {
|
|
|
+ buttons.push('investor_manage_cancelapply_audit')
|
|
|
+ }
|
|
|
+ return getActionButtons(buttons)
|
|
|
+}
|
|
|
+
|
|
|
+const onSearch = (clear = false) => {
|
|
|
+ const qs = getQueryParams(clear)
|
|
|
+ run(qs)
|
|
|
+}
|
|
|
</script>
|