소스 검색

注销账户

huangbin 4 년 전
부모
커밋
b69174b92f

+ 50 - 71
src/views/information/account_info/compoments/cancel-futures/index.vue

@@ -19,62 +19,45 @@
                 @click="submit">注销
       </a-button>
     </template>
-    <a-form class="inlineForm"
-            :model="formState">
+    <a-form class="inlineForm">
       <a-row :gutter="24">
         <a-col :span="12">
-          <a-form-item label="所属户"
-                       name="">
-            <span class="white">{{rolename}}</span>
+          <a-form-item label="所属期货账户"
+                       name="userinfotype">
+            <span class="white">{{selectedData.mainAcc.accountname}}/{{selectedData.mainAcc.hedgeaccountcode}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="账户名称"
-                       name="logincode">
-            <a-input class="dialogInput"
-                     readonly
-                     style="width: 200px"
-                     v-model:value="formState.logincode"
-                     placeholder="请输入账户名称" />
+                       name="accountname">
+            <span class="white">{{secondeData.accountname}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录账号"
-                       name="accountname">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     readonly
-                     v-model:value="formState.accountname"
-                     placeholder="请输入登录账号" />
+          <a-form-item label="期货保证金"
+                       name="trademargintmpid">
+            <span class="white"
+                  v-if="marginList.length">{{marginList[0].tradeconfigtmpname}}</span>
+            <span class="white"
+                  v-else>--</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="手机号码"
-                       name="mobile">
-            <a-input class="dialogInput"
-                     v-model:value="formState.mobile"
-                     style="width: 200px"
-                     readonly
-                     placeholder="请输入手机号码" />
+          <a-form-item label="期货手续费"
+                       name="tradefeetmpid">
+            <span class="white"
+                  v-if="feeList.length">{{feeList[0].tradeconfigtmpname}}</span>
+            <span class="white"
+                  v-else>--</span>
           </a-form-item>
         </a-col>
         <a-col :span="24">
-          <a-form-item label="授权期货账户"
-                       class="checkboxGroupItem"
-                       name="logintaaccounts">
-            <a-checkbox-group class="commonCheckboxGroup"
-                              v-model:value="formState.logintaaccounts">
-              <a-row>
-                <a-col :span="12"
-                       v-for="(item, index) in selectedData.acclist"
-                       :key="index">
-                  <a-checkbox disabled
-                              :value="item.accountid">
-                    {{item.accountname}}/{{item.accountid}}
-                  </a-checkbox>
-                </a-col>
-              </a-row>
-            </a-checkbox-group>
+          <a-form-item label="指定交易用户"
+                       name="traderUserId">
+            <span class="white"
+                  v-if="userList.length">{{userList[0].rolename}}</span>
+            <span class="white"
+                  v-else>--</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -89,67 +72,63 @@ import { Modal } from 'ant-design-vue';
 import {LoginaccountOperateReq, TaaccountOperateReq} from '@/services/proto/accountinfo/interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import {loginAccountOperate, taAccountOperateReq} from '@/services/proto/accountinfo';
-import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
+import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 import { handleBusinessForm, handleRoleName } from '../setup';
 import { mergeTwoObj } from '@/utils/objHandle';
 import {getLongTypeLoginID} from "@/services/bus/login";
+import { ErmcpTradeConfigTMP } from '@/services/go/ermcp/business-review/interface';
 
 export default defineComponent({
     name: 'account_info_futures_btn_child_cancel',
-    components: {},
-    props: {
+        components: {},
+        props: {
         selectedData: {
-            type: Object as PropType<ErmcpTaAccount>,
+            type: Object as PropType<ErmcpTaAccountEx>,
+            default: {},
+        },
+                secondeData: {
             default: {},
+            type: Object as PropType<ErmcpTaAccount>,
         },
-        tableList: {
+        userList: {
             type: Array as PropType<ErmcpLoginUserEx[]>,
             default: [],
         },
-        accountList: {
+        marginList: {
+            type: Array as PropType<ErmcpTradeConfigTMP[]>,
+            default: [],
+        },
+        feeList: {
+            type: Array as PropType<ErmcpTradeConfigTMP[]>,
             default: [],
-            type: Object as PropType<ErmcpTaAccount[]>,
         },
     },
     setup(props, context) {
         // 控制关闭弹窗
         const { visible, cancel } = closeModal('account_info_futures_btn_child_cancel');
         const loading = ref<boolean>(false);
-        const { formState } = handleBusinessForm();
-        const { rolename, getRoleName } = handleRoleName();
-        watchEffect(() => {
-            if (visible.value) {
-                // const { selectedData, tableList } = props;
-                // mergeTwoObj(formState, selectedData);
-                // getRoleName(tableList, selectedData);
-                // formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
-                // formState.accountname = props.selectedData.loginname;
-            }
-        });
         function submit() {
             Modal.confirm({
                 title: '是否确认注销该账户',
                 okText: '确认注销',
                 cancelText: '取消',
                 onOk() {
-                    let reqParam: TaaccountOperateReq = {
-                        accountid: props.selectedData.accountid, // uint64 期货账户ID
-                        tradestatus: 7,// double 授信金额正为加负为减
-                        modifierid: Number(getLongTypeLoginID()),// uint64 修改人
-                        areauserid: props.selectedData.relateduserid,// uint64 机构用户ID
-                    };
-                    requestResultLoadingAndInfo(taAccountOperateReq, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
-                        cancel();
-                        context.emit('refresh');
-                    });
+                    // let reqParam: TaaccountOperateReq = {
+                    //     accountid: props.selectedData.accountid, // uint64 期货账户ID
+                    //     tradestatus: 7,// double 授信金额正为加负为减
+                    //     modifierid: Number(getLongTypeLoginID()),// uint64 修改人
+                    //     areauserid: props.selectedData.relateduserid,// uint64 机构用户ID
+                    // };
+                    // requestResultLoadingAndInfo(taAccountOperateReq, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
+                    //     cancel();
+                    //     context.emit('refresh');
+                    // });
                 },
                 onCancel() {},
             });
         }
 
         return {
-            formState,
-            rolename,
             visible,
             cancel,
             submit,

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

@@ -75,6 +75,9 @@
             :marginList="marginList"
             :feeList="feeList" />
     <Cancel @refresh="queryTable"
+            :userList="userList"
+            :marginList="marginList"
+            :feeList="feeList"
             :secondeData="secondeData"
             :selectedData="firstData" />
     <Credit @refresh="queryTable"