li.shaoyi 7 bulan lalu
induk
melakukan
5c906eaad6

+ 1 - 1
public/locales/zh-CN.json

@@ -254,7 +254,7 @@
         "orderindex": "序号",
         "pleaseenter": "请输入",
         "pleaseenterkeywords": "请输入关键字",
-        "pleasechoiceorenter": "请选择或输入",
+        "pleasechoiceorenter": "请选择或搜索",
         "pleasechoice": "请选择",
         "operate": "操作",
         "current": "当前",

+ 43 - 47
src/packages/pc/views/report/institution/index.vue

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

+ 9 - 2
src/packages/pc/views/report/instprofitshare/components/details/index.vue

@@ -6,6 +6,13 @@
             <template #accountid="{ row }">
                 {{ `${row.relateduserid}/${row.accountname}/${row.accountid}` }}
             </template>
+            <!-- 分配值 -->
+            <template #dividevalue="{ row }">
+                <span v-if="row.dividevalue">
+                    {{ row.dividetype === 1 ? parsePercent(row.dividevalue) : row.dividevalue }}
+                </span>
+                <span v-else>{{ handleNoneValue() }}</span>
+            </template>
             <template #footer>
                 <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
                     @change="getDataList" />
@@ -20,7 +27,7 @@
 <script lang="ts" setup>
 import { shallowRef, PropType, onMounted } from 'vue'
 import { ElMessage } from 'element-plus'
-import { handleNumberValue } from '@/filters'
+import { handleNoneValue, parsePercent } from '@/filters'
 import { useEnum } from '@/hooks/enum'
 import { ReportType } from '@/constants/report'
 import { useRequest } from '@/hooks/request'
@@ -72,7 +79,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'accountid', label: 'report.instprofitshare.details.accountid', width: 300 },
     { field: 'feeamount', label: 'report.instprofitshare.details.feeamount' },
     { field: 'dividetype', label: 'report.instprofitshare.details.dividetype', formatValue: (val) => dividetypeEnum.getEnumTypeName(val) },
-    { field: 'dividevalue', label: 'report.instprofitshare.details.dividevalue', formatValue: (val) => handleNumberValue(val) },
+    { field: 'dividevalue', label: 'report.instprofitshare.details.dividevalue' },
     { field: 'divideamount', label: 'report.instprofitshare.details.divideamount' }
 ])
 

+ 10 - 7
src/packages/pc/views/report/investor/index.vue

@@ -12,9 +12,11 @@
                 </el-form-item>
                 <el-form-item :label="t('report.investor.reckondate')" prop="reckondate">
                     <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" />
+                        :placeholder="t('common.pleasechoice')" :start-placeholder="t('common.start')"
+                        :end-placeholder="t('common.end')" @change="onDateChange" />
                 </el-form-item>
-                <el-form-item :label="t('report.investor.quarter')" prop="quarter" v-if="queryParams.cycletype === ReportType.Quarter">
+                <el-form-item :label="t('report.investor.quarter')" prop="quarter"
+                    v-if="queryParams.cycletype === ReportType.Quarter">
                     <el-select v-model="queryParams.quarter" @change="onQuarterChange">
                         <template v-for="item in getQuarterList()" :key="item.value">
                             <el-option :label="item.label" :value="item.value" />
@@ -34,12 +36,12 @@
                     <el-input v-model="queryParams.brokerid" :placeholder="t('report.investor.tips5')" />
                 </el-form-item>
                 <el-form-item :label="t('report.investor.inamount')" prop="inamount">
-                    <el-input-number v-model="queryParams.inamount" :min="0" controls-position="right"
-                        :placeholder="t('report.investor.tips1')" style="width: 240px;" />
+                    <el-input-number v-model="queryParams.inamount" :min="0" :placeholder="t('report.investor.tips1')"
+                        style="width: 240px;" />
                 </el-form-item>
                 <el-form-item :label="t('report.investor.outamount')" prop="outamount">
-                    <el-input-number v-model="queryParams.outamount" :min="0" controls-position="right"
-                        :placeholder="t('report.investor.tips1')" style="width: 240px;" />
+                    <el-input-number v-model="queryParams.outamount" :min="0" :placeholder="t('report.investor.tips1')"
+                        style="width: 240px;" />
                 </el-form-item>
                 <el-form-item>
                     <el-button type="primary" @click="onSearch(false)">{{ t('operation.search') }}</el-button>
@@ -90,7 +92,8 @@ const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(invest
     manual: true,
     params: {
         pageNum: 1,
-        pageSize: 20
+        pageSize: 20,
+        flag: 0
     },
     onError: (err) => {
         ElMessage.error(err)

+ 1 - 0
src/types/model/report.d.ts

@@ -406,6 +406,7 @@ declare namespace Model {
         balance: number
         // 转让损益
         closepl: number
+        floatnetvalue: number; // 当前净值
         // 期末余额
         currentbalance: number
         // 浮动损益