huangbin 4 gadi atpakaļ
vecāks
revīzija
c0fa7b0d72

+ 24 - 12
src/views/information/account_info/compoments/add-child-futures/index.vue

@@ -8,16 +8,16 @@
            :maskClosable="false"
            width="890px">
     <template #footer>
-        <a-button key="submit"
-                  type="primary"
-                  :loading="loading"
-                  @click="cancel">取消
-        </a-button>
-        <a-button key="submit"
-                  type="primary"
-                  :loading="loading"
-                  @click="submit">新增
-        </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">取消
+      </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">新增
+      </a-button>
     </template>
     <a-form class="inlineForm"
             ref="formRef"
@@ -82,15 +82,17 @@
                 {{item.rolename}}
               </a-select-option>
             </a-select>
+            <a-buuton @click="addTrader">新增</a-buuton>
           </a-form-item>
         </a-col>
       </a-row>
     </a-form>
+    <AddTrader @refresh="queryTable" />
   </a-modal>
 </template>
 
 <script lang="ts">
-import { closeModal } from '@/common/setup/modal/index';
+import { closeModal, openModal } from '@/common/setup/modal/index';
 import { defineComponent, PropType, ref, watchEffect } from 'vue';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import {ErmcpBizGroupReq, HedgeOutMainConfigReq} from '@/services/proto/accountinfo/interface';
@@ -102,10 +104,13 @@ import { ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 import { handlerManagerList } from '@/common/setup/user';
 import {getLongTypeLoginID} from "@/services/bus/login";
 import {getUserId} from "@/services/bus/account";
+import AddTrader from '../add-traders/index.vue'
 
 export default defineComponent({
     name: 'account_info_futures_btn_add',
-    components: {},
+    components: {
+      AddTrader,
+    },
     props: {
         selectedData: {
             type: Object as PropType<ErmcpTaAccountEx>,
@@ -115,6 +120,8 @@ export default defineComponent({
     setup(props, context) {
         // 控制关闭弹窗
         const { visible, cancel } = closeModal('account_info_futures_btn_child_add');
+        // 新增交易用户
+        const {openAction: addTrader} = openModal('account_info_trade_btn_add') 
         const loading = ref<boolean>(false);
         const { rules, formState, formRef } = handleBusinessForm();
         // 交易用户
@@ -127,6 +134,9 @@ export default defineComponent({
                 queryTemplate();
             }
         });
+        // function addTrader() {
+        //   context.emit('addTrader')
+        // }
         function submit() {
             validateAction<FormState>(formRef, formState).then((res) => {
                 let reqParam: HedgeOutMainConfigReq = {
@@ -165,6 +175,8 @@ export default defineComponent({
             visible,
             cancel,
             submit,
+            addTrader,
+            queryTable,
             loading,
         };
     },

+ 2 - 2
src/views/information/account_info/list/account_info_futures/index.vue

@@ -88,6 +88,7 @@ import Cancel from '../../compoments/cancel-futures/index.vue';
 import Credit from '../../compoments/credit-futures/index.vue';
 import { ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 import { ref } from 'vue';
+import { openModal } from '@/common/setup/modal';
 
 export default defineComponent({
     name: 'account_info_futures',
@@ -106,7 +107,6 @@ export default defineComponent({
     setup() {
         const { loading, tableList, queryTable } = queryTableList();
         const [firstBtn, secondBtn, thirdBtn] = _getBtnList('account_info_futures', true).value;
-
         // 新增弹窗
         const { selectedData: addModelData, openAction } = handleModalData<ErmcpTaAccountEx>();
         // 修改 重置密码、详情等弹窗
@@ -164,7 +164,7 @@ export default defineComponent({
         padding-left: 43px;
         padding-right: 43px;
         .btnPrimary.ant-btn {
-          margin-top: -3px;
+            margin-top: -3px;
         }
     }
     .ant-row.headRow {