huangbin vor 4 Jahren
Ursprung
Commit
4cd355028f

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

@@ -16,6 +16,8 @@ export function queryTableList<T>(ishandleFloatErr = false, num?: number) {
         console.log('表格数据查询参数:', param);
         return queryResultLoadingAndInfo(fn, loading, param)
             .then(res => {
+                if (!res) return []
+
                 tableList.value.length = 0;
                 const result = res.map((e: any, i: number) => {
                     // 统一把空字符转 --

+ 1 - 0
src/services/go/commonService/index.ts

@@ -94,6 +94,7 @@ export function GetPCMenus(): Promise<string> {
     const param = {
         loginID: Number(getLongTypeLoginID()),
         clientType: 0, // 终端类型,0:PC 1:Mobile
+        // name: getOem(),
     };
     return commonSearch_go('/Common/GetClientMenus', param)
         .then((res) => {

+ 4 - 4
src/services/go/ermcp/order/index.ts

@@ -19,7 +19,7 @@ import {
  */
 export function queryHisTradeDetail(req: QueryHisTradeDetailReq): Promise<QueryHisTradeDetailRsp[]> {
     const accountID = getSelectedAccountId()?.toString()
-    req.accountID = accountID as string
+    req.accountID = accountID
     return commonSearch_go('/Order/QueryHisTradeDetail', req).catch((err) => {
         throw new Error(`历史成交单查询(合约市场): ${err}`);
     });
@@ -32,7 +32,7 @@ export function queryHisTradeDetail(req: QueryHisTradeDetailReq): Promise<QueryH
  */
 export function queryHisTradeOrderDetail(req: QueryHisTradeOrderDetailReq): Promise<QueryHisTradeOrderDetailRsp[]> {
     const accountID = getSelectedAccountId()?.toString()
-    req.accountID = accountID as string
+    req.accountID = accountID
     return commonSearch_go('/Order/QueryHisTradeOrderDetail', req).catch((err) => {
         throw new Error(`历史委托单查询请求(合约市场): ${err}`);
     });
@@ -45,7 +45,7 @@ export function queryHisTradeOrderDetail(req: QueryHisTradeOrderDetailReq): Prom
  */
 export function queryTradeDetail(req: QueryTradeDetailReq): Promise<QueryTradeDetailRsp[]> {
     const accountID = getSelectedAccountId()?.toString()
-    req.accountID = accountID as string
+    req.accountID = accountID
     return commonSearch_go('/Order/QueryTradeDetail', req).catch((err) => {
         throw new Error(`成交单查询(合约市场): ${err}`);
     });
@@ -58,7 +58,7 @@ export function queryTradeDetail(req: QueryTradeDetailReq): Promise<QueryTradeDe
  */
 export function queryTradeOrderDetail(req: QueryTradeOrderDetailReq): Promise<QueryTradeOrderDetailRsp[]> {
     const accountID = getSelectedAccountId()?.toString()
-    req.accountID = accountID as string
+    req.accountID = accountID
     return commonSearch_go('/Order/QueryTradeOrderDetail', req).catch((err) => {
         throw new Error(`委托单查询请求(合约市场): ${err}`);
     });

+ 3 - 2
src/services/go/wrtrade/index.ts

@@ -271,9 +271,10 @@ export function queryWrOutInApply(): Promise<WrOutInApply[]> {
  * 查询交收 /WrTrade2/QueryWrDeliveryDetail
  * 资金账号id
  */
-export function queryWrDeliveryDetail(accountid: number): Promise<WrDeliveryDetail[]> {
+export function queryWrDeliveryDetail(): Promise<WrDeliveryDetail[]> {
+    const accountid = getSelectedAccountId()
     const userid = getUsrId()
-    return commonSearch_go('/WrTrade2/QueryWrDeliveryDetail', { userid, accountid}).catch((err) => {
+    return commonSearch_go('/WrTrade2/QueryWrDeliveryDetail', { userid, accountid }).catch((err) => {
         throw new Error(`查询交收: ${err}`);
     });
 }

+ 3 - 10
src/views/order/commodity_contract/components/commodity_contract_commission/index.vue

@@ -46,6 +46,7 @@ import { getOperateTypeEnumItemName, getOperateTypeName } from '@/common/constan
 import { formatTime } from '@/common/methods';
 import Bus from '@/utils/eventBus/index';
 import { expandIcon } from '@/common/setup/table/clolumn';
+import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
 
 export default defineComponent({
     name: enumOrderComponents.commodity_contract_commission,
@@ -57,22 +58,14 @@ export default defineComponent({
         const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
         // 获取列表数据
         const queryTableAction = () => {
-            const param: QueryAmountLogReq = {
-                accountID: getSelectedAccountId().toString(),
-            };
-
-            queryTable(queryAmountLog, param);
+            queryTable(queryTradeOrderDetail, {});
         };
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {
             queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_funding_info_log',
+            tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_commission',
             recordList: getRecordItemTab(),
         };
-        // 资金变化,重新加载数据
-        Bus.$on('moneyChangedNtf_UI', () => {
-            queryTableAction();
-        });
         return {
             ...handleComposeOrderTable<WrPerformancePlan>(param),
             loading,

+ 6 - 12
src/views/order/commodity_contract/components/commodity_contract_make_deal/index.vue

@@ -46,6 +46,8 @@ import { getOperateTypeEnumItemName, getOperateTypeName } from '@/common/constan
 import { formatTime } from '@/common/methods';
 import Bus from '@/utils/eventBus/index';
 import { expandIcon } from '@/common/setup/table/clolumn';
+import { queryTradeDetail } from '@/services/go/ermcp/order';
+import { QueryTradeDetailRsp } from '@/services/go/ermcp/order/interface';
 
 export default defineComponent({
     name: enumOrderComponents.commodity_contract_make_deal,
@@ -54,27 +56,19 @@ export default defineComponent({
     },
     setup() {
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
+        const { loading, tableList, queryTable } = queryTableList<QueryTradeDetailRsp>();
         // 获取列表数据
         const queryTableAction = () => {
-            const param: QueryAmountLogReq = {
-                accountID: getSelectedAccountId().toString(),
-            };
-
-            queryTable(queryAmountLog, param);
+            queryTable(queryTradeDetail, {});
         };
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {
             queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_funding_info_log',
+            tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_make_deal',
             recordList: getRecordItemTab(),
         };
-        // 资金变化,重新加载数据
-        Bus.$on('moneyChangedNtf_UI', () => {
-            queryTableAction();
-        });
         return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
+            ...handleComposeOrderTable<QueryTradeDetailRsp>(param),
             loading,
             tableList,
             formatTime,

+ 6 - 10
src/views/order/commodity_contract/components/commodity_contract_settlement/index.vue

@@ -34,8 +34,8 @@
 <script lang="ts">
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import { queryTableList, BtnList, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
-import { QueryPerformancePlan, queryWrTradeDetail } from '@/services/go/wrtrade';
-import { QueryPerformancePlanReq, WrPerformancePlan } from '@/services/go/wrtrade/interface';
+import { QueryPerformancePlan, queryWrDeliveryDetail, queryWrTradeDetail } from '@/services/go/wrtrade';
+import { QueryPerformancePlanReq, WrDeliveryDetail, WrPerformancePlan } from '@/services/go/wrtrade/interface';
 import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
@@ -54,19 +54,15 @@ export default defineComponent({
     },
     setup() {
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
+        const { loading, tableList, queryTable } = queryTableList<WrDeliveryDetail>();
         // 获取列表数据
         const queryTableAction = () => {
-            const param: QueryAmountLogReq = {
-                accountID: getSelectedAccountId().toString(),
-            };
-
-            queryTable(queryAmountLog, param);
+            queryTable(queryWrDeliveryDetail);
         };
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {
             queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_funding_info_log',
+            tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_settlement',
             recordList: getRecordItemTab(),
         };
         // 资金变化,重新加载数据
@@ -74,7 +70,7 @@ export default defineComponent({
             queryTableAction();
         });
         return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
+            ...handleComposeOrderTable<WrDeliveryDetail>(param),
             loading,
             tableList,
             formatTime,

+ 6 - 18
src/views/order/commodity_contract/components/commodity_contract_summary/index.vue

@@ -34,18 +34,14 @@
 <script lang="ts">
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import { queryTableList, BtnList, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
-import { QueryPerformancePlan, queryWrTradeDetail } from '@/services/go/wrtrade';
-import { QueryPerformancePlanReq, WrPerformancePlan } from '@/services/go/wrtrade/interface';
 import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
-import { queryAmountLog } from '@/services/go/TaAccount';
-import { QueryAmountLogReq } from '@/services/go/TaAccount/interface';
-import { getSelectedAccountId } from '@/services/bus/account';
 import { getOperateTypeEnumItemName, getOperateTypeName } from '@/common/constants/enumsName';
 import { formatTime } from '@/common/methods';
-import Bus from '@/utils/eventBus/index';
 import { expandIcon } from '@/common/setup/table/clolumn';
+import { queryTradePosition } from '@/services/go/ermcp/order';
+import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
 
 export default defineComponent({
     name: enumOrderComponents.commodity_contract_summary,
@@ -54,27 +50,19 @@ export default defineComponent({
     },
     setup() {
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
+        const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
         // 获取列表数据
         const queryTableAction = () => {
-            const param: QueryAmountLogReq = {
-                accountID: getSelectedAccountId().toString(),
-            };
-
-            queryTable(queryAmountLog, param);
+            queryTable(queryTradePosition);
         };
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {
             queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_funding_info_log',
+            tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_summary',
             recordList: getRecordItemTab(),
         };
-        // 资金变化,重新加载数据
-        Bus.$on('moneyChangedNtf_UI', () => {
-            queryTableAction();
-        });
         return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
+            ...handleComposeOrderTable<QueryTradePositionRsp>(param),
             loading,
             tableList,
             formatTime,