Просмотр исходного кода

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

marymelisa 4 лет назад
Родитель
Сommit
eaa2be11cc
26 измененных файлов с 646 добавлено и 525 удалено
  1. 7 3
      src/services/go/ermcp/business-review/index.ts
  2. 44 14
      src/views/information/account_info/compoments/add-child-futures/index.vue
  3. 28 0
      src/views/information/account_info/compoments/add-child-futures/setup.ts
  4. 156 0
      src/views/information/account_info/compoments/add-child-traders/index.vue
  5. 10 10
      src/views/information/account_info/compoments/add-futures/index.vue
  6. 0 6
      src/views/information/account_info/compoments/add-futures/interface.ts
  7. 0 22
      src/views/information/account_info/compoments/add-futures/setup.ts
  8. 33 80
      src/views/information/account_info/compoments/add-traders/index.vue
  9. 3 6
      src/views/information/account_info/compoments/cancel-managers/index.vue
  10. 1 4
      src/views/information/account_info/compoments/credit-futures/index.vue
  11. 2 2
      src/views/information/account_info/compoments/detail-futures/index.vue
  12. 1 4
      src/views/information/account_info/compoments/detail-managers/index.vue
  13. 12 0
      src/views/information/account_info/compoments/interface.ts
  14. 3 6
      src/views/information/account_info/compoments/locked-managers/index.vue
  15. 163 0
      src/views/information/account_info/compoments/modify-child-traders/index.vue
  16. 70 52
      src/views/information/account_info/compoments/modify-futures/index.vue
  17. 0 113
      src/views/information/account_info/compoments/modify-traders-self/index.vue
  18. 0 4
      src/views/information/account_info/compoments/modify-traders-self/interface.ts
  19. 0 19
      src/views/information/account_info/compoments/modify-traders-self/setup.ts
  20. 28 79
      src/views/information/account_info/compoments/modify-traders/index.vue
  21. 39 1
      src/views/information/account_info/compoments/setup.ts
  22. 29 14
      src/views/information/account_info/list/account_info_futures/index.vue
  23. 12 12
      src/views/information/account_info/list/account_info_trade/index.vue
  24. 1 1
      src/views/information/goods/components/modify/index.vue
  25. 3 73
      src/views/information/spot-contract/components/detail/index.vue
  26. 1 0
      src/views/information/spot-contract/components/modify/index.vue

+ 7 - 3
src/services/go/ermcp/business-review/index.ts

@@ -1,12 +1,13 @@
 /** ================================= 业务审核 ================================**/
 import { getUserId } from '@/services/bus/account';
+import { getAreaUserId } from '@/services/bus/user';
 import { commonSearch_go } from "@/services/go";
 import {
     ErmcpTradeConfigTMP,
     QryBusinessDjRsp,
     QryBussinessJsRsp,
     QueryBusinessDjReq,
-    QueryBusinessJsReq, QueryTradeConfigTMPReq
+    QueryBusinessJsReq
 } from "@/services/go/ermcp/business-review/interface";
 
 /**
@@ -42,8 +43,11 @@ export function QueryBusinessDj(req: QueryBusinessDjReq): Promise<QryBusinessDjR
 /**
  * 查询交易模板配置 /Ermcp/QueryTradeConfigTMP
  */
-export function QueryTradeConfigTMP(req: QueryTradeConfigTMPReq): Promise<ErmcpTradeConfigTMP> {
-    return commonSearch_go('/Ermcp/QueryTradeConfigTMP', req).catch((err) => {
+export function QueryTradeConfigTMP(): Promise<ErmcpTradeConfigTMP[]> {
+    const param = {
+        areauserid: getAreaUserId(), // 所属机构id
+    }
+    return commonSearch_go('/Ermcp/QueryTradeConfigTMP', param).catch((err) => {
         throw new Error(`查询交易模板配置: ${err.message}`);
     });
 }

+ 44 - 14
src/views/information/account_info/compoments/add-child-futures/index.vue

@@ -21,7 +21,7 @@
         <a-col :span="12">
           <a-form-item label="所属期货账户"
                        name="userinfotype">
-            <span class="white">王小小/824327648</span>
+            <span class="white">{{selectedData.mainAcc.accountname}}/{{selectedData.mainAcc.accountid}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
@@ -40,7 +40,11 @@
                       style="width: 200px"
                       v-model:value="formState.trademargintmpid"
                       placeholder="请选择保证金模板">
-              <a-select-option value="权限一">权限一</a-select-option>
+              <a-select-option v-for="item in marginList"
+                               :key="item.tradeconfigtmpid"
+                               :value="item.tradeconfigtmpid">
+                {{item.tradeconfigtmpname}}
+              </a-select-option>
             </a-select>
           </a-form-item>
         </a-col>
@@ -51,7 +55,11 @@
                       style="width: 200px"
                       v-model:value="formState.tradefeetmpid"
                       placeholder="请选择期货手续费">
-              <a-select-option value="权限一">权限一</a-select-option>
+              <a-select-option v-for="item in feeList"
+                               :key="item.tradeconfigtmpid"
+                               :value="item.tradeconfigtmpid">
+                {{item.tradeconfigtmpname}}
+              </a-select-option>
             </a-select>
           </a-form-item>
         </a-col>
@@ -62,7 +70,11 @@
                       style="width: 200px"
                       v-model:value="formState.traderUserId"
                       placeholder="请选择交易用户">
-              <a-select-option value="权限一">权限一</a-select-option>
+              <a-select-option v-for="item in tableList"
+                               :key="item.roleid"
+                               :value="item.roleid">
+                {{item.rolename}}
+              </a-select-option>
             </a-select>
           </a-form-item>
         </a-col>
@@ -73,23 +85,40 @@
 
 <script lang="ts">
 import { closeModal } from '@/common/setup/modal/index';
-import { defineComponent, ref } from 'vue';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { ErmcpBizGroupReq } from '@/services/proto/accountinfo/interface';
 import { validateAction } from '@/common/setup/form';
 import { FormState } from './interface';
-import { handleBusinessForm } from './setup';
+import { handleBusinessForm, handleTradeTemplate } from './setup';
 import { hedgeOutMainReq } from '@/services/proto/accountinfo';
+import { ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
+import { handlerManagerList } from '@/common/setup/user';
 
 export default defineComponent({
     name: 'account_info_futures_btn_add',
     components: {},
-    setup() {
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpTaAccountEx>,
+            default: {},
+        },
+    },
+    setup(props, context) {
         // 控制关闭弹窗
         const { visible, cancel } = closeModal('account_info_futures_btn_child_add');
         const loading = ref<boolean>(false);
         const { rules, formState, formRef } = handleBusinessForm();
-
+        // 交易用户
+        const { tableList, queryTable } = handlerManagerList(loading, 2);
+        // 交易模板
+        const { marginList, feeList, queryTemplate } = handleTradeTemplate();
+        watchEffect(() => {
+            if (visible.value) {
+                queryTable();
+                queryTemplate();
+            }
+        });
         function submit() {
             validateAction<FormState>(formRef, formState).then((res) => {
                 let reqParam: ErmcpBizGroupReq = {
@@ -104,9 +133,9 @@ export default defineComponent({
                     // AreaUserID: number; // uint64 所属机构
                 };
 
-                requestResultLoadingAndInfo(hedgeOutMainReq, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
+                requestResultLoadingAndInfo(hedgeOutMainReq, reqParam, loading, ['新增期货子账户成功', '新增期货子账户失败:']).then(() => {
                     cancel();
-                    // context.emit('refresh');
+                    context.emit('refresh');
                 });
             });
         }
@@ -114,12 +143,13 @@ export default defineComponent({
             formState,
             rules,
             formRef,
-            // cardTypeList,
-            // isPersonal,
+            tableList,
+            marginList,
+            feeList,
             visible,
             cancel,
-            // submit,
-            // loading,
+            submit,
+            loading,
         };
     },
 });

+ 28 - 0
src/views/information/account_info/compoments/add-child-futures/setup.ts

@@ -1,5 +1,8 @@
+import { QueryTradeConfigTMP } from "@/services/go/ermcp/business-review";
+import { ErmcpTradeConfigTMP } from "@/services/go/ermcp/business-review/interface";
 import { reactive, ref, UnwrapRef } from "vue";
 import { FormState } from './interface';
+
 /**
  * 表单
  * @returns 
@@ -19,4 +22,29 @@ export function handleBusinessForm() {
         traderUserId: [{ required: true, message: '请选择交易用户' }],
     }
     return { rules, formState, formRef }
+}
+
+/**
+ * 处理交易模板
+ */
+export function handleTradeTemplate() {
+    // 保证金
+    const marginList = ref<ErmcpTradeConfigTMP[]>([])
+    // 手续费
+    const feeList = ref<ErmcpTradeConfigTMP[]>([])
+    function queryTemplate() {
+        QueryTradeConfigTMP().then(res => {
+            marginList.value.length = 0
+            feeList.value.length = 0
+            res.forEach(el => {
+                const { tradeconfigtmptype } = el
+                if (tradeconfigtmptype === 1) { // 保证金
+                    marginList.value.push(el)
+                } else if (tradeconfigtmptype === 2) { // 手续费
+                    feeList.value.push(el)
+                }
+            })
+        })
+    }
+    return { marginList, feeList, queryTemplate }
 }

+ 156 - 0
src/views/information/account_info/compoments/add-child-traders/index.vue

@@ -0,0 +1,156 @@
+<template>
+  <!-- 新增交易员 -->
+  <a-modal class="commonModal add-traders"
+           title="新增交易员"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :loading="loading"
+           :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="">
+            <span class="white">{{selectedData.rolename}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="logincode">
+            <a-input class="dialogInput"
+                     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"
+                     v-model:value="formState.accountname"
+                     placeholder="请输入登录账号" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="登录密码"
+                       name="password">
+            <a-input-password class="dialogInput"
+                              style="width: 200px"
+                              v-model:value="formState.password"
+                              placeholder="请输入登录密码" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="24">
+          <a-form-item label="手机号码"
+                       name="mobile">
+            <a-input class="dialogInput"
+                     v-model:value="formState.mobile"
+                     style="width: 200px"
+                     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 accountList"
+                       :key="index"
+                       :class="[index > 1 ? 'mt10' : '']">
+                  <a-checkbox :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 } from 'vue';
+import { ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { handleBusinessForm } from '../setup';
+import { validateAction } from '@/common/setup/form';
+import { BusinessFormState } from '../interface';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { LoginaccountOperateReq, LoginTaaccount } from '@/services/proto/accountinfo/interface';
+
+export default defineComponent({
+    name: 'account_info_trade_btn_add',
+    components: {},
+    props: {
+        selectedData: {
+            default: {},
+            type: Object as PropType<ErmcpLoginUserEx>,
+        },
+        accountList: {
+            default: {},
+            type: Object as PropType<ErmcpTaAccount>,
+        },
+    },
+    setup(props, context) {
+        const loading = ref<boolean>(false);
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_trade_btn_add');
+        const { rules, formState, formRef } = handleBusinessForm();
+        function submit() {
+            validateAction<BusinessFormState>(formRef, formState).then((res) => {
+                const reqParam: LoginaccountOperateReq = {
+                    operatetype: 10, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
+                    logincode: res.logincode, // string 登录账号
+                    accountname: res.accountname, // string 账户名称
+                    password: res.password, // string 登录密码(明文)
+                    mobile: res.mobile, // string 手机号码(明文)
+                    roleids: [props.selectedData.roleid], // uint64 账号角色
+                    userid: props.selectedData.roleid,
+                    logintaaccounts: res.logintaaccounts.map((res) => {
+                        const taAccount: LoginTaaccount = {
+                            accountid: res,
+                        };
+                        return taAccount;
+                    }), // LoginTaaccount 期货账户(勾选交易员必填)
+                };
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增交易员成功', '新增交易员失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
+            });
+        }
+        return {
+            formState,
+            rules,
+            formRef,
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-traders {
+}
+</style
+>;
+

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

@@ -43,15 +43,15 @@
         </a-col>
         <a-col :span="12">
           <a-form-item label="期货登录账号"
-                       name="name">
+                       name="accountid">
             <a-input class="dialogInput"
                      style="width: 200px"
-                     v-model:value="formState.name"
+                     v-model:value="formState.accountid"
                      placeholder="请输入期货登录账号" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录密码"
+          <a-form-item label="交易密码"
                        name="password">
             <a-input-password class="dialogInput"
                               style="width: 200px"
@@ -79,19 +79,19 @@ import { ErmcpBizGroupReq } from '@/services/proto/accountinfo/interface';
 import { ErmcpFuturesCompany } from '@/services/go/ermcp/account/interface';
 import { QueryFuturesCompany } from '@/services/go/ermcp/account';
 import { getUserName } from '@/services/bus/user';
-import { handleBusinessForm } from './setup';
 import { validateAction } from '@/common/setup/form';
-import { FormState } from './interface';
+import { handleAddOrModifyFuturesForm } from '../setup';
+import { AddFuturesFormState } from '../interface';
 
 export default defineComponent({
-    name: 'add-custom',
+    name: 'account_info_futures_btn_add',
     components: {},
-    setup() {
+    setup(props, context) {
         // 控制关闭弹窗
         const { visible, cancel } = closeModal('account_info_futures_btn_add');
         const loading = ref<boolean>(false);
         const companyList = ref<ErmcpFuturesCompany[]>([]);
-        const { rules, formState, formRef } = handleBusinessForm();
+        const { rules, formState, formRef } = handleAddOrModifyFuturesForm();
         watchEffect(() => {
             if (visible.value) {
                 queryResultLoadingAndInfo(QueryFuturesCompany, loading).then((res) => {
@@ -101,7 +101,7 @@ export default defineComponent({
         });
 
         function submit() {
-            validateAction<FormState>(formRef, formState).then((res) => {
+            validateAction<AddFuturesFormState>(formRef, formState).then((res) => {
                 let reqParam: ErmcpBizGroupReq = {
                     // BizGroupID: number; // uint64 分组ID(修改/删除必填)
                     // BizType: number; // int32 业务类型 - 1:套保 2:套利
@@ -116,7 +116,7 @@ export default defineComponent({
 
                 requestResultLoadingAndInfo(hedgeOutMainReq, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
                     cancel();
-                    // context.emit('refresh');
+                    context.emit('refresh');
                 });
             });
         }

+ 0 - 6
src/views/information/account_info/compoments/add-futures/interface.ts

@@ -1,6 +0,0 @@
-export interface FormState {
-    fcid: number | undefined; // uint64 期货公司
-    accountname: string; // string 账户名称accountname1(Taaccount)
-    name: string;
-    password: string;
-}

+ 0 - 22
src/views/information/account_info/compoments/add-futures/setup.ts

@@ -1,22 +0,0 @@
-import { reactive, ref, UnwrapRef } from "vue";
-import { FormState } from './interface';
-/**
- * 表单
- * @returns 
- */
-export function handleBusinessForm() {
-    const formRef = ref();
-    const formState: UnwrapRef<FormState> = reactive({
-        name: '',
-        accountname: '',
-        password: '',
-        fcid: undefined,
-    })
-    const rules = {
-        accountname: [{ required: true, message: '请输入账户名称', trigger: 'blur' }],
-        password: [{ required: true, message: '请输入账户密码', trigger: 'blur' }],
-        name: [{ required: true, message: '请输入期货登录账号', trigger: 'blur' }],
-        fcid: [{ required: true, message: '请选择期货公司' }],
-    }
-    return { rules, formState, formRef }
-}

+ 33 - 80
src/views/information/account_info/compoments/add-traders/index.vue

@@ -1,11 +1,10 @@
 <template>
-  <!-- 新增交易 -->
+  <!-- 新增交易用户 -->
   <a-modal class="commonModal add-traders"
-           title="新增交易"
+           title="新增交易用户"
            v-model:visible="visible"
            @cancel="cancel"
            centered
-           :loading="loading"
            :maskClosable="false"
            width="890px">
     <template #footer>
@@ -20,62 +19,21 @@
             :rules="rules">
       <a-row :gutter="24">
         <a-col :span="12">
-          <a-form-item label="所属用户"
-                       name="">
-            <span class="white">{{selectedData.rolename}}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="账户名称"
-                       name="logincode">
+          <a-form-item label="用户名称"
+                       name="rolename">
             <a-input class="dialogInput"
                      style="width: 200px"
-                     v-model:value="formState.logincode"
+                     v-model:value="formState.rolename"
                      placeholder="请输入账户名称" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录账号"
-                       name="accountname">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     v-model:value="formState.accountname"
-                     placeholder="请输入登录账号" />
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="登录密码"
-                       name="password">
-            <a-input-password class="dialogInput"
-                              style="width: 200px"
-                              v-model:value="formState.password"
-                              placeholder="请输入登录密码" />
-          </a-form-item>
-        </a-col>
-        <a-col :span="24">
           <a-form-item label="手机号码"
                        name="mobile">
             <a-input class="dialogInput"
-                     v-model:value="formState.mobile"
                      style="width: 200px"
-                     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 accountList"
-                       :key="index"
-                       :class="[index > 1 ? 'mt10' : '']">
-                  <a-checkbox :value="item.accountid">{{item.accountname}}/{{item.accountid}}</a-checkbox>
-                </a-col>
-              </a-row>
-            </a-checkbox-group>
+                     v-model:value="formState.mobile"
+                     placeholder="请输入登录账号" />
           </a-form-item>
         </a-col>
       </a-row>
@@ -85,51 +43,47 @@
 
 <script lang="ts">
 import { closeModal } from '@/common/setup/modal/index';
-import { defineComponent, ref, PropType } from 'vue';
-import { ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
+import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { handleBusinessForm } from '../setup';
-import { validateAction } from '@/common/setup/form';
-import { BusinessFormState } from '../interface';
 import { loginAccountOperate } from '@/services/proto/accountinfo';
-import { LoginaccountOperateReq, LoginTaaccount } from '@/services/proto/accountinfo/interface';
+import { mergeTwoObj } from '@/utils/objHandle';
+import { validateAction } from '@/common/setup/form';
+import { handleTradeForm } from '../setup';
+import { TraderFormState } from '../interface';
 
 export default defineComponent({
-    name: 'account_info_trade_btn_add',
-    components: {},
+    name: 'account_info_trade_btn_modify',
     props: {
         selectedData: {
-            default: {},
             type: Object as PropType<ErmcpLoginUserEx>,
-        },
-        accountList: {
             default: {},
-            type: Object as PropType<ErmcpTaAccount>,
         },
     },
     setup(props, context) {
-        const loading = ref<boolean>(false);
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_trade_btn_add');
-        const { rules, formState, formRef } = handleBusinessForm();
+        const { visible, cancel } = closeModal('account_info_trade_btn_modify');
+        const loading = ref<boolean>(false);
+        const { rules, formState, formRef } = handleTradeForm();
+        watchEffect(() => {
+            if (visible.value) {
+                const { selectedData } = props;
+                mergeTwoObj(formState, selectedData);
+                console.log('selectedData', selectedData);
+            }
+        });
         function submit() {
-            validateAction<BusinessFormState>(formRef, formState).then((res) => {
+            validateAction<TraderFormState>(formRef, formState).then((res) => {
                 const reqParam: LoginaccountOperateReq = {
-                    operatetype: 10, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
-                    logincode: res.logincode, // string 登录账号
-                    accountname: res.accountname, // string 账户名称
-                    password: res.password, // string 登录密码(明文)
-                    mobile: res.mobile, // string 手机号码(明文)
-                    roleids: [props.selectedData.roleid], // uint64 账号角色
+                    operatetype: 1, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
                     userid: props.selectedData.roleid,
-                    logintaaccounts: res.logintaaccounts.map((res) => {
-                        const taAccount: LoginTaaccount = {
-                            accountid: res,
-                        };
-                        return taAccount;
-                    }), // LoginTaaccount 期货账户(勾选交易员必填)
+                    roleids: [24],
+                    logintaaccounts: [],
+                    mobile: res.mobile, // string 手机号码(明文)
+                    accountname: res.rolename,
                 };
-                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增交易员成功', '新增交易员失败:']).then(() => {
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['修改成功', '修改失败:']).then(() => {
                     cancel();
                     context.emit('refresh');
                 });
@@ -152,5 +106,4 @@ export default defineComponent({
 .add-traders {
 }
 </style
->;
-
+>;

+ 3 - 6
src/views/information/account_info/compoments/cancel-managers/index.vue

@@ -19,10 +19,7 @@
                 @click="submit">注销
       </a-button>
     </template>
-    <a-form class="inlineForm"
-            ref="formRef"
-            :model="formState"
-            :rules="rules">
+    <a-form class="inlineForm">
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="账户权限"
@@ -59,8 +56,8 @@ 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";
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
 
 export default defineComponent({
     name: 'account_info_manager_btn_logout',

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

@@ -19,10 +19,7 @@
                 @click="submit">注销
       </a-button>
     </template>
-    <a-form class="inlineForm"
-            ref="formRef"
-            :model="formState"
-            :rules="rules">
+    <a-form class="inlineForm">
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="账户权限"

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

@@ -105,8 +105,8 @@ export default defineComponent({
         const { rolename, getRoleName } = handleRoleName();
         watchEffect(() => {
             if (visible.value) {
-                // const { selectedData, tableList } = props;
-                // mergeTwoObj(formState, selectedData);
+                const { selectedData, tableList } = props;
+                mergeTwoObj(formState, selectedData);
                 // getRoleName(tableList, selectedData);
                 // formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
                 // formState.accountname = props.selectedData.loginname;

+ 1 - 4
src/views/information/account_info/compoments/detail-managers/index.vue

@@ -12,10 +12,7 @@
                 type="primary"
                 @click="cancel">关闭</a-button>
     </template>
-    <a-form class="inlineForm"
-            ref="formRef"
-            :model="formState"
-            :rules="rules">
+    <a-form class="inlineForm">
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="账户权限"

+ 12 - 0
src/views/information/account_info/compoments/interface.ts

@@ -17,4 +17,16 @@ export interface ResetPasswordFormState {
     comfirePassword: string
     mobile?: string // 手机号码(明文)
     roleids?: number[]; // uint64 账号角色
+}
+
+export interface TraderFormState {
+    rolename: string; // 角色名称(交易账户->用户名称)
+    mobile: string; // 手机号
+}
+
+export interface AddFuturesFormState {
+    fcid: number | undefined; // uint64 期货公司
+    accountname: string; // string 账户名称accountname1(Taaccount)
+    accountid: string;
+    password: string;
 }

+ 3 - 6
src/views/information/account_info/compoments/locked-managers/index.vue

@@ -19,10 +19,7 @@
                 @click="submit">锁定
       </a-button>
     </template>
-    <a-form class="inlineForm"
-            ref="formRef"
-            :model="formState"
-            :rules="rules">
+    <a-form class="inlineForm">
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="账户权限"
@@ -59,8 +56,8 @@ 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";
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
 
 export default defineComponent({
     name: 'account_info_manager_btn_locked',

+ 163 - 0
src/views/information/account_info/compoments/modify-child-traders/index.vue

@@ -0,0 +1,163 @@
+<template>
+  <!-- 修改交易员 -->
+  <a-modal class="commonModal add-traders"
+           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="">
+            <span class="white">{{rolename}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="logincode">
+            <a-input class="dialogInput"
+                     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"
+                     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"
+                     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 accountList"
+                       :key="index"
+                       :class="[index > 1 ? 'mt10' : '']">
+                  <a-checkbox :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 { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { handleBusinessForm, handleRoleName } from '../setup';
+import { mergeTwoObj } from '@/utils/objHandle';
+import { validateAction } from '@/common/setup/form';
+import { BusinessFormState } from '../interface';
+
+export default defineComponent({
+    name: 'account_info_trade_btn_child_modify',
+    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_trade_btn_child_modify');
+        const loading = ref<boolean>(false);
+        const { rules, formState, formRef } = 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() {
+            validateAction<BusinessFormState>(formRef, formState).then((res) => {
+                const reqParam: LoginaccountOperateReq = {
+                    operatetype: 13, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
+                    // logincode: res.logincode, // string 登录账号
+                    // accountname: res.accountname, // string 账户名称
+                    // password: res.password, // string 登录密码(明文)
+                    // mobile: res.mobile, // string 手机号码(明文)
+                    // roleids: [props.selectedData.roleid], // uint64 账号角色
+                    // loginid = obj.loginid
+                    // userid = obj.userid
+                    // logintaaccounts: res.logintaaccounts.map(res => {
+                    //     const taAccount: LoginTaaccount = {
+                    //         accountid: res
+                    //     };
+                    //     return taAccount
+                    // }), // LoginTaaccount 期货账户(勾选交易员必填)
+                };
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['修改交易员成功', '修改交易员失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
+            });
+        }
+        return {
+            formState,
+            rules,
+            formRef,
+            rolename,
+            // cardTypeList,
+            // isPersonal,
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-traders {
+}
+</style
+>;

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

@@ -20,46 +20,49 @@
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="期货公司"
-                       name="userinfotype">
+                       name="fcid">
             <a-select class="inlineFormSelect"
                       style="width: 200px"
+                      v-model:value="formState.fcid"
                       placeholder="请选择期货公司">
-              <a-select-option value="权限一">权限一</a-select-option>
+              <a-select-option :value="item.fcid"
+                               :key="item.fcid"
+                               v-for="item in companyList">{{item.fcname}}
+              </a-select-option>
             </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="账户名称"
-                       name="">
+                       name="accountname">
             <a-input class="dialogInput"
                      style="width: 200px"
+                     v-model:value="formState.accountname"
                      placeholder="请输入账户名称" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="期货登录账号"
-                       name="">
+                       name="accountid">
             <a-input class="dialogInput"
                      style="width: 200px"
+                     v-model:value="formState.accountid"
                      placeholder="请输入期货登录账号" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录密码"
-                       name="">
+          <a-form-item label="交易密码"
+                       name="password">
             <a-input-password class="dialogInput"
                               style="width: 200px"
+                              v-model:value="formState.password"
                               placeholder="请输入登录密码" />
           </a-form-item>
         </a-col>
         <a-col :span="24">
           <a-form-item label="指定交易用户"
                        name="">
-            <a-select class="inlineFormSelect"
-                      style="width: 200px"
-                      placeholder="请选择指定交易用户">
-              <a-select-option value="权限一">权限一</a-select-option>
-            </a-select>
+            <span class="white">{{getUserName()}}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -69,55 +72,70 @@
 
 <script lang="ts">
 import { closeModal } from '@/common/setup/modal/index';
-import { initData } from '@/common/methods/index';
-import { defineComponent, ref, reactive, toRaw, UnwrapRef } from 'vue';
-import { AllEnums } from '@/services/go/commonService/interface';
-import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
+import { defineComponent, ref, watchEffect, PropType } from 'vue';
+import { ErmcpFuturesCompany, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
+import { handleAddOrModifyFuturesForm } from '../setup';
+import { queryResultLoadingAndInfo, requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { QueryFuturesCompany } from '@/services/go/ermcp/account';
+import { getUserName } from '@/services/bus/user';
+import { validateAction } from '@/common/setup/form';
+import { AddFuturesFormState } from '../interface';
+import { hedgeOutMainReq } from '@/services/proto/accountinfo';
+import { mergeTwoObj } from '@/utils/objHandle';
 
 export default defineComponent({
-    name: 'add-custom',
+    name: 'account_info_futures_btn_modify',
     components: {},
-    setup() {
+    props: {
+        selectedData: {
+            default: {},
+            type: Object as PropType<ErmcpTaAccountEx>,
+        },
+    },
+    setup(props, context) {
         // 控制关闭弹窗
         const { visible, cancel } = closeModal('account_info_futures_btn_modify');
-        // 证件类型
-        // 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() {
-        //     formRef.value
-        //         .validate()
-        //         .then(() => {
-        //             const param = toRaw(formState);
-        //             applyAction(param);
-        //             console.log('values', formState);
-        //         })
-        //         .catch((error: ValidateErrorEntity<FormState>) => {
-        //             console.log('error', error);
-        //         });
-        // }
+        const loading = ref<boolean>(false);
+        const companyList = ref<ErmcpFuturesCompany[]>([]);
+        const { rules, formState, formRef } = handleAddOrModifyFuturesForm();
+        watchEffect(() => {
+            if (visible.value) {
+                mergeTwoObj(formState, props.selectedData.mainAcc);
+                queryResultLoadingAndInfo(QueryFuturesCompany, loading).then((res) => {
+                    companyList.value = res;
+                });
+            }
+        });
+        function submit() {
+            validateAction<AddFuturesFormState>(formRef, formState).then((res) => {
+                // 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(hedgeOutMainReq, {}, loading, ['新增账户成功', '新增账户失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
+            });
+        }
         return {
-            // formState,
-            // rules,
-            // formRef,
-            // cardTypeList,
-            // isPersonal,
+            formState,
+            rules,
+            formRef,
             visible,
             cancel,
-            // submit,
-            // loading,
+            companyList,
+            getUserName,
+            submit,
+            loading,
         };
     },
 });

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

@@ -1,113 +0,0 @@
-<template>
-  <!-- 修改交易用户 -->
-  <a-modal class="commonModal add-traders"
-           title="修改交易用户"
-           v-model:visible="visible"
-           @cancel="cancel"
-           centered
-           :maskClosable="false"
-           width="890px">
-    <template #footer>
-      <a-button key="cancel"
-                type="primary"
-                @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="rolename">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     v-model:value="formState.rolename"
-                     placeholder="请输入账户名称" />
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="手机号码"
-                       name="mobile">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     v-model:value="formState.mobile"
-                     placeholder="请输入登录账号" />
-          </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 { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
-import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { loginAccountOperate } from '@/services/proto/accountinfo';
-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';
-
-export default defineComponent({
-    name: 'account_info_trade_btn_modify',
-    props: {
-        selectedData: {
-            type: Object as PropType<ErmcpLoginUserEx>,
-            default: {},
-        },
-    },
-    setup(props, context) {
-        // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_trade_btn_modify');
-        const loading = ref<boolean>(false);
-        const { rules, formState, formRef } = handleForm();
-        watchEffect(() => {
-            if (visible.value) {
-                const { selectedData } = props;
-                mergeTwoObj(formState, selectedData);
-                console.log('selectedData', selectedData);
-            }
-        });
-        function submit() {
-            validateAction<FormState>(formRef, formState).then((res) => {
-                const reqParam: LoginaccountOperateReq = {
-                    operatetype: 2, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
-                    userid: props.selectedData.roleid,
-                    roleids: [24],
-                    logintaaccounts: [],
-                    mobile: res.mobile, // string 手机号码(明文)
-                    accountname: res.rolename,
-                };
-                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['修改成功', '修改失败:']).then(() => {
-                    cancel();
-                    context.emit('refresh');
-                });
-            });
-        }
-        return {
-            formState,
-            rules,
-            formRef,
-            visible,
-            cancel,
-            submit,
-            loading,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.add-traders {
-}
-</style
->;

+ 0 - 4
src/views/information/account_info/compoments/modify-traders-self/interface.ts

@@ -1,4 +0,0 @@
-export interface FormState {
-    rolename: string; // 角色名称(交易账户->用户名称)
-    mobile: string; // 手机号
-}

+ 0 - 19
src/views/information/account_info/compoments/modify-traders-self/setup.ts

@@ -1,19 +0,0 @@
-import { reactive, ref, UnwrapRef } from "vue";
-import { FormState } from "./interface";
-
-/**
- * 表单
- * @returns 
- */
-export function handleForm() {
-    const formRef = ref();
-    const formState: UnwrapRef<FormState> = reactive({
-        rolename: '',
-        mobile: '',
-    })
-    const rules = {
-        rolename: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
-        mobile: [{ required: true, message: '请输入手机号码', trigger: 'blur' }],
-    }
-    return { rules, formState, formRef }
-}

+ 28 - 79
src/views/information/account_info/compoments/modify-traders/index.vue

@@ -1,17 +1,20 @@
 <template>
-  <!-- 修改交易 -->
+  <!-- 修改交易用户 -->
   <a-modal class="commonModal add-traders"
-           title="修改交易"
+           title="修改交易用户"
            v-model:visible="visible"
            @cancel="cancel"
            centered
            :maskClosable="false"
            width="890px">
     <template #footer>
+      <a-button key="cancel"
+                type="primary"
+                @click="cancel">取消</a-button>
       <a-button key="submit"
                 type="primary"
                 :loading="loading"
-                @click="submit">完成</a-button>
+                @click="submit">修改</a-button>
     </template>
     <a-form class="inlineForm"
             ref="formRef"
@@ -19,53 +22,21 @@
             :rules="rules">
       <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-form-item label="用户名称"
+                       name="rolename">
             <a-input class="dialogInput"
                      style="width: 200px"
-                     v-model:value="formState.logincode"
+                     v-model:value="formState.rolename"
                      placeholder="请输入账户名称" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录账号"
-                       name="accountname">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     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"
-                     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 accountList"
-                       :key="index"
-                       :class="[index > 1 ? 'mt10' : '']">
-                  <a-checkbox :value="item.accountid">{{item.accountname}}/{{item.accountid}}</a-checkbox>
-                </a-col>
-              </a-row>
-            </a-checkbox-group>
+                     v-model:value="formState.mobile"
+                     placeholder="请输入登录账号" />
           </a-form-item>
         </a-col>
       </a-row>
@@ -76,65 +47,46 @@
 <script lang="ts">
 import { closeModal } from '@/common/setup/modal/index';
 import { defineComponent, ref, PropType, watchEffect } from 'vue';
-import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
+import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { loginAccountOperate } from '@/services/proto/accountinfo';
-import { handleBusinessForm, handleRoleName } from '../setup';
 import { mergeTwoObj } from '@/utils/objHandle';
 import { validateAction } from '@/common/setup/form';
-import { BusinessFormState } from '../interface';
+import { handleTradeForm } from '../setup';
+import { TraderFormState } from '../interface';
 
 export default defineComponent({
-    name: 'account_info_trade_btn_child_modify',
+    name: 'account_info_trade_btn_modify',
     props: {
         selectedData: {
-            type: Object as PropType<ErmcpLoginUser>,
+            type: Object as PropType<ErmcpLoginUserEx>,
             default: {},
         },
-        tableList: {
-            type: Array as PropType<ErmcpLoginUserEx[]>,
-            default: [],
-        },
-        accountList: {
-            default: [],
-            type: Object as PropType<ErmcpTaAccount[]>,
-        },
     },
     setup(props, context) {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_trade_btn_child_modify');
+        const { visible, cancel } = closeModal('account_info_trade_btn_modify');
         const loading = ref<boolean>(false);
-        const { rules, formState, formRef } = handleBusinessForm();
-        const { rolename, getRoleName } = handleRoleName();
+        const { rules, formState, formRef } = handleTradeForm();
         watchEffect(() => {
             if (visible.value) {
-                const { selectedData, tableList } = props;
+                const { selectedData } = props;
                 mergeTwoObj(formState, selectedData);
-                getRoleName(tableList, selectedData);
-                formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
-                formState.accountname = props.selectedData.loginname;
+                console.log('selectedData', selectedData);
             }
         });
         function submit() {
-            validateAction<BusinessFormState>(formRef, formState).then((res) => {
+            validateAction<TraderFormState>(formRef, formState).then((res) => {
                 const reqParam: LoginaccountOperateReq = {
-                    operatetype: 13, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
-                    // logincode: res.logincode, // string 登录账号
-                    // accountname: res.accountname, // string 账户名称
-                    // password: res.password, // string 登录密码(明文)
-                    // mobile: res.mobile, // string 手机号码(明文)
-                    // roleids: [props.selectedData.roleid], // uint64 账号角色
-                    // loginid = obj.loginid
-                    // userid = obj.userid
-                    // logintaaccounts: res.logintaaccounts.map(res => {
-                    //     const taAccount: LoginTaaccount = {
-                    //         accountid: res
-                    //     };
-                    //     return taAccount
-                    // }), // LoginTaaccount 期货账户(勾选交易员必填)
+                    operatetype: 2, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
+                    userid: props.selectedData.roleid,
+                    roleids: [24],
+                    logintaaccounts: [],
+                    mobile: res.mobile, // string 手机号码(明文)
+                    accountname: res.rolename,
                 };
-                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['修改交易员成功', '修改交易员失败:']).then(() => {
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['修改成功', '修改失败:']).then(() => {
                     cancel();
                     context.emit('refresh');
                 });
@@ -144,9 +96,6 @@ export default defineComponent({
             formState,
             rules,
             formRef,
-            rolename,
-            // cardTypeList,
-            // isPersonal,
             visible,
             cancel,
             submit,

+ 39 - 1
src/views/information/account_info/compoments/setup.ts

@@ -1,6 +1,6 @@
 import { ErmcpLoginUser, ErmcpLoginUserEx } from "@/services/go/ermcp/account/interface";
 import { reactive, ref, UnwrapRef } from "vue";
-import { BusinessFormState, ResetPasswordFormState } from './interface';
+import { AddFuturesFormState, BusinessFormState, ResetPasswordFormState, TraderFormState } from './interface';
 
 
 /**
@@ -80,4 +80,42 @@ export function handlePasswordForm() {
 
     }
     return { rules, formState, formRef }
+}
+
+/**
+ * 
+ * @returns 交易用户
+ */
+export function handleTradeForm() {
+    const formRef = ref();
+    const formState: UnwrapRef<TraderFormState> = reactive({
+        rolename: '',
+        mobile: '',
+    })
+    const rules = {
+        rolename: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
+        mobile: [{ required: true, message: '请输入手机号码', trigger: 'blur' }],
+    }
+    return { rules, formState, formRef }
+}
+
+/**
+ * 新增、修改期货账户
+ * @returns 
+ */
+export function handleAddOrModifyFuturesForm() {
+    const formRef = ref();
+    const formState: UnwrapRef<AddFuturesFormState> = reactive({
+        accountid: '',
+        accountname: '',
+        password: '',
+        fcid: undefined,
+    })
+    const rules = {
+        accountname: [{ required: true, message: '请输入账户名称', trigger: 'blur' }],
+        password: [{ required: true, message: '请输入账户密码', trigger: 'blur' }],
+        accountid: [{ required: true, message: '请输入期货登录账号', trigger: 'blur' }],
+        fcid: [{ required: true, message: '请选择期货公司' }],
+    }
+    return { rules, formState, formRef }
 }

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

@@ -12,6 +12,7 @@
         {{getUserName()}}
       </span>
       <BtnList :btnList="firstBtn" />
+
     </div>
     <a-collapse class="spotCollapse"
                 v-for="(item, i) in tableList"
@@ -34,7 +35,9 @@
           <a-row class="headRow">
             <a-col :span="12">{{item.mainAcc.accountname}}({{item.subacclist.length}})</a-col>
             <a-col :span="12">
-              <BtnList :btnList="secondBtn" />
+              <BtnList :selectedData="item"
+                       :btnList="secondBtn"
+                       @onClick="openAction" />
             </a-col>
           </a-row>
         </template>
@@ -49,18 +52,25 @@
                 <a-col :span="12">{{getAccountStatus(sub.tradestatus)}}</a-col>
               </a-row>
             </template>
-            <BtnList :btnList="thirdBtn" />
+            <BtnList :selectedData="sub"
+                     :btnList="thirdBtn"
+                     @onClick="moreOptenAction" />
           </a-collapse-panel>
         </a-collapse>
       </a-collapse-panel>
     </a-collapse>
-    <Add />
-    <AddChild />
-    <Modify />
-    <ModifyChild />
-    <Detail />
-    <Cancel />
-    <Credit />
+    <Add @refresh="handleBtnAction" />
+    <AddChild :selectedData="addModelData"
+              @refresh="handleBtnAction" />
+    <Modify :selectedData="addModelData"
+            @refresh="handleBtnAction" />
+    <ModifyChild @refresh="handleBtnAction"
+                 :selectedData="moreModelData" />
+    <Detail :selectedData="moreModelData" />
+    <Cancel @refresh="handleBtnAction"
+            :selectedData="moreModelData" />
+    <Credit @refresh="handleBtnAction"
+            :selectedData="moreModelData" />
   </div>
 </template>
 
@@ -68,7 +78,7 @@
 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 { getAccountStatus, handleModalData } from '../setup';
 import { queryTableList } from './setup';
 import { getUserName } from '@/services/bus/user';
 import Add from '../../compoments/add-futures/index.vue';
@@ -79,6 +89,7 @@ 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';
+import { ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 
 export default defineComponent({
     name: 'account_info_futures',
@@ -98,8 +109,10 @@ export default defineComponent({
         const { loading, tableList, queryTable } = queryTableList();
         const [firstBtn, secondBtn, thirdBtn] = _getBtnList('account_info_futures', true).value;
 
-        // 新增角色
-        const { openAction: openAddPermission } = openModal('account_info_manager_btn_permission_add');
+        // 新增弹窗
+        const { selectedData: addModelData, openAction } = handleModalData<ErmcpTaAccountEx>();
+        // 修改 重置密码、详情等弹窗
+        const { selectedData: moreModelData, openAction: moreOptenAction } = handleModalData<ErmcpTaAccountEx>();
         initData(() => {
             queryTable();
         });
@@ -108,8 +121,10 @@ export default defineComponent({
         function search(value: any) {}
 
         return {
-            // commonBtn,
-            // forDataBtn,
+            addModelData,
+            openAction,
+            moreModelData,
+            moreOptenAction,
             loading,
             search,
             tableList,

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

@@ -59,13 +59,11 @@
         </a-collapse>
       </a-collapse-panel>
     </a-collapse>
-    <Add @refresh="handleBtnAction"
-         :accountList="accountList"
-         :selectedData="addModelData" />
+    <AddChild @refresh="handleBtnAction"
+              :accountList="accountList"
+              :selectedData="addModelData" />
     <Modify @refresh="handleBtnAction"
-            :accountList="accountList"
-            :tableList="tableList"
-            :selectedData="moreModelData" />
+            :selectedData="addModelData" />
     <Locked @refresh="handleBtnAction"
             :accountList="accountList"
             :tableList="tableList"
@@ -85,8 +83,10 @@
     <Detail :selectedData="moreModelData"
             :accountList="accountList"
             :tableList="tableList" />
-    <ModifySelf @refresh="handleBtnAction"
-                :selectedData="addModelData" />
+    <ModifyChild @refresh="handleBtnAction"
+                 :accountList="accountList"
+                 :tableList="tableList"
+                 :selectedData="moreModelData" />
   </div>
 </template>
 
@@ -96,13 +96,13 @@ import filterCustomTable from '@/views/information/goods/components/filterTable/
 import { getRoleTypeName } from '../setup';
 import { getUserName } from '@/services/bus/user';
 import Modify from '../../compoments/modify-traders/index.vue';
-import Add from '../../compoments/add-traders/index.vue';
+import AddChild from '../../compoments/add-child-traders/index.vue';
 import Locked from '../../compoments/locked-trader/index.vue';
 import Unlocked from '../../compoments/unlocked-trader/index.vue';
 import Cancel from '../../compoments/cancel-trader/index.vue';
 import Reset from '../../compoments/reset-trader/index.vue';
 import Detail from '../../compoments/detail-trader/index.vue';
-import ModifySelf from '../../compoments/modify-traders-self/index.vue';
+import ModifyChild from '../../compoments/modify-child-traders/index.vue';
 import { handleModalData, handleTableList } from '../setup';
 import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 import { ref } from 'vue';
@@ -117,13 +117,13 @@ export default defineComponent({
         BtnList,
         filterCustomTable,
         Modify,
-        Add,
+        AddChild,
         Locked,
         Unlocked,
         Cancel,
         Reset,
         Detail,
-        ModifySelf,
+        ModifyChild,
     },
     setup() {
         // 加载状态

+ 1 - 1
src/views/information/goods/components/modify/index.vue

@@ -412,7 +412,7 @@ export default defineComponent({
                 mergeTwoObj(formState, props.selctedDeliveryGoods);
                 mergeTwoObj(formState, data);
                 // 单位
-                formState.unitid = data.agreeunit;
+                formState.unitid = data.goodsunitid;
                 // 品类
                 formState.gldwrstandards = gmlist.map((e) => {
                     const { wrstandardid, wrstandardname, convertfactor, unitid } = e;

+ 3 - 73
src/views/information/spot-contract/components/detail/index.vue

@@ -40,14 +40,11 @@
 <script lang="ts">
 import { defineComponent, PropType, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
-import { Ermcp3ContractRsp, QueryChangeLogReq } from '@/services/go/ermcp/spot-contract/interface';
-import { queryResultLoadingAndInfo, requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
+import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { QueryBusinessFp, QueryBusinessKx } from '@/services/go/ermcp/finance-review';
-import { QueryBusinessFpReq, QueryBusinessKxReq } from '@/services/go/ermcp/finance-review/interface';
-import { QueryBusinessDj, QueryBusinessJs } from '@/services/go/ermcp/business-review';
-import { QueryBusinessDjReq, QueryBusinessJsReq } from '@/services/go/ermcp/business-review/interface';
+import { QueryBusinessJs } from '@/services/go/ermcp/business-review';
 import { QueryAreaStockApply } from '@/services/go/ermcp/inventory-review';
-import { QueryAreaStockApplyReq } from '@/services/go/ermcp/inventory-review/interface';
 import { QueryChangeLog } from '@/services/go/ermcp/spot-contract';
 import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 import InfoDetail from '../infoDetail/index.vue';
@@ -86,7 +83,6 @@ export default defineComponent({
 
         function tabClick() {
             const relatedid = props.selectedRow.spotcontractid;
-            console.log('activeKey.value', activeKey.value);
             switch (activeKey.value) {
                 case 1:
                     break;
@@ -128,75 +124,9 @@ export default defineComponent({
                     break;
             }
         }
-        function submit() {
-            cancel();
-
-            // let kxParam: QueryBusinessKxReq = {
-            //     relatedid: props.selectedRow.spotcontractid,
-            // };
-            // requestResultLoadingAndInfo(QueryBusinessKx, kxParam, loading, ['款项记录请求成功', '款项记录请求失败:']).then((res) => {
-            //     console.log('款项记录请求成功:  \n');
-            //     console.log(res);
-            //     cancel();
-            //     context.emit('refresh');
-            // });
-
-            let jsParam: QueryBusinessJsReq = {
-                relatedid: props.selectedRow.spotcontractid,
-            };
-            requestResultLoadingAndInfo(QueryBusinessJs, jsParam, loading, ['交收记录请求成功', '交收记录请求失败:']).then((res) => {
-                console.log('交收记录请求成功:  \n');
-                console.log(res);
-                cancel();
-                context.emit('refresh');
-            });
-
-            let fpParam: QueryBusinessFpReq = {
-                relatedid: props.selectedRow.spotcontractid,
-            };
-            requestResultLoadingAndInfo(QueryBusinessFp, fpParam, loading, ['发票记录请求成功', '发票记录请求失败:']).then((res) => {
-                console.log('发票记录请求成功:  \n');
-                console.log(res);
-                cancel();
-                context.emit('refresh');
-            });
-
-            let djParam: QueryBusinessDjReq = {
-                relatedid: props.selectedRow.spotcontractid,
-            };
-            requestResultLoadingAndInfo(QueryBusinessDj, djParam, loading, ['点价记录请求成功', '点价记录请求失败:']).then((res) => {
-                console.log('点价记录请求成功:  \n');
-                console.log(res);
-                cancel();
-                context.emit('refresh');
-            });
-
-            let StockParam: QueryAreaStockApplyReq = {
-                spotcontractid: props.selectedRow.spotcontractid,
-                inouttype: '1,3',
-            };
-            requestResultLoadingAndInfo(QueryAreaStockApply, StockParam, loading, ['入库记录请求成功', '入库记录请求失败:']).then((res) => {
-                console.log('入库记录请求成功:  \n');
-                console.log(res);
-                cancel();
-                context.emit('refresh');
-            });
-
-            let changParam: QueryChangeLogReq = {
-                RelatedId: props.selectedRow.spotcontractid,
-            };
-            requestResultLoadingAndInfo(QueryChangeLog, changParam, loading, ['变更记录请求成功', '变更记录请求失败:']).then((res) => {
-                console.log('变更记录请求成功:  /n');
-                console.log(res);
-                cancel();
-                context.emit('refresh');
-            });
-        }
-
         return {
             visible,
             cancel,
-            submit,
             loading,
             maskClosableFlag: false,
             activeKey,

+ 1 - 0
src/views/information/spot-contract/components/modify/index.vue

@@ -482,6 +482,7 @@ export default defineComponent({
                 deliverygoodsid && deliveryGoodsChange(deliverygoodsid);
                 formState.Qty = qty.toString();
                 formState.Price = price.toString();
+                contractChange(formState.ContractType)
             }
         });
         function submit() {