|
|
@@ -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 };
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+
|