|
|
@@ -1,7 +1,76 @@
|
|
|
<!-- 报表查询-经纪会员报表 -->
|
|
|
<template>
|
|
|
- <app-view></app-view>
|
|
|
+ <app-view>
|
|
|
+ <template #header>
|
|
|
+ <app-filter :options="filterOptons" />
|
|
|
+ </template>
|
|
|
+ <app-table :data="dataList" showIndex v-model:columns="tableColumns" :loading="loading">
|
|
|
+ <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="{ selectedRow, queryParams }" @closed="closeComponent"
|
|
|
+ v-if="componentId" />
|
|
|
+ </app-view>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
+import { shallowRef } from 'vue'
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
+import { useRequest } from '@/hooks/request'
|
|
|
+import { useDataFilter } from '@/hooks/datatable'
|
|
|
+import { orgReportQuery } from '@/services/api/report'
|
|
|
+import { useOperation } from '@/hooks/operation'
|
|
|
+import { useUserStore } from '@/stores'
|
|
|
+import AppTable from '@pc/components/base/table/index.vue'
|
|
|
+import AppFilter from '@pc/components/base/table-filter/index.vue'
|
|
|
+import AppPagination from '@pc/components/base/pagination/index.vue'
|
|
|
+
|
|
|
+const queryParams = shallowRef<Model.OrgReportQueryReq>()
|
|
|
+const { filterOptons, getQueryParams } = useDataFilter<Model.OrgReportQueryReq>()
|
|
|
+const userStore = useUserStore()
|
|
|
+
|
|
|
+const { componentMap, componentId, selectedRow, closeComponent } = useOperation<Model.OrgReportQueryReq>({
|
|
|
+ onClose: () => onSearch()
|
|
|
+})
|
|
|
+
|
|
|
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(orgReportQuery, {
|
|
|
+ params: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ orgztypes: userStore.userInfo.orgztypes
|
|
|
+ },
|
|
|
+ onError: (err) => {
|
|
|
+ ElMessage.error(err)
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
+ { field: 'cycleTime', label: '日期' },
|
|
|
+ { field: 'accountName', label: '经纪会员' },
|
|
|
+ { field: 'investorTotalNum', label: '交易商开户数量' },
|
|
|
+ { field: 'investorTrialNum', label: '交易商开户待初审数量' },
|
|
|
+ { field: 'investorRetrialNum', label: '交易商开户待复审数量' },
|
|
|
+ { field: 'investorAmount', label: '期末余额' },
|
|
|
+ { field: 'investorusedmargin', label: '占用保证金' },
|
|
|
+ { field: 'investorClosePl', label: '转让损益' },
|
|
|
+ { field: 'investorReckonPl', label: '结算损益' },
|
|
|
+ { field: 'investorBuyDeliveryAmount', label: '交收金额' },
|
|
|
+ { field: 'investorBuyTradeQty', label: '买交易数量' },
|
|
|
+ { field: 'investorSellTradeQty', label: '卖交易数量' },
|
|
|
+ { field: 'investorBuyHoldQty', label: '买持仓数量' },
|
|
|
+ { field: 'investorSellHoldQty', label: '卖持仓数量' }
|
|
|
+])
|
|
|
+
|
|
|
+filterOptons.buttonList = [
|
|
|
+ { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() },
|
|
|
+ { lable: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
|
|
|
+]
|
|
|
+
|
|
|
+const onSearch = (clear = false) => {
|
|
|
+ const qs = getQueryParams(clear)
|
|
|
+ run(qs)
|
|
|
+}
|
|
|
+
|
|
|
</script>
|