|
|
@@ -1,7 +1,172 @@
|
|
|
<!-- 查询管理-其它查询-交易商资金查询 -->
|
|
|
<template>
|
|
|
- <app-view></app-view>
|
|
|
+ <app-view>
|
|
|
+ <template #header>
|
|
|
+ <app-filter :option="filterOption" :rules="filterRules">
|
|
|
+ <template #accountid="{ item }">
|
|
|
+ <el-form-item :label="item.label" prop="accountid">
|
|
|
+ <app-select-account v-model="item.value" @change="onAccountChange" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ <template #memberid="{ item }">
|
|
|
+ <el-form-item :label="item.label" prop="memberid">
|
|
|
+ <app-select-member v-model="item.value" usertype="2" :placeholder="t('investor.custom.group.edit.tips1')" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </app-filter>
|
|
|
+ <div class="report-account__info" v-if="selectedAccount">
|
|
|
+ <span>{{ t('report.account.accountid1') }}{{ selectedAccount.relatedname }}</span>
|
|
|
+ <span>{{ t('report.account.accountid') }}{{ selectedAccount.accountid }}</span>
|
|
|
+ <span>{{ t('report.account.invloginids') }}{{ selectedAccount.invloginids }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <app-table :data="dataList" :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="{ record, queryParams }" @closed="closeComponent"
|
|
|
+ v-if="componentId" />
|
|
|
+ </app-view>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
+import { ref, shallowRef } from 'vue'
|
|
|
+import { ElMessage, FormRules } from 'element-plus'
|
|
|
+import { useDataFilter } from '@/hooks/datatable-v2'
|
|
|
+import { useRequest } from '@/hooks/request'
|
|
|
+import { useOperation } from '@/hooks/operation'
|
|
|
+import { queryinvestor } from '@/services/api/order'
|
|
|
+import { i18n } from '@/stores'
|
|
|
+import AppTable from '@pc/components/base/table/index.vue'
|
|
|
+import AppPagination from '@pc/components/base/pagination/index.vue'
|
|
|
+import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
|
|
|
+import AppSelectAccount from '@pc/components/modules/select-account/index.vue'
|
|
|
+import AppSelectMember from '@pc/components/modules/select-member/index.vue'
|
|
|
+import { parsePercent } from '@/filters'
|
|
|
+
|
|
|
+const { global: { t } } = i18n
|
|
|
+const selectedAccount = shallowRef<Model.TAAccountChildrenSelectRsp>()
|
|
|
+
|
|
|
+const { componentMap, componentId, record, closeComponent } = useOperation<Model.investorReq>({
|
|
|
+ onClose: () => onSearch()
|
|
|
+})
|
|
|
+
|
|
|
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryinvestor, {
|
|
|
+ manual: true,
|
|
|
+ params: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20
|
|
|
+ },
|
|
|
+ onError: (err) => {
|
|
|
+ ElMessage.error(err)
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const tableColumns = ref<Model.TableColumn[]>([
|
|
|
+ { field: 'accountid', label: '资金账号' },
|
|
|
+ { field: 'accountcodename', label: '机构名称' },
|
|
|
+ { field: 'balance', label: '期初余额' },
|
|
|
+ { field: 'currentbalance', label: '期末余额' },
|
|
|
+ { field: 'inamount', label: '今日入金' },
|
|
|
+ { field: 'outamount', label: '今日出金' },
|
|
|
+ { field: 'closepl', label: '转让损益' },
|
|
|
+ { field: 'floatpl', label: '浮动损益' },
|
|
|
+ { field: 'freezecharge', label: '冻结手续费' },
|
|
|
+ { field: 'paycharge', label: '手续费' },
|
|
|
+ { field: 'otherpay', label: '其他支出' },
|
|
|
+ { field: 'otherincome', label: '其他收入' },
|
|
|
+ { field: 'freezemargin', label: '冻结保证金' },
|
|
|
+ { field: 'usedmargin', label: '占用保证金' },
|
|
|
+ { field: 'otherfreezemargin', label: '其他冻结' },
|
|
|
+ { field: 'outamountfreeze', label: '出金冻结' },
|
|
|
+ { field: 'avaiablemoney', label: '可用资金' },
|
|
|
+ { field: 'avaiableoutmoney', label: '可出资金' },
|
|
|
+ { field: 'floatnetvalue', label: '当前净值' },
|
|
|
+ { field: 'cur_risk_rate', label: '风险率', formatValue: (val) => parsePercent(val) },
|
|
|
+ { field: 'operate', label: 'common.operate', fixed: 'right' }
|
|
|
+])
|
|
|
+
|
|
|
+const onAccountChange = (item?: Model.TAAccountChildrenSelectRsp) => {
|
|
|
+ selectedAccount.value = item
|
|
|
+}
|
|
|
+
|
|
|
+// 表单验证规则
|
|
|
+const filterRules: FormRules = {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilter<Model.investorReq>({
|
|
|
+ filters: [
|
|
|
+ {
|
|
|
+ field: 'accountcode',
|
|
|
+ label: '交易商',
|
|
|
+ placeholder: '请输入',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'memberid',
|
|
|
+ label: '所属会员',
|
|
|
+ placeholder: '请输入',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'sortfield',
|
|
|
+ label: '排序',
|
|
|
+ required: true,
|
|
|
+ value: 0,
|
|
|
+ options: () => [
|
|
|
+ { label: '不限', value: 0 },
|
|
|
+ { label: '期末余额', value: 1 },
|
|
|
+ { label: '期初余额', value: 2 },
|
|
|
+ { label: '今日入金', value: 3 },
|
|
|
+ { label: '今日出金', value: 4 },
|
|
|
+ { label: '转让损益', value: 5 },
|
|
|
+ { label: '手续费', value: 6 }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'sorttype',
|
|
|
+ value: 0,
|
|
|
+ options: () => [
|
|
|
+ { label: '降序', value: 1 },
|
|
|
+ { label: '升序', value: 0 }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'accountid',
|
|
|
+ label: '资金账户',
|
|
|
+ placeholder: '请输入',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'loginid',
|
|
|
+ label: '登录账号',
|
|
|
+ placeholder: '请输入',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'parentarea',
|
|
|
+ label: '所属机构',
|
|
|
+ placeholder: '请输入',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ buttons: [
|
|
|
+ { label: t('operation.search'), className: 'el-button--primary', onClick: () => onSearch() },
|
|
|
+ { label: t('operation.reset'), className: 'el-button--primary', validateEvent: false, onClick: () => onReset() }
|
|
|
+ ]
|
|
|
+})
|
|
|
+
|
|
|
+// 处理请求参数
|
|
|
+const processRequiredParams = () => {
|
|
|
+ const qs = getQueryParams()
|
|
|
+ return qs
|
|
|
+}
|
|
|
+
|
|
|
+const onSearch = () => {
|
|
|
+ const qs = processRequiredParams()
|
|
|
+ run(qs)
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const onReset = () => {
|
|
|
+ resetFilters()
|
|
|
+}
|
|
|
</script>
|