浏览代码

修改报表

huangbin 4 年之前
父节点
当前提交
c247926901

+ 2 - 0
src/common/setup/table/interface.ts

@@ -94,7 +94,9 @@ export interface ButtonListKey {
 
     finance_report_finance: string; // 财务报表
     exposure_report_exposure: string; // 敞口报表
+    sum_pl_report_sum_pl: string; //汇总损益报表
     spot_report_spot: string; // 现货报表
+    future_report_future: string; // 期货报表
     inventory_report_warehouse: string; // 库存报表(仓库)
     inventory_report_inventory_category: string; // 库存报表(品类)
 

+ 1 - 0
src/views/report/exposure-report/list/exposure_report/index.vue

@@ -61,6 +61,7 @@ export default defineComponent({
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_exposure_report', // 表头key
             tableFilterKey: [], // 表格过滤字段
+            menuType: 'exposure_report_exposure', // 当前tab页对应的code
         };
         const {
             visible,

+ 1 - 0
src/views/report/finance-report/list/finance_report_finance/index.vue

@@ -61,6 +61,7 @@ export default defineComponent({
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_finance_report', // 表头key
             tableFilterKey: [], // 表格过滤字段
+            menuType: 'finance_report_finance', // 当前tab页对应的code
         };
         const {
             visible,

+ 1 - 0
src/views/report/future_report/list/future_report/index.vue

@@ -61,6 +61,7 @@ export default defineComponent({
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_futures_report', // 表头key
             tableFilterKey: [], // 表格过滤字段
+            menuType: 'sum_pl_report_sum_pl', // 当前tab页对应的code
         };
         const {
             visible,

+ 1 - 1
src/views/report/inventory-report/list/category/index.vue

@@ -62,7 +62,7 @@ export default defineComponent({
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_warehouse_category_report', // 表头key
             tableFilterKey: [], // 表格过滤字段
-            menuType: 'inventory_report_inventory_category',
+            menuType: 'inventory_report_inventory_category', // 当前tab页对应的code
         };
 
         const {

+ 1 - 1
src/views/report/inventory-report/list/warehouse/index.vue

@@ -62,7 +62,7 @@ export default defineComponent({
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_warehouse_report', // 表头key
             tableFilterKey: [], // 表格过滤字段
-            menuType: 'inventory_report_warehouse',
+            menuType: 'inventory_report_warehouse', // 当前tab页对应的code
         };
         const {
             visible,

+ 1 - 35
src/views/report/setup.ts

@@ -1,11 +1,8 @@
-import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo'
 import { getUsrId } from '@/services/bus/user'
-import { FinanceReportReq } from "@/services/go/ermcp/report/interface"
-import { getDecimalsNum } from '@/utils/number'
 import moment, { Moment } from "moment"
 import { ref, SetupContext } from "vue"
 import { reportCycleType, reportCyleTimeType } from "./enum"
-import { TypeAndTime, Value } from "./interface"
+import { Value } from "./interface"
 
 export function handleReprotType(context: SetupContext) {
     // 选中的周期类型
@@ -83,34 +80,3 @@ export function handleInitTypeAndTime() {
     return { getInitTime, getInitType }
 }
 
-/**
- * 获取表格列表数据
- * @param type
- * @returns
- */
-export function queryTableList<T>(fn: Function) {
-    // 加载状态
-    const loading = ref<boolean>(false);
-    // 表格数据
-    const tableList = ref<T[]>([]);
-    function queryTable(value: TypeAndTime, otherParam?: object) {
-        const param: FinanceReportReq = {
-            querytype: 1,
-            ...value
-        }
-        if (otherParam) {
-            Object.assign(param, otherParam)
-        }
-        queryResultLoadingAndInfo(fn, loading, param).then(res => {
-            const result = res?.map((e: T, i: number) => {
-                for (const item in e) {
-                    // 折中方案:处理浮点失真,如果页面卡顿,则需要服务处理
-                    e[item] = getDecimalsNum(e[item])
-                }
-                return { ...e, key: String(i) };
-            });
-            tableList.value = result ? result : []
-        })
-    }
-    return { loading, tableList, queryTable }
-}

+ 1 - 0
src/views/report/spot-report/list/spot_report/index.vue

@@ -61,6 +61,7 @@ export default defineComponent({
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_spot_report', // 表头key
             tableFilterKey: [], // 表格过滤字段
+            menuType: 'spot_report_spot', // 当前tab页对应的code
         };
         const {
             visible,

+ 1 - 0
src/views/report/sum_pl_report/list/sum_pl_report/index.vue

@@ -60,6 +60,7 @@ export default defineComponent({
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_aggregate_profit_and_loss', // 表头key
             tableFilterKey: [], // 表格过滤字段
+            menuType: 'sum_pl_report_sum_pl', // 当前tab页对应的code
         };
         const {
             visible,