|
|
@@ -1,75 +1,95 @@
|
|
|
<template>
|
|
|
- <div style="background: red; color: #fff; padding: 5px 0">待修改</div>
|
|
|
- <!-- 期货账户 -->
|
|
|
- <div class="account_info_futures account_info_container" :loading="loading">
|
|
|
- <filterCustomTable @search="search"></filterCustomTable>
|
|
|
- <div class="tltLeft">
|
|
|
- <span class="blue">
|
|
|
- <svg class="icon svg-icon" aria-hidden="true">
|
|
|
- <use xlink:href="#icon-shuzhuangtu" />
|
|
|
- </svg>
|
|
|
- {{ getUserName() }}
|
|
|
- </span>
|
|
|
- <mtp-table-button :buttons="firstBtn" @click="openComponent" />
|
|
|
- </div>
|
|
|
- <div class="a-collapse-container">
|
|
|
- <a-collapse class="spotCollapse" v-for="(item, i) in tableList" :key="i + '11'" :bordered="false">
|
|
|
- <template #expandIcon="props">
|
|
|
- <svg class="icon svg-icon" aria-hidden="true" v-if="props.isActive == 0">
|
|
|
- <use xlink:href="#icon-shouqi1" />
|
|
|
- </svg>
|
|
|
- <svg class="icon svg-icon" aria-hidden="true" v-else>
|
|
|
- <use xlink:href="#icon-shouqi2" />
|
|
|
- </svg>
|
|
|
- </template>
|
|
|
- <a-collapse-panel>
|
|
|
- <template #header>
|
|
|
- <a-row class="headRow">
|
|
|
- <a-col :span="12"> {{ item.mainAcc.accountname }} {{ '-' + item.mainAcc.hedgeaccountcode }} ({{ item.subacclist.length }}){{ item.mainAcc.fcname }} </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <!-- <BtnList :btnList="secondBtn" @onClick="secondeClick(item)" /> -->
|
|
|
- <mtp-table-button :buttons="secondBtn" :record="item" @click="openComponent" />
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </template>
|
|
|
- <a-collapse class="futureCollapse" accordion :bordered="false">
|
|
|
- <a-collapse-panel :show-arrow="false" v-for="(sub, i) in item.subacclist" :key="i + '11'">
|
|
|
- <template #header>
|
|
|
- <a-row class="contRow">
|
|
|
- <a-col :span="12">{{ sub.accountname }}-{{ sub.accountid }}</a-col>
|
|
|
- <a-col :span="12">{{ getTaAccountStatus(sub.tradestatus) }}</a-col>
|
|
|
- </a-row>
|
|
|
- </template>
|
|
|
- <!-- <BtnList :btnList="getBtnList(sub.tradestatus)" @onClick="thirdClick(item, sub)" /> -->
|
|
|
- <mtp-table-button :buttons="thirdBtn" :record="sub" @click="openComponent" />
|
|
|
- </a-collapse-panel>
|
|
|
- </a-collapse>
|
|
|
- </a-collapse-panel>
|
|
|
- </a-collapse>
|
|
|
- </div>
|
|
|
- <!-- <Add @refresh="queryTable" />
|
|
|
- <AddChild :selectedData="firstData" :userList="userList" :marginList="marginList" :feeList="feeList" @updateTrader="queryUserList" @refresh="queryTable" />
|
|
|
- <Modify :selectedData="firstData" @refresh="queryTable" />
|
|
|
- <ModifyChild @refresh="queryTable" :userList="userList" :marginList="marginList" :feeList="feeList" :secondeData="secondeData" :selectedData="firstData" />
|
|
|
- <Detail :selectedData="firstData" :secondeData="secondeData" :userList="userList" :marginList="marginList" :feeList="feeList" />
|
|
|
- <Cancel @refresh="queryTable" :userList="userList" :marginList="marginList" :feeList="feeList" :secondeData="secondeData" :selectedData="firstData" />
|
|
|
- <Credit @refresh="queryTable" :selectedData="firstData" :secondeData="secondeData" /> -->
|
|
|
- <component :is="componentId" v-if="componentId" :selectedData="firstData" :secondeData="secondeData" :userList="userList" :marginList="marginList" :feeList="feeList" @update="queryUserList" @cancel="closeComponent"></component>
|
|
|
+ <div style="background: red; color: #fff; padding: 5px 0">待修改</div>
|
|
|
+ <!-- 期货账户 -->
|
|
|
+ <div class="account_info_futures account_info_container"
|
|
|
+ :loading="loading">
|
|
|
+ <filterCustomTable @search="search"></filterCustomTable>
|
|
|
+ <div class="tltLeft">
|
|
|
+ <span class="blue">
|
|
|
+ <svg class="icon svg-icon"
|
|
|
+ aria-hidden="true">
|
|
|
+ <use xlink:href="#icon-shuzhuangtu" />
|
|
|
+ </svg>
|
|
|
+ {{ getUserName() }}
|
|
|
+ </span>
|
|
|
+ <mtp-table-button :buttons="firstBtn"
|
|
|
+ @click="openComponent" />
|
|
|
</div>
|
|
|
+ <div class="a-collapse-container">
|
|
|
+ <a-collapse class="spotCollapse"
|
|
|
+ v-for="(item, i) in tableList"
|
|
|
+ :key="i + '11'"
|
|
|
+ :bordered="false">
|
|
|
+ <template #expandIcon="props">
|
|
|
+ <svg class="icon svg-icon"
|
|
|
+ aria-hidden="true"
|
|
|
+ v-if="props.isActive == 0">
|
|
|
+ <use xlink:href="#icon-shouqi1" />
|
|
|
+ </svg>
|
|
|
+ <svg class="icon svg-icon"
|
|
|
+ aria-hidden="true"
|
|
|
+ v-else>
|
|
|
+ <use xlink:href="#icon-shouqi2" />
|
|
|
+ </svg>
|
|
|
+ </template>
|
|
|
+ <a-collapse-panel>
|
|
|
+ <template #header>
|
|
|
+ <a-row class="headRow">
|
|
|
+ <a-col :span="12"> {{ item.mainAcc.accountname }}
|
|
|
+ {{ '-' + item.mainAcc.hedgeaccountcode }}
|
|
|
+ ({{ item.subacclist.length }}){{ item.mainAcc.fcname }} </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <mtp-table-button :buttons="secondBtn"
|
|
|
+ :record="item"
|
|
|
+ @click="openComponent" />
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </template>
|
|
|
+ <a-collapse class="futureCollapse"
|
|
|
+ accordion
|
|
|
+ :bordered="false">
|
|
|
+ <a-collapse-panel :show-arrow="false"
|
|
|
+ v-for="(sub, i) in item.subacclist"
|
|
|
+ :key="i + '11'">
|
|
|
+ <template #header>
|
|
|
+ <a-row class="contRow">
|
|
|
+ <a-col :span="12">{{ sub.accountname }}-{{ sub.accountid }}</a-col>
|
|
|
+ <a-col :span="12">{{ getTaAccountStatus(sub.tradestatus) }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </template>
|
|
|
+ <mtp-table-button :buttons="thirdBtn"
|
|
|
+ :record="sub"
|
|
|
+ @click="openSecondBtnAction" />
|
|
|
+ </a-collapse-panel>
|
|
|
+ </a-collapse>
|
|
|
+ </a-collapse-panel>
|
|
|
+ </a-collapse>
|
|
|
+ </div>
|
|
|
+ <component :is="componentId"
|
|
|
+ v-if="componentId"
|
|
|
+ :selectedData="selectedData"
|
|
|
+ :firstSelectedData="firstSelectedData"
|
|
|
+ :userList="userList"
|
|
|
+ :marginList="marginList"
|
|
|
+ :feeList="feeList"
|
|
|
+ @update="queryUserList"
|
|
|
+ @cancel="closeComponent"></component>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
+import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
import { defineAsyncComponent, defineComponent, MtpTableButton } from '@/common/export/commonTable';
|
|
|
import { initData } from '@/common/methods';
|
|
|
+import { handleModalComponent } from '@/common/setup/asyncComponent';
|
|
|
+import { getTableButton } from '@/common/setup/table/button';
|
|
|
+import { handlerManagerList } from '@/common/setup/user';
|
|
|
+import { getUserName } from '@/services/bus/user';
|
|
|
+import { ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
|
|
|
import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
|
|
|
+import { ref, Ref } from 'vue';
|
|
|
import { getTaAccountStatus } from '../setup';
|
|
|
import { handleTradeTemplate, queryTableList } from './setup';
|
|
|
-import { getUserName } from '@/services/bus/user';
|
|
|
-import { ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
|
|
|
-import { ref, Ref } from 'vue';
|
|
|
-import { handlerManagerList } from '@/common/setup/user';
|
|
|
-import { handleModalComponent } from '@/common/setup/asyncComponent';
|
|
|
-import { getTableButton } from '@/common/setup/table/button';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'account_info_futures',
|
|
|
@@ -100,15 +120,7 @@ export default defineComponent({
|
|
|
queryUserList();
|
|
|
queryTemplate();
|
|
|
});
|
|
|
- const firstData = ref<ErmcpTaAccountEx | null>(null);
|
|
|
- const secondeData = ref<ErmcpTaAccountEx | null>(null);
|
|
|
- function secondeClick(item: ErmcpTaAccountEx) {
|
|
|
- firstData.value = item;
|
|
|
- }
|
|
|
- function thirdClick(item: ErmcpTaAccountEx, sub: ErmcpTaAccountEx) {
|
|
|
- firstData.value = item;
|
|
|
- secondeData.value = sub;
|
|
|
- }
|
|
|
+
|
|
|
function getBtnList(type: number) {
|
|
|
if (type === 1) {
|
|
|
// 1:正常
|
|
|
@@ -121,18 +133,28 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
// 弹窗选中的数据
|
|
|
- const selectedData = ref<ErmcpTaAccountEx>();
|
|
|
+ const selectedData = ref<ErmcpTaAccount>();
|
|
|
// 控制异步组件
|
|
|
- const { componentId, closeComponent, openComponent } = handleModalComponent<ErmcpTaAccountEx>(() => {}, selectedData as Ref<ErmcpTaAccountEx>);
|
|
|
+ const { componentId, closeComponent, openComponent } = handleModalComponent<ErmcpTaAccount>(() => {}, selectedData as Ref<ErmcpTaAccount>);
|
|
|
+ // 处理点击 二级按钮时候 选中的数据
|
|
|
+ // 一级 对应的选中数据
|
|
|
+ const firstSelectedData = ref<ErmcpTaAccountEx>();
|
|
|
+ // 二级按钮 打开,处理选中上一层数据
|
|
|
+ function openSecondBtnAction(item: BtnListType, second: ErmcpTaAccount) {
|
|
|
+ tableList.value.forEach((el) => {
|
|
|
+ el.subacclist.forEach((sub) => {
|
|
|
+ if (second.userid === sub.userid) {
|
|
|
+ firstSelectedData.value = el;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ openComponent(item, second);
|
|
|
+ }
|
|
|
|
|
|
// 查询
|
|
|
function search(value: any) {}
|
|
|
|
|
|
return {
|
|
|
- firstData,
|
|
|
- secondeData,
|
|
|
- secondeClick,
|
|
|
- thirdClick,
|
|
|
loading,
|
|
|
search,
|
|
|
tableList,
|
|
|
@@ -150,6 +172,9 @@ export default defineComponent({
|
|
|
componentId,
|
|
|
closeComponent,
|
|
|
openComponent,
|
|
|
+ selectedData,
|
|
|
+ firstSelectedData,
|
|
|
+ openSecondBtnAction,
|
|
|
};
|
|
|
},
|
|
|
});
|