huangbin 4 лет назад
Родитель
Сommit
a1a3cec6bb
2 измененных файлов с 24 добавлено и 4 удалено
  1. 1 1
      public/config/app.config.json
  2. 23 3
      src/common/setup/account/index.ts

+ 1 - 1
public/config/app.config.json

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://192.168.31.139:8080/cfg?key=test_139"
+    "apiUrl": "http://192.168.31.202:8080/cfg?key=test_202"
 }

+ 23 - 3
src/common/setup/account/index.ts

@@ -1,4 +1,9 @@
-import { getAccountTypeList, getCanUseMoney } from "@/services/bus/account";
+import { queryTableList } from "@/common/export/table";
+import { getAccountTypeList } from "@/services/bus/account";
+import { geLoginID_number } from "@/services/bus/login";
+import { getTaAccounts } from "@/services/go/TaAccount";
+import { GetTaAccountsReq, Taaccount } from "@/services/go/TaAccount/interface";
+import { useHazardRates } from "@/views/order/funding_information/components/funding_information_funding_summary/setup";
 import { UnwrapRef } from "vue";
 
 // 交易账号
@@ -12,9 +17,22 @@ export function useTaAccount<T extends { accountid: undefined | number }>(formSt
     function getSelectedAccount() {
         return accountList.find((e) => e.accountid === formState.accountid);
     }
+    const { canUseMoney: canUseMoney_, getHoldsList } = useHazardRates();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Taaccount>();
+    // 获取列表数据
+    const queryTableAction = () => {
+        const param: GetTaAccountsReq = {
+            loginID: Number(geLoginID_number()),
+        };
+        queryTable(getTaAccounts, param);
+        // 获取头寸
+        getHoldsList(loading)
+    };
+    queryTableAction()
     // 可用资金
     function canUseMoney() {
-        return getCanUseMoney(getSelectedAccount()!)
+        return canUseMoney_(getSelectedAccount()!)
     }
     // 处理内部资金账号
     function handleSelectedAccount() {
@@ -23,4 +41,6 @@ export function useTaAccount<T extends { accountid: undefined | number }>(formSt
         return item.taaccounttype === 2 ? item : list[0];
     }
     return { handleSelectedAccount, canUseMoney, getSelectedAccount, accountList };
-}
+}
+
+