|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <!-- 过滤客户资料表格 -->
|
|
|
+ <!-- 报表通用过滤 -->
|
|
|
<div class="filterTable">
|
|
|
<div class="filter-custom-table">
|
|
|
<a-select label-in-value
|
|
|
@@ -22,6 +22,17 @@
|
|
|
@change="timeChange"
|
|
|
:format="dateFormat" />
|
|
|
</a-space>
|
|
|
+ <a-select label-in-value
|
|
|
+ class="conditionSelect"
|
|
|
+ style="width: 120px"
|
|
|
+ v-model:value="selectedUser"
|
|
|
+ @change="userChange"
|
|
|
+ placeholder="请选择报表类型">
|
|
|
+ <a-select-option v-for="item in userList"
|
|
|
+ :key="item.value">
|
|
|
+ {{item.lable}}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
<slot></slot>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -29,22 +40,46 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import FilterOption from '@/common/components/filter/index.vue';
|
|
|
-import { defineComponent } from 'vue';
|
|
|
+import { initData } from '@/common/methods';
|
|
|
+import { SelectOption } from '@/common/setup/filter/interface';
|
|
|
+import { handlerManagerList } from '@/common/setup/user';
|
|
|
+import { getUserId } from '@/services/bus/account';
|
|
|
+import { getUserName } from '@/services/bus/user';
|
|
|
+import { defineComponent, ref } from 'vue';
|
|
|
import { handleReprotType } from '../../setup';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'report-common-filter-table',
|
|
|
components: { FilterOption },
|
|
|
setup(props, context) {
|
|
|
- const { selectedReportType, reportType, reportTypeChange, isMonth, timeChange, dateFormat, time } = handleReprotType(context);
|
|
|
+ const { selectedReportType, reportType, reportTypeChange, isMonth, timeChange, dateFormat, time, selectedUser, userChange } = handleReprotType(context);
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
+ // 交易用户
|
|
|
+ const userList = ref<SelectOption[]>([]);
|
|
|
+ const { queryTable } = handlerManagerList(loading, 2);
|
|
|
+ initData(() => {
|
|
|
+ queryTable().then((res) => {
|
|
|
+ userList.value.length = 0;
|
|
|
+ userList.value.push({ value: getUserId(), lable: getUserName() });
|
|
|
+ res.forEach((e) => {
|
|
|
+ e.userlist.forEach((el) => {
|
|
|
+ // userList.value.push({ value: el.loginid, lable: `${el.loginname}-${el.logincode}` });
|
|
|
+ userList.value.push({ value: el.loginid, lable: el.loginname });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
return {
|
|
|
reportType,
|
|
|
selectedReportType,
|
|
|
dateFormat,
|
|
|
timeChange,
|
|
|
reportTypeChange,
|
|
|
+ selectedUser,
|
|
|
+ userChange,
|
|
|
isMonth,
|
|
|
time,
|
|
|
+ userList,
|
|
|
};
|
|
|
},
|
|
|
});
|