li.shaoyi 10 months ago
parent
commit
47f54db6bc

+ 1 - 0
src/packages/pc/views/investor/custom/group/components/edit/index.vue

@@ -82,6 +82,7 @@ customerTypeEnum.registerEnumReadyCallback(async () => {
             configs.push(res.data)
         }
     }
+    formData.value.customertype = selectedItem.value?.customertype
 })
 
 // 表单验证规则

+ 69 - 0
src/packages/pc/views/investor/manage/cancelapply/components/details/index.vue

@@ -0,0 +1,69 @@
+<!-- 交易商管理-交易商管理-交易商销户审核-详情 -->
+<template>
+    <app-drawer :title="t('investor.user.open.details.title')" width="900" v-model:show="show">
+        <app-table-details :data="data" :label-width="120" :cell-props="detailProps" :column="2">
+            <!-- 确认半身照 -->
+            <template #imageurl="{ value }">
+                <el-image :src="getImageUrl(value)" fit="cover" lazy style="width: 128px; height: 72px" />
+            </template>
+        </app-table-details>
+        <template #footer>
+            <el-button @click="onCancel">{{ t('operation.close') }}</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType, computed } from 'vue'
+import { ElMessage } from 'element-plus'
+import { formatDate } from '@/filters'
+import { useEnum } from '@/hooks/enum'
+import { useRequest } from '@/hooks/request'
+import { investorCancelview } from '@/services/api/investor'
+import { CellProp } from '@pc/components/base/table-details/types'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
+import service from '@/services'
+import { i18n } from '@/stores'
+
+const props = defineProps({
+    record: {
+        type: Object as PropType<Model.InvestorUserCancelApplyRsp>,
+        required: true
+    }
+})
+
+const { global: { t } } = i18n
+const show = shallowRef(true)
+
+// 处理状态
+const handlestatusEnum = useEnum('handlestatus')
+
+const { data } = useRequest(investorCancelview, {
+    params: {
+        autoid: props.record.autoid,
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const detailProps = computed<CellProp[]>(() => [
+    { prop: 'userid', label: '用户账号', formatValue: (val) => val && `(${val})${data.value?.accountname}` },
+    { prop: 'applytime', label: '申请时间', formatValue: (val) => formatDate(val) },
+    { prop: 'handlestatus', label: '审核状态', formatValue: (val) => handlestatusEnum.getEnumTypeName(val) },
+    { prop: 'auditusername', label: '审核人' },
+    { prop: 'audittime', label: '审核时间', formatValue: (val) => formatDate(val) },
+    { prop: 'auditremark', label: '审核备注' },
+    { prop: 'imageurl', label: '确认半身照' },
+])
+
+const getImageUrl = (path: string) => {
+    const baseUrl = service.getConfig('apiUrl')
+    return path && new URL(path, baseUrl).href
+}
+
+const onCancel = () => {
+    show.value = false
+}
+</script>

+ 98 - 1
src/packages/pc/views/investor/manage/cancelapply/index.vue

@@ -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>

+ 1 - 1
src/packages/pc/views/investor/manage/transfer/index.vue

@@ -90,7 +90,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'inuseridname', label: '转入所属机构' },
     { field: 'transferstatus', label: '转移状态', formatValue: (val) => transferstatusEnum.getEnumTypeName(val) },
     { field: 'createtime', label: '申请时间', formatValue: (val) => formatDate(val) },
-    { field: 'operate', label: 'common.operate', width: 200, fixed: 'right' }
+    { field: 'operate', label: 'common.operate', fixed: 'right' }
 ])
 
 const { filterOption, getQueryParams, resetFilters } = useDataFilter<Model.OrganSonTransferReq>({

+ 21 - 0
src/services/api/investor/index.ts

@@ -314,4 +314,25 @@ export function investorTransferAdd(options: CommonFetchOptions<{ request: Parti
  */
 export function getUserAccountDetail(options: CommonFetchOptions<{ request: Model.UserAccountDetailReq; response: Model.UserAccountDetailRsp; }>) {
     return httpClient.commonRequest('/investor/getUserAccountDetail', 'get', options)
+}
+
+/**
+ * 交易商管理-->交易商销户审核-->获取列表
+ */
+export function investorUserCancelApply(options: CommonFetchOptions<{ request: Model.InvestorUserCancelApplyReq; response: Model.InvestorUserCancelApplyRsp[]; }>) {
+    return httpClient.commonRequest('/investor/usercancelapply', 'get', options)
+}
+
+/**
+ * 交易商管理-->交易商销户审核-->详情
+ */
+export function investorCancelview(options: CommonFetchOptions<{ request: Model.InvestorCancelviewReq; response: Model.InvestorCancelviewRsp; }>) {
+    return httpClient.commonRequest('/investor/cancelview', 'get', options)
+}
+
+/**
+ * 交易商管理-->交易商销户审核-->审核
+ */
+export function investorCancelaudit(options: CommonFetchOptions<{ request: Model.InvestorCancelauditReq; }>) {
+    return httpClient.commonRequest('/investor/cancelaudit', 'get', options)
 }

+ 48 - 0
src/types/model/investor.d.ts

@@ -999,4 +999,52 @@ declare namespace Model {
         userId: number; // userAccount – 交易商代码
         usertype: number;
     }
+
+    /** 交易商管理-->交易商销户审核-->获取列表 请求 */
+    interface InvestorUserCancelApplyReq {
+        accountname?: string; // 交易商
+        handlestatus?: number; // 交易商状态
+        pageNum: number;
+        pageSize: number;
+    }
+
+    /** 交易商管理-->交易商销户审核-->获取列表 响应 */
+    interface InvestorUserCancelApplyRsp {
+        accountname: string;
+        applystatus: number; // 申请状态
+        applytime: string; // 申请时间
+        auditlogincode: number; // 审核人
+        audittime: string; // 审核时间
+        auditusername: string;
+        autoid: number;
+        handlestatus: number; // 处理状态
+        userid: number; // 交易商名称
+    }
+
+    /** 交易商管理-->交易商销户审核-->详情 请求 */
+    interface InvestorCancelviewReq {
+        autoid: number;
+    }
+
+    /** 交易商管理-->交易商销户审核-->详情 响应 */
+    interface InvestorCancelviewRsp {
+        accountname: string;
+        applystatus: number; // 申请状态 - 0:待处理 1:处理中 2:完成
+        applytime: string; // 申请时间
+        auditid: number; // 审核人
+        auditremark: string; // 审核备注
+        audittime: string; // 审核时间
+        auditusername: string;
+        autoid: number; // 流水号(AutoID)
+        handlestatus: number; // 处理状态 - 0:待审核 1:审核通过 2:审核拒绝 3:处理中
+        imageurl: string; // 图片地址
+        userid: number; // 用户ID
+    }
+
+    /** 交易商管理-->交易商销户审核-->审核 请求 */
+    interface InvestorCancelauditReq {
+        auditflag: number;
+        autoid: number;
+        msg: string;
+    }
 }