|
|
@@ -3,12 +3,11 @@
|
|
|
<app-view>
|
|
|
<template #header>
|
|
|
<app-filter :option="filterOption" :rules="filterRules">
|
|
|
- <template #reckondate>
|
|
|
- <el-form-item :label="t('report.investor.reckondate')" prop="reckondate">
|
|
|
+ <template #reckondate="{ item }">
|
|
|
+ <el-form-item :label="item.label" prop="date">
|
|
|
<el-date-picker :type="dateType" v-model="dateValue" :format="dateFormat"
|
|
|
:value-format="dateFormat" :placeholder="t('common.pleasechoice')"
|
|
|
- :start-placeholder="t('common.start')" :end-placeholder="t('common.end')"
|
|
|
- @change="onDateChange" />
|
|
|
+ :start-placeholder="t('common.start')" :end-placeholder="t('common.end')" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<template #quarter="{ item }">
|
|
|
@@ -35,16 +34,22 @@
|
|
|
{{ (item.value = undefined) }}
|
|
|
</template>
|
|
|
</template>
|
|
|
+ <!-- 会员代码 -->
|
|
|
+ <template #memberid="{ item }">
|
|
|
+ <el-form-item :label="item.label">
|
|
|
+ <app-select-member v-model="item.value" :params="{ usertype: '2' }" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
<template #inamount>
|
|
|
<el-form-item :label="t('report.investor.inamount')" prop="inamount">
|
|
|
<el-input-number v-model="queryParams.inamount" :min="0"
|
|
|
- :placeholder="t('report.investor.tips1')" />
|
|
|
+ :placeholder="t('report.investor.tips1')" style="width: 240px;" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<template #outamount>
|
|
|
<el-form-item :label="t('report.investor.outamount')" prop="outamount">
|
|
|
<el-input-number v-model="queryParams.outamount" :min="0"
|
|
|
- :placeholder="t('report.investor.tips1')" />
|
|
|
+ :placeholder="t('report.investor.tips1')" style="width: 240px;" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<template #roles>
|
|
|
@@ -92,14 +97,14 @@ import AppTable from '@pc/components/base/table/index.vue'
|
|
|
import AppPagination from '@pc/components/base/pagination/index.vue'
|
|
|
import AppOperation from '@pc/components/base/operation/index.vue'
|
|
|
import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
|
|
|
+import AppSelectMember from '@pc/components/modules/select-member/index.vue'
|
|
|
|
|
|
const { global: { t } } = i18n
|
|
|
const accountstatusEnum = useEnum('accountstatus') // 机构状态
|
|
|
-const dateValue = shallowRef<string[] | null>([])
|
|
|
-
|
|
|
-const roles = ref<string[] | null>([])
|
|
|
+const dateValue = shallowRef()
|
|
|
+const roles = ref<string[]>([])
|
|
|
|
|
|
-const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.InvestorReportReq>({
|
|
|
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.InvestorReportRsp>({
|
|
|
onClose: () => onSearch()
|
|
|
})
|
|
|
|
|
|
@@ -108,7 +113,8 @@ const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(invest
|
|
|
params: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 20,
|
|
|
- usertype: 2
|
|
|
+ usertype: 2,
|
|
|
+ flag: 2
|
|
|
},
|
|
|
onError: (err) => {
|
|
|
ElMessage.error(err)
|
|
|
@@ -144,31 +150,6 @@ const dateFormat = computed(() => {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-// 选择类型
|
|
|
-const onTypeChange = (value: number) => {
|
|
|
- if (value === ReportType.Week || value === ReportType.Quarter) {
|
|
|
- dateValue.value = []
|
|
|
- } else {
|
|
|
- dateValue.value = []
|
|
|
- }
|
|
|
- queryParams.value.reckondate = undefined
|
|
|
- queryParams.value.reckondateend = undefined
|
|
|
- queryParams.value.quarter = undefined
|
|
|
- queryParams.value.quarterend = undefined
|
|
|
-}
|
|
|
-
|
|
|
-// 选择日期
|
|
|
-const onDateChange = () => {
|
|
|
- if (Array.isArray(dateValue.value)) {
|
|
|
- const [startDate, endDate] = dateValue.value
|
|
|
- queryParams.value.reckondate = startDate
|
|
|
- queryParams.value.reckondateend = endDate
|
|
|
- } else {
|
|
|
- queryParams.value.reckondate = dateValue.value ?? ''
|
|
|
- queryParams.value.reckondateend = dateValue.value ?? ''
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
const tableColumns = ref<Model.TableColumn[]>([
|
|
|
{ field: 'reckondate', label: 'report.institution.reckondate' },
|
|
|
{ field: 'accountid', label: 'report.institution.accountid' },
|
|
|
@@ -188,13 +169,15 @@ const tableColumns = ref<Model.TableColumn[]>([
|
|
|
{ field: 'outamountfreeze', label: 'report.institution.outamountfreeze' },
|
|
|
{ field: 'avaiablemoney', label: 'report.institution.avaiablemoney' },
|
|
|
{ field: 'avaiableoutmoney', label: 'report.institution.avaiableoutmoney' },
|
|
|
- { field: 'floatnetvalues', label: 'report.institution.floatnetvalues' },
|
|
|
+ { field: 'floatnetvalue', label: 'report.institution.floatnetvalues' },
|
|
|
])
|
|
|
|
|
|
// 表单验证规则
|
|
|
const filterRules: FormRules = {
|
|
|
- reckondate: [{ required: true }],
|
|
|
- reckondateend: [{ required: true }],
|
|
|
+ date: [{
|
|
|
+ required: true,
|
|
|
+ validator: () => !!dateValue.value?.length
|
|
|
+ }]
|
|
|
}
|
|
|
|
|
|
const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilter<Model.InvestorReportReq>({
|
|
|
@@ -202,12 +185,14 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
|
|
|
{
|
|
|
field: 'cycletype',
|
|
|
label: t('report.institution.cycletype'),
|
|
|
- required: true,
|
|
|
+ value: 0,
|
|
|
options: () => getReportTypeList(),
|
|
|
- onChange: () => onTypeChange
|
|
|
+ onChange: () => dateValue.value = []
|
|
|
},
|
|
|
{
|
|
|
- field: 'reckondate'
|
|
|
+ field: 'reckondate',
|
|
|
+ label: t('report.investor.reckondate'),
|
|
|
+ required: true
|
|
|
},
|
|
|
{
|
|
|
field: 'quarter',
|
|
|
@@ -220,6 +205,10 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
|
|
|
required: true
|
|
|
},
|
|
|
{
|
|
|
+ field: 'memberid',
|
|
|
+ label: '会员代码'
|
|
|
+ },
|
|
|
+ {
|
|
|
field: 'inamount',
|
|
|
label: t('report.institution.inamount'),
|
|
|
placeholder: t('report.institution.tips1')
|
|
|
@@ -248,10 +237,17 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
|
|
|
// 处理请求参数
|
|
|
const processRequiredParams = () => {
|
|
|
const qs = getQueryParams()
|
|
|
- const [startDate, endDate] = dateValue.value || []
|
|
|
- qs.reckondate = startDate
|
|
|
- qs.reckondateend = endDate
|
|
|
- qs.roles = roles.value?.join(',')
|
|
|
+ qs.roles = roles.value.join(',')
|
|
|
+
|
|
|
+ if (Array.isArray(dateValue.value)) {
|
|
|
+ const [startDate, endDate] = dateValue.value || []
|
|
|
+ qs.reckondate = startDate
|
|
|
+ qs.reckondateend = endDate
|
|
|
+ } else {
|
|
|
+ qs.reckondate = dateValue.value
|
|
|
+ qs.reckondateend = dateValue.value
|
|
|
+ }
|
|
|
+
|
|
|
return qs
|
|
|
}
|
|
|
|
|
|
@@ -263,11 +259,11 @@ const onSearch = () => {
|
|
|
|
|
|
const onReset = () => {
|
|
|
dateValue.value = []
|
|
|
+ roles.value = []
|
|
|
resetFilters()
|
|
|
}
|
|
|
|
|
|
const openComponentOnClick = (code: string) => {
|
|
|
- queryParams.value = processRequiredParams()
|
|
|
openComponent(code)
|
|
|
}
|
|
|
</script>
|