huangbin пре 4 година
родитељ
комит
05d943ccb3

+ 8 - 2
src/common/constants/buttonType.ts

@@ -33,13 +33,14 @@ export interface ButtonType {
 
     account_info_trade_btn_add: string; // 交易账户 新增
     account_info_trade_btn_modify: string; // 交易账户 修改
-    account_info_trade_btn_modify_self: string; // 交易账户 修改
+    account_info_trade_btn_child_modify: string; // 交易账户 修改
     account_info_trade_btn_locked: string; // 交易账户 锁定
     account_info_trade_btn_unlocked: string; // 交易账户 解锁
     account_info_trade_btn_reset: string; // 交易账户 重置密码
     account_info_trade_btn_logout: string; // 业务账户 注销
 
     account_info_manager_btn_add: string; // 管理账户 新增
+    account_info_manager_btn_child_add: string; // 管理子账户 新增
     account_info_manager_btn_modify: string; // 管理账户 修改
     account_info_manager_btn_permission: string; // 管理账户 权限设置
     account_info_manager_btn_permission_add: string; // 管理账户 新增
@@ -48,8 +49,13 @@ export interface ButtonType {
     account_info_manager_btn_unlocked: string; // 管理账户 解锁
     account_info_manager_btn_logout: string; // 管理账户 注销
 
-    account_info_futures_btn_add: string; // 期货账户 新增
+    account_info_futures_btn_add: string; // 期货账户   新增
+    account_info_futures_btn_child_add: string; // 期货子账户 新增
     account_info_futures_btn_modify: string; // 期货账户 修改
+    account_info_futures_btn_child_modify: string; // 期货子账户 修改
+    account_info_futures_btn_credit: string; // 期货账户 授权
+    account_info_futures_btn_child_cancel: string; // 期货账户 注销
+    account_info_futures_btn_child_credit: string; // 期货账户 授信
 
     warehouse_info_btn_add: string; // 仓库信息 新增
     warehouse_info_btn_modify: string; // 现货合同 修改

+ 3 - 2
src/common/export/table.ts

@@ -3,11 +3,12 @@
 import BtnList from '@/common/components/buttonList/index.vue';
 import contextMenu from '@/common/components/contextMenu/index.vue';
 import { initData } from '@/common/methods';
-import { getBtnList, getTableColumns, getTableEvent } from '@/common/setup/table/index';
+import { getBtnList, getTableColumns, getTableEvent, _getBtnList } from '@/common/setup/table/index';
 import { defineComponent } from 'vue';
 
 export {
     defineComponent, initData,
-    getTableColumns, getTableEvent, getBtnList,
+    getTableColumns, getTableEvent, getBtnList, _getBtnList,
     contextMenu, BtnList,
 };
+

+ 44 - 2
src/common/setup/table/button.ts

@@ -39,8 +39,8 @@ export function handleBtnList(list: OperationTabMenu | undefined, menuType: keyo
     const forDataBtn = ref<BtnList[]>([]); // 针对数据按钮列表,选中某条数据才显示
     if (list && list.children) {
         list.children.forEach(e => {
-            const { code, type, title } = e;
-            if (type === 2) { // 按钮类型
+            const { code, type, title, isshow } = e;
+            if (type === 2 && isshow) { // 按钮类型
                 const { openAction } = openModal(code as keyof ModalName);
                 const item = { lable: title, callback: openAction, className: getClassName(code) }
                 if (commonName.includes(title)) { // 
@@ -61,6 +61,42 @@ export function handleBtnList(list: OperationTabMenu | undefined, menuType: keyo
     return { commonBtn, forDataBtn }
 }
 
+export function _handleBtnList(list: OperationTabMenu | undefined, hasDetail: boolean,) {
+    const result = ref<BtnList[][]>([[], [], []])
+    const temp: [number, OperationTabMenu[] | undefined] = [0, list?.children]
+    while (temp[1] && temp[1].length) {
+        temp[1].forEach((e) => {
+            const { code, type, title, isshow } = e;
+            if (type === 2 && isshow) { // 按钮类型 并且显示
+                const { openAction } = openModal(code as keyof ModalName);
+                const item = { lable: title, callback: openAction, className: getClassName(code) }
+                const index = temp[0]
+                if (Array.isArray(result.value[index])) {   // 如果是数组直接添加
+                    result.value[index].push(item)
+                } else { // 不是,新增数组
+                    result.value[index] = [item]
+                }
+            }
+        })
+        const children = temp[1][0].children
+        if (children && children.length) {
+            temp[0] = temp[0] + 1
+            temp[1] = children
+        } else {
+            temp[1] = []
+        }
+    }
+    // 详情
+    if (hasDetail) {
+        const len = result.value.length;
+        const { openAction } = openModal('detail')
+        result.value[len - 1].push({ lable: '详情', callback: openAction, className: getClassName('') })
+    }
+
+
+    return result
+}
+
 /**
  * 获取表格操作按钮列表
  * @param menuType 
@@ -71,4 +107,10 @@ export function getBtnList(menuType: keyof ButtonListKey, hasDetail: boolean, co
     const data = getThirdMenuData()
     const list = data.find((e) => e.code === menuType);
     return handleBtnList(list, menuType, hasDetail, commonName)
+}
+
+export function _getBtnList(menuType: keyof ButtonListKey, hasDetail: boolean) {
+    const data = getThirdMenuData()
+    const list = data.find((e) => e.code === menuType);
+    return _handleBtnList(list, hasDetail)
 }

+ 2 - 2
src/common/setup/table/index.ts

@@ -1,11 +1,11 @@
 import { ColumnType } from '@/common/methods/table';
 import { Column } from '@/services/go/commonService/interface';
-import { getBtnList } from './button';
+import { getBtnList, _getBtnList } from './button';
 import { getTableColumns } from './clolumn';
 import { getTableEvent } from './event';
 
 
-export { getTableColumns, getTableEvent, getBtnList };
+export { getTableColumns, getTableEvent, getBtnList, _getBtnList };
 export type { Column, ColumnType };
 
 

+ 6 - 0
src/common/setup/table/interface.ts

@@ -10,6 +10,12 @@ export interface BtnList {
     callback: Function;
     className: BtnClassName    // 按钮 class 名字
 }
+
+export interface BtnParam {
+    first: string[],
+    second: string[],
+    third: string[],
+}
 export interface ButtonListKey {
     custom_info_normal: string; // 客户资料 正常
     custom_info_disabled: string; // 客户资料 停用

+ 231 - 0
src/views/information/account_info/compoments/add-child-futures/index.vue

@@ -0,0 +1,231 @@
+<template>
+  <!-- 新增期货子账户 -->
+  <a-modal class="commonModal add-futures-son"
+           title="新增期货子账户"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :maskClosable="false"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="所属期货账户"
+                       name="userinfotype">
+            <span class="white">王小小/824327648</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入账户名称" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="期货保证金"
+                       name="">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入期货保证金" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="期货手续费"
+                       name="">
+            <a-select class="inlineFormSelect"
+                      style="width: 200px"
+                      placeholder="请选择期货手续费">
+              <a-select-option value="权限一">权限一</a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { closeModal } from '@/common/setup/modal/index';
+import { initData } from '@/common/methods/index';
+import { defineComponent, ref, reactive, toRaw, UnwrapRef, watchEffect } from 'vue';
+import { AllEnums } from '@/services/go/commonService/interface';
+import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { bizGroupReq, loginAccountOperate } from '@/services/proto/accountinfo';
+import { ErmcpBizGroupReq, ErmcpBizGroupTAAccount } from '@/services/proto/accountinfo/interface';
+import { ErmcpBizGroupSpotGoods } from '@/services/go/ermcp/account/interface';
+
+export default defineComponent({
+    name: 'account_info_futures_btn_add',
+    components: {},
+    setup() {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_futures_btn_child_add');
+        const loading = ref<boolean>(false);
+        // 证件类型
+        // const cardTypeList = ref<AllEnums[]>(getCardType());
+        // // 表单
+        // const formRef = ref();
+        // const formState: UnwrapRef<FormState> = reactive(initFormState());
+        // const rules = {
+        //     userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
+        //     customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
+        //     nickname: [{ required: true, message: '请输入企业简称', trigger: 'blur' }],
+        //     cardtype: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
+        // };
+        // // 下单方法
+        // const { loading, applyAction } = handleApply();
+        // function isPersonal(): boolean {
+        //     return formState.userinfotype === '1';
+        // }
+
+        function submit() {
+            let reqParam: ErmcpBizGroupReq = {
+                // BizGroupID: number; // uint64 分组ID(修改/删除必填)
+                // BizType: number; // int32 业务类型 - 1:套保 2:套利
+                // Remark: string; // string 新增/修改备注
+                // ApplySrc: number; // int32 新增/修改来源 - 1:管理端 2:终端
+                // ApplyId: number; // uint64 新增/修改人
+                // SpotGoods: ErmcpBizGroupSpotGoods[]; // ErmcpBizGroupSpotGoods 期货账户分组商品
+                // TAAccount: ErmcpBizGroupTAAccount[]; // ErmcpBizGroupTAAccount 期货账户分组账户
+                // OptType: number; // int32 操作类型 - 1:新增 2:修改 3:删除
+                // AreaUserID: number; // uint64 所属机构
+            };
+
+            requestResultLoadingAndInfo(bizGroupReq, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
+                cancel();
+                // context.emit('refresh');
+            });
+
+            // formRef.value
+            //     .validate()
+            //     .then(() => {
+            //         const param = toRaw(formState);
+            //         applyAction(param);
+            //         console.log('values', formState);
+            //     })
+            //     .catch((error: ValidateErrorEntity<FormState>) => {
+            //         console.log('error', error);
+            //     });
+        }
+        return {
+            // formState,
+            // rules,
+            // formRef,
+            // cardTypeList,
+            // isPersonal,
+            visible,
+            cancel,
+            // submit,
+            // loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-business-info {
+}
+.add-traders {
+}
+.add-managers {
+}
+.add-powers {
+    .powerTable {
+        width: 100%;
+        height: 100%;
+        border: 3px solid @m-grey11;
+        background-color: @m-black12;
+        font-size: 14px;
+        color: @m-white0;
+        .flex;
+        flex-direction: column;
+        .ant-checkbox-group.commonCheckboxGroup .ant-checkbox-wrapper {
+            width: 90px;
+            span + span {
+                margin-right: 0;
+            }
+        }
+        .powerRow {
+            width: 100%;
+            display: inline-flex;
+            border-bottom: 3px solid @m-grey11;
+            div {
+                align-self: center;
+                align-items: center;
+            }
+            .powerLeft {
+                width: 84px;
+                padding: 0 8px;
+            }
+            .powerMiddle {
+                width: 130px;
+                .flex;
+                flex-direction: column;
+                div {
+                    width: 100%;
+                    height: 40px;
+                    line-height: 40px;
+                    padding: 0 8px;
+                    border: 3px solid @m-grey11;
+                    border-top: 0;
+                }
+                div:last-child {
+                    border-bottom: 0;
+                }
+            }
+            .powerRight {
+                flex: 1;
+                .flex;
+                flex-direction: column;
+                div {
+                    width: 100%;
+                    height: 40px;
+                    line-height: 40px;
+                    padding: 0 8px;
+                    justify-content: flex-start;
+                    border-bottom: 3px solid @m-grey11;
+                }
+                div:last-child {
+                    border-bottom: 0;
+                }
+            }
+        }
+    }
+}
+.add-futures {
+}
+.add-futures-son {
+}
+.add-arbitrage {
+    .ant-checkbox-group.commonCheckboxGroup .ant-checkbox-wrapper {
+        width: 100px;
+        span + span {
+            margin-right: 0;
+        }
+    }
+    .ant-checkbox-group.autoWidth {
+        width: 520px;
+        .ant-checkbox-wrapper {
+            width: auto;
+        }
+    }
+    .checkboxGroupItem {
+        .ant-row {
+            margin-bottom: 10px;
+        }
+    }
+}
+</style
+>;

+ 7 - 10
src/views/information/account_info/compoments/add-futures/index.vue

@@ -73,17 +73,17 @@ import { initData } from '@/common/methods/index';
 import { defineComponent, ref, reactive, toRaw, UnwrapRef, watchEffect } from 'vue';
 import { AllEnums } from '@/services/go/commonService/interface';
 import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
-import {bizGroupReq, loginAccountOperate} from "@/services/proto/accountinfo";
-import {ErmcpBizGroupReq, ErmcpBizGroupTAAccount} from "@/services/proto/accountinfo/interface";
-import {ErmcpBizGroupSpotGoods} from "@/services/go/ermcp/account/interface";
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { bizGroupReq, loginAccountOperate } from '@/services/proto/accountinfo';
+import { ErmcpBizGroupReq, ErmcpBizGroupTAAccount } from '@/services/proto/accountinfo/interface';
+import { ErmcpBizGroupSpotGoods } from '@/services/go/ermcp/account/interface';
 
 export default defineComponent({
     name: 'add-custom',
     components: {},
     setup() {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_manager_btn_add');
+        const { visible, cancel } = closeModal('account_info_futures_btn_add');
         const loading = ref<boolean>(false);
         // 证件类型
         // const cardTypeList = ref<AllEnums[]>(getCardType());
@@ -102,7 +102,6 @@ export default defineComponent({
         //     return formState.userinfotype === '1';
         // }
 
-
         function submit() {
             let reqParam: ErmcpBizGroupReq = {
                 // BizGroupID: number; // uint64 分组ID(修改/删除必填)
@@ -114,15 +113,13 @@ export default defineComponent({
                 // TAAccount: ErmcpBizGroupTAAccount[]; // ErmcpBizGroupTAAccount 期货账户分组账户
                 // OptType: number; // int32 操作类型 - 1:新增 2:修改 3:删除
                 // AreaUserID: number; // uint64 所属机构
-            }
+            };
 
-            requestResultLoadingAndInfo(bizGroupReq, reqParam, loading,  ['新增账户成功', '新增账户失败:'] ).then(() => {
+            requestResultLoadingAndInfo(bizGroupReq, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
                 cancel();
                 // context.emit('refresh');
             });
 
-
-
             // formRef.value
             //     .validate()
             //     .then(() => {

+ 167 - 0
src/views/information/account_info/compoments/cancel-futures/index.vue

@@ -0,0 +1,167 @@
+<template>
+  <!-- 注销业务账户 -->
+  <a-modal class="add-custom"
+           title="注销业务账户"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :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>
+    </template>
+    <a-form class="inlineForm"
+            :model="formState">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="所属用户"
+                       name="">
+            <span class="white">{{rolename}}</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="请输入账户名称" />
+          </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>
+        </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>
+        </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>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
+import { Modal } from 'ant-design-vue';
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
+import { handleBusinessForm, handleRoleName } from '../setup';
+import { mergeTwoObj } from '@/utils/objHandle';
+
+export default defineComponent({
+    name: 'account_info_futures_btn_child_cancel',
+    components: {},
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+        tableList: {
+            type: Array as PropType<ErmcpLoginUserEx[]>,
+            default: [],
+        },
+        accountList: {
+            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: LoginaccountOperateReq = {
+                        userid: props.selectedData.userid,
+                        loginid: props.selectedData.loginid,
+                        operatetype: 7, // 5: 锁定 6:解锁
+                        logintaaccounts: [],
+                    };
+                    requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
+                        cancel();
+                        context.emit('refresh');
+                    });
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
+
+        return {
+            formState,
+            rolename,
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-custom {
+}
+</style
+>;

+ 116 - 0
src/views/information/account_info/compoments/credit-futures/index.vue

@@ -0,0 +1,116 @@
+<template>
+  <!-- 管理员账号注销-->
+  <a-modal class="add-custom custom-detail"
+           title="管理员账号注销"
+           v-model:visible="visible"
+           centered
+           :maskClosable="maskClosableFlag"
+           @cancel="cancel"
+           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>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="账户权限"
+                       name="userid">
+            <span class="white">{{selectedData.rolename}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="logincode">
+            <span class="white">{{selectedData.logincode}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="accountname">
+            <span class="white">{{selectedData.loginname}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="手机号码"
+                       name="mobile">
+            <span class="white">{{selectedData.mobile}}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { Modal } from 'ant-design-vue';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+
+export default defineComponent({
+    name: 'account_info_futures_btn_child_credit',
+    components: {},
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('account_info_futures_btn_child_credit');
+        const loading = ref<boolean>(false);
+        function submit() {
+            Modal.confirm({
+                title: '是否确认注销该账户',
+                okText: '确认注销',
+                cancelText: '取消',
+                onOk() {
+                    let reqParam: LoginaccountOperateReq = {
+                        userid: props.selectedData.userid,
+                        loginid: props.selectedData.loginid,
+                        operatetype: 7, // 5: 锁定 6:解锁
+                        logintaaccounts: [],
+                    };
+                    requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
+                        cancel();
+                        context.emit('refresh');
+                    });
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
+        return {
+            visible,
+            cancel,
+            maskClosableFlag: false,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+}
+</style>;

+ 132 - 0
src/views/information/account_info/compoments/detail-futures/index.vue

@@ -0,0 +1,132 @@
+<template>
+  <!-- 交易账号详情-->
+  <a-modal class="add-custom custom-detail"
+           title="交易账号详情"
+           v-model:visible="visible"
+           centered
+           :maskClosable="maskClosableFlag"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                @click="cancel">关闭</a-button>
+    </template>
+    <a-form class="inlineForm"
+            :model="formState">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="所属用户"
+                       name="">
+            <span class="white">{{rolename}}</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="请输入账户名称" />
+          </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>
+        </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>
+        </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>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, watchEffect } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { mergeTwoObj } from '@/utils/objHandle';
+import { handleBusinessForm, handleRoleName } from '../setup';
+import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
+
+export default defineComponent({
+    name: 'trader-detail',
+    components: {},
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+        tableList: {
+            type: Array as PropType<ErmcpLoginUserEx[]>,
+            default: [],
+        },
+        accountList: {
+            default: [],
+            type: Object as PropType<ErmcpTaAccount[]>,
+        },
+    },
+    setup(props) {
+        const { visible, cancel } = closeModal('detail');
+        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;
+            }
+        });
+        return {
+            visible,
+            cancel,
+            formState,
+            maskClosableFlag: false,
+            rolename,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+}
+</style>;

+ 2 - 2
src/views/information/account_info/compoments/modify-futures-son/index.vue

@@ -63,11 +63,11 @@ import { AllEnums } from '@/services/go/commonService/interface';
 import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
 
 export default defineComponent({
-    name: 'add-custom',
+    name: 'account_info_futures_btn_child_modify',
     components: {},
     setup() {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_business_btn_modify');
+        const { visible, cancel } = closeModal('account_info_futures_btn_child_modify');
         // 证件类型
         // const cardTypeList = ref<AllEnums[]>(getCardType());
         // // 表单

+ 1 - 1
src/views/information/account_info/compoments/modify-futures/index.vue

@@ -79,7 +79,7 @@ export default defineComponent({
     components: {},
     setup() {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_business_btn_modify');
+        const { visible, cancel } = closeModal('account_info_futures_btn_modify');
         // 证件类型
         // const cardTypeList = ref<AllEnums[]>(getCardType());
         // // 表单

+ 6 - 6
src/views/information/account_info/compoments/modify-traders-self/index.vue

@@ -8,9 +8,9 @@
            :maskClosable="false"
            width="890px">
     <template #footer>
-        <a-button key="cancel"
-                  type="primary"
-                  @click="cancel">取消</a-button>
+      <a-button key="cancel"
+                type="primary"
+                @click="cancel">取消</a-button>
       <a-button key="submit"
                 type="primary"
                 :loading="loading"
@@ -55,7 +55,7 @@ import { handleForm } from './setup';
 import { mergeTwoObj } from '@/utils/objHandle';
 import { validateAction } from '@/common/setup/form';
 import { FormState } from './interface';
-import {getLongTypeLoginID} from "@/services/bus/login";
+import { getLongTypeLoginID } from '@/services/bus/login';
 
 export default defineComponent({
     name: 'account_info_trade_btn_modify_self',
@@ -67,7 +67,7 @@ export default defineComponent({
     },
     setup(props, context) {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_trade_btn_modify_self');
+        const { visible, cancel } = closeModal('account_info_trade_btn_child_modify');
         const loading = ref<boolean>(false);
         const { rules, formState, formRef } = handleForm();
         watchEffect(() => {
@@ -85,7 +85,7 @@ export default defineComponent({
                     roleids: [24],
                     logintaaccounts: [],
                     mobile: res.mobile, // string 手机号码(明文)
-                    accountname: res.rolename
+                    accountname: res.rolename,
                 };
                 requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['修改成功', '修改失败:']).then(() => {
                     cancel();

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

@@ -11,6 +11,7 @@
         </svg>
         {{getUserName()}}
       </span>
+      <BtnList :btnList="firstBtn" />
     </div>
     <a-collapse class="spotCollapse"
                 v-for="(item, i) in tableList"
@@ -33,7 +34,7 @@
           <a-row class="headRow">
             <a-col :span="12">{{item.mainAcc.accountname}}({{item.subacclist.length}})</a-col>
             <a-col :span="12">
-              <BtnList :btnList="commonBtn" />
+              <BtnList :btnList="secondBtn" />
             </a-col>
           </a-row>
         </template>
@@ -48,23 +49,36 @@
                 <a-col :span="12">{{getAccountStatus(sub.tradestatus)}}</a-col>
               </a-row>
             </template>
-            <BtnList :btnList="forDataBtn" />
+            <BtnList :btnList="thirdBtn" />
           </a-collapse-panel>
         </a-collapse>
       </a-collapse-panel>
     </a-collapse>
     <Add />
+    <AddChild />
+    <Modify />
+    <ModifyChild />
+    <Detail />
+    <Cancel />
+    <Credit />
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getBtnList, contextMenu, BtnList } from '@/common/export/table';
+import { defineComponent, initData, _getBtnList, contextMenu, BtnList } from '@/common/export/table';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import { ref } from 'vue';
 import { getAccountStatus } from '../setup';
 import { queryTableList } from './setup';
 import { getUserName } from '@/services/bus/user';
 import Add from '../../compoments/add-futures/index.vue';
+import AddChild from '../../compoments/add-child-futures/index.vue';
+import Modify from '../../compoments/modify-futures/index.vue';
+import ModifyChild from '../../compoments/modify-futures-son/index.vue';
+import Detail from '../../compoments/detail-futures/index.vue';
+import Cancel from '../../compoments/cancel-futures/index.vue';
+import Credit from '../../compoments/credit-futures/index.vue';
+import { openModal } from '@/common/setup/modal';
 
 export default defineComponent({
     name: 'account_info_futures',
@@ -73,10 +87,19 @@ export default defineComponent({
         BtnList,
         filterCustomTable,
         Add,
+        AddChild,
+        Modify,
+        ModifyChild,
+        Detail,
+        Cancel,
+        Credit,
     },
     setup() {
         const { loading, tableList, queryTable } = queryTableList();
-        const { commonBtn, forDataBtn } = getBtnList('account_info_manager', true);
+        const [firstBtn, secondBtn, thirdBtn] = _getBtnList('account_info_futures', true).value;
+
+        // 新增角色
+        const { openAction: openAddPermission } = openModal('account_info_manager_btn_permission_add');
         initData(() => {
             queryTable();
         });
@@ -85,13 +108,16 @@ export default defineComponent({
         function search(value: any) {}
 
         return {
-            commonBtn,
-            forDataBtn,
+            // commonBtn,
+            // forDataBtn,
             loading,
             search,
             tableList,
             getAccountStatus,
             getUserName,
+            firstBtn,
+            secondBtn,
+            thirdBtn,
         };
     },
 });
@@ -99,7 +125,7 @@ export default defineComponent({
 
 <style lang="less">
 .account_info_futures {
-  .tltLeft {
+    .tltLeft {
         padding-left: 12px;
     }
     .btn-list {

+ 1 - 1
src/views/information/account_info/list/account_info_trade/index.vue

@@ -139,7 +139,7 @@ export default defineComponent({
             handleTableList(queryTable, tableList, forDataBtn.value);
         }
         // 修改交易用户
-        const { openAction: openModifySelf } = openModal('account_info_trade_btn_modify_self');
+        const { openAction: openModifySelf } = openModal('account_info_trade_btn_child_modify');
         function modifySelfClick(value: ErmcpLoginUserEx) {
             Object.assign(addModelData, value);
             openModifySelf();