huangbin hace 4 años
padre
commit
46ded6542b

+ 1 - 1
src/services/go/ermcp/finance-report/index.ts

@@ -50,7 +50,7 @@ export async function QueryFinancePayDayReport(tradedate: string): Promise<type.
  */
 export async function QueryFinanceMonthReport(tradedate: string): Promise<type.QueryFinanceMonthReportRsp[]> {
     const userid = getUsrId()
-    return commonSearch_go('/Ermcp/QryReportMonthFinance', { tradedate, userid }).catch(err => {
+    return commonSearch_go('/Ermcp/QryReportMonthFinance', { cycletime: tradedate, userid }).catch(err => {
         throw new Error(`查询财务月报表: ${err.message}`);
     });
 }

+ 9 - 13
src/services/go/ermcp/spot-report/index.ts

@@ -1,12 +1,8 @@
 /** ================================= 现货报表 ================================**/
-import APP from '@/services';
-import * as type from './interface';
+import { getUsrId } from '@/services/bus/user';
 import { commonSearch_go } from '@/services/go/index';
-import { QuerySpotDayReportReq } from './interface';
-import { QuerySpotDayReportDetailReq } from './interface';
-import { QuerySpotMonthReportReq } from './interface';
-import { QuerySpotMonthReportDetailReq } from './interface';
-import { QuerySpotPLReportReq } from './interface';
+import * as type from './interface';
+import { QuerySpotDayReportDetailReq, QuerySpotMonthReportDetailReq, QuerySpotMonthReportReq, QuerySpotPLReportReq } from './interface';
 /**
  * 查询现货损益报表
  * @param queryInfo 查询条件
@@ -22,15 +18,15 @@ export async function QuerySpotPLReport(queryInfo: QuerySpotPLReportReq): Promis
 
 /**
  * 查询现货报表
- * @param queryInfo 查询信息
+ * @param tradedate 交易日(格式:yyyyMMdd)
  * @returns 现货报表
  */
-export async function QuerySpotDayReport(queryInfo: QuerySpotDayReportReq): Promise<type.QuerySpotDayReportRsp[]> {
-    try {
-        return commonSearch_go('/Ermcp3/QryReportDaySpot', queryInfo);
-    } catch (err) {
+export async function QuerySpotDayReport(tradedate: string): Promise<type.QuerySpotDayReportRsp[]> {
+    const userid = getUsrId()
+    return commonSearch_go('/Ermcp3/QryReportDaySpot', { tradedate, userid }).catch(err => {
         throw new Error(`查询现货报表: ${err.message}`);
-    }
+    });
+
 }
 
 /**

+ 2 - 1
src/views/report/finance-report/list/finance_report_finance/setup.ts

@@ -29,9 +29,10 @@ export function queryTableList() {
                 break;
         }
         queryResultLoadingAndInfo(fn, loading, tradedate).then(res => {
-            tableList.value = res.map((e: QueryFinanceDayReportRsp, i: number) => {
+            const result = res?.map((e: QueryFinanceDayReportRsp, i: number) => {
                 return { ...e, key: String(i) };
             });
+            tableList.value = result ? result : []
         })
     }
     return { loading, tableList, queryTable }