|
|
@@ -1,8 +1,9 @@
|
|
|
<!-- 签约账号管理 -->
|
|
|
<template>
|
|
|
- <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey" :expand-row-keys="expandKeys" @row-click="rowClick">
|
|
|
+ <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
|
|
|
+ :expand-row-keys="expandKeys" @row-click="rowClick">
|
|
|
<template #header>
|
|
|
- <el-button type="danger" size="small" @click="openComponent('')">添加签约账户</el-button>
|
|
|
+ <app-filter :options="filterOptons" />
|
|
|
</template>
|
|
|
<!-- 证件类型 -->
|
|
|
<template #cardtype="{ value }">
|
|
|
@@ -15,13 +16,15 @@
|
|
|
<!-- 展开行 -->
|
|
|
<template #expand="{ row }">
|
|
|
<div class="buttonbar">
|
|
|
- <el-button v-if="row.signstatus === SignStatus.Signed" type="danger" size="small" @click="showComponent('cancel', row)">解约</el-button>
|
|
|
- <el-button v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Signed].includes(row.signstatus)" type="danger" size="small" @click="showComponent('cancel', row)">修改</el-button>
|
|
|
+ <el-button v-if="row.signstatus === SignStatus.Signed" type="danger" size="small"
|
|
|
+ @click="showComponent('cancel', row)">解约</el-button>
|
|
|
+ <el-button v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Signed].includes(row.signstatus)"
|
|
|
+ type="danger" size="small" @click="showComponent('cancel', row)">修改</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</app-table>
|
|
|
<component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
|
|
|
- v-if="componentId" />
|
|
|
+ v-if="componentId" />
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
@@ -29,17 +32,19 @@ import { shallowRef, defineAsyncComponent } from 'vue'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { useComposeTable } from '@pc/components/base/table'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
+import { useDataFilter } from '@/hooks/datatable'
|
|
|
import { queryBankAccountSign } from '@/services/api/bank'
|
|
|
import { getSignStatusName, SignStatus } from '@/constants/bank'
|
|
|
import { getCertificateTypeCodeName } from '@/constants/account'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
-
|
|
|
-const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.BankAccountSignRsp>({ rowKey: 'applyexchticket' })
|
|
|
+import AppFilter from '@pc/components/base/table-filter/index.vue'
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
['cancel', defineAsyncComponent(() => import('./components/cancel/index.vue'))],
|
|
|
])
|
|
|
|
|
|
+const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.BankAccountSignRsp>({ rowKey: 'applyexchticket' })
|
|
|
+const { filterOptons } = useDataFilter<Model.BankAccountSignReq>()
|
|
|
const { loading, dataList, run } = useRequest(queryBankAccountSign, {})
|
|
|
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
@@ -62,4 +67,8 @@ const showComponent = (componentName: string, row: Model.BankAccountSignRsp) =>
|
|
|
selectedRow.value = row
|
|
|
openComponent(componentName)
|
|
|
}
|
|
|
+
|
|
|
+filterOptons.buttonList = [
|
|
|
+ { lable: '添加签约账户', className: 'el-button--primary', onClick: () => openComponent('sign') },
|
|
|
+]
|
|
|
</script>
|