huangbin 4 rokov pred
rodič
commit
e2eceb2483

+ 2 - 2
src/services/go/ermcp/account/index.ts

@@ -1,6 +1,6 @@
 /** ================================= 账户管理 ================================**/
 import { getUserId } from "@/services/bus/account";
-import { getAreaUserId, getUserAccountType } from "@/services/bus/user";
+import { getUserAccountType } from "@/services/bus/user";
 import { commonSearch_go } from "@/services/go";
 import {
     ErmcpBizGroupEx,
@@ -25,7 +25,7 @@ export function QueryAccMgrBizGroupSet(req: ErmcpBizGroupReq): Promise<ErmcpBizG
  * @constructor
  */
 export function QueryAccMgrTaaccount(): Promise<ErmcpTaAccountEx[]> {
-    const userid = getAreaUserId();
+    const userid = getUserId();
     return commonSearch_go('/Ermcp/QueryAccMgrTaaccount', { userid }).catch((err) => {
         throw new Error(`查询账户管理期货账号: ${err}`);
     });

+ 1 - 1
src/views/account/login.vue

@@ -154,7 +154,7 @@ export default defineComponent({
             const img = document.querySelector('#logo_img') || document.createElement('img');
             const obj = {
                 id: 'logo_img',
-                src: './pinganLogo.png',
+                src: './logo.png',
                 style: 'margin-bottom: 180px',
             };
             Object.assign(img, obj);

+ 22 - 2
src/views/information/account_info/compoments/add-managers/index.vue

@@ -67,6 +67,23 @@
                      placeholder="请输入手机号码" />
           </a-form-item>
         </a-col>
+        <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"
+                            v-if="item.tradestatus === 1">{{item.accountname}}/{{item.accountid}}
+                </a-checkbox>
+              </a-col>
+            </a-row>
+          </a-checkbox-group>
+        </a-form-item>
       </a-row>
     </a-form>
   </a-modal>
@@ -76,12 +93,13 @@
 import { closeModal } from '@/common/setup/modal/index';
 import { defineComponent, ref, PropType } from 'vue';
 import { handleBusinessForm } from '../setup';
-import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
+import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
 import { validateAction } from '@/common/setup/form';
 import { BusinessFormState } from '../interface';
 import { LoginaccountOperateReq, LoginTaaccount } from '@/services/proto/accountinfo/interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { useTaAccount } from '../../list/setup';
 
 export default defineComponent({
     name: 'account_info_manager_btn_child_add',
@@ -97,7 +115,8 @@ export default defineComponent({
         const { visible, cancel } = closeModal('account_info_manager_btn_child_add');
         const { rules, formState, formRef } = handleBusinessForm();
         const loading = ref<boolean>(false);
-
+        // 期货账户
+        const { accountList } = useTaAccount();
         function submit() {
             validateAction<BusinessFormState>(formRef, formState).then((res) => {
                 const reqParam: LoginaccountOperateReq = {
@@ -123,6 +142,7 @@ export default defineComponent({
             cancel,
             submit,
             loading,
+            accountList,
         };
     },
 });

+ 25 - 2
src/views/information/account_info/compoments/detail-commom-manager/index.vue

@@ -1,18 +1,36 @@
 <template>
   <!-- 交易账号通用详情-->
-  <Des :list="desList"></Des>
+  <Des :list="desList"
+       :slotDesName="'授权期货账户'">
+    <a-checkbox-group class="commonCheckboxGroup"
+                      v-model:value="logintaaccounts">
+      <a-row>
+        <a-col :span="12"
+               v-for="(item, index) in selectedData.acclist"
+               :key="index"
+               :class="[index > 1 ? 'mt10' : '']">
+          <a-checkbox :value="item.accountid"
+                      disabled>
+            {{item.accountname}}/{{item.accountid}}
+          </a-checkbox>
+        </a-col>
+      </a-row>
+    </a-checkbox-group>
+  </Des>
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, watchEffect } from 'vue';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
 import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
 import { Des, handleDesList } from '@/common/components/commonDes';
+import { useTaAccount } from '../../list/setup';
 
 export default defineComponent({
     name: 'business-comom-detail',
     components: {
         Des,
     },
+
     props: {
         selectedData: {
             type: Object as PropType<ErmcpLoginUser>,
@@ -21,6 +39,10 @@ export default defineComponent({
     },
     setup(props) {
         const { desList, getDesList } = handleDesList();
+        // 账户角色
+        const logintaaccounts = ref<number[]>([]);
+        // 期货账户
+        const { accountList, filerTaAccount } = useTaAccount();
         watchEffect(() => {
             if (props.selectedData) {
                 const data = props.selectedData;
@@ -30,6 +52,7 @@ export default defineComponent({
                     { label: '登录账号', value: data.logincode },
                     { label: '手机号码', value: data.mobile },
                 ]);
+                logintaaccounts.value = data.acclist?.map((e) => e.accountid);
             }
         });
         return {

+ 6 - 2
src/views/information/account_info/compoments/modify-managers/index.vue

@@ -75,8 +75,9 @@ import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo
 import { loginAccountOperate } from '@/services/proto/accountinfo';
 import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 import { mergeTwoObj } from '@/utils/objHandle';
-import {getUID} from "echarts/types/src/util/component";
-import {getUserId} from "@/services/bus/account";
+import { getUID } from 'echarts/types/src/util/component';
+import { getUserId } from '@/services/bus/account';
+import { useTaAccount } from '../../list/setup';
 
 export default defineComponent({
     name: 'account_info_manager_btn_modify',
@@ -95,6 +96,8 @@ export default defineComponent({
         const { visible, cancel } = closeModal('account_info_manager_btn_modify');
         const { rules, formState, formRef } = handleBusinessForm();
         const loading = ref<boolean>(false);
+        // 期货账户
+        const { accountList, filerTaAccount } = useTaAccount();
         watchEffect(() => {
             if (visible.value) {
                 mergeTwoObj(formState, props.selectedData);
@@ -127,6 +130,7 @@ export default defineComponent({
             cancel,
             submit,
             loading,
+            accountList,
         };
     },
 });

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

@@ -61,6 +61,7 @@
       </a-collapse>
     </div>
     <Add @refresh="handleBtnAction"
+         :selectedData="addModelData"
          :tableList="tableList" />
     <Modify :tableList="tableList"
             @refresh="handleBtnAction"
@@ -83,7 +84,7 @@
 import { defineComponent, initData, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
-import { getAccountStatus, handleModalData, handleTableList } from '../setup';
+import { getAccountStatus, handleModalData, handleTableList, useTaAccount } from '../setup';
 import { getUserName } from '@/services/bus/user';
 import Add from '../../compoments/add-managers/index.vue';
 import Modify from '../../compoments/modify-managers/index.vue';
@@ -128,8 +129,11 @@ export default defineComponent({
         function handleBtnAction() {
             handleTableList(queryTable, tableList, thirdBtn);
         }
+        // 期货账户
+        const { updateTaAccount } = useTaAccount();
         initData(() => {
             handleBtnAction();
+            updateTaAccount();
         });
 
         // 查询

+ 41 - 1
src/views/information/account_info/list/setup.ts

@@ -1,5 +1,8 @@
 import { BtnListType } from '@/common/components/btnList/interface';
-import { ErmcpLoginUserEx } from "@/services/go/ermcp/account/interface";
+import { initData } from '@/common/methods';
+import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { QueryAccMgrTaaccount } from '@/services/go/ermcp/account';
+import { ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from "@/services/go/ermcp/account/interface";
 import { reactive, ref, Ref } from "vue";
 
 /**
@@ -150,4 +153,41 @@ export function handleBtnClickData() {
         thirdBtnDat.value = rest[0];
     }
     return { firstBtnData, secondBtnData, thirdBtnDat, btnClick }
+}
+
+
+// 授权期货账户
+const accountList = ref<ErmcpTaAccount[]>([]);
+// 查询账户管理期货账号
+export function useTaAccount() {
+    const loading = ref<boolean>(false)
+    function loadTaAccount() {
+        queryResultLoadingAndInfo(QueryAccMgrTaaccount, loading).then((res) => {
+            accountList.value.length = 0;
+            res.forEach((el: ErmcpTaAccountEx) => {
+                const { subacclist } = el;
+                subacclist.forEach((e) => {
+                    if (e.tradestatus === 1) {
+                        //交易状态 - 1:正常
+                        accountList.value.push(e);
+                    }
+                });
+            });
+        });
+    }
+    initData(() => {
+        // 处理授权期货账户
+        if (accountList.value.length === 0) {
+            loadTaAccount()
+        }
+    })
+    // 更新授权期货账户
+    function updateTaAccount() {
+        loadTaAccount()
+    }
+    // 过滤授权期货账户
+    function filerTaAccount(id: number) {
+        return accountList.value.filter((e) => e.relateduserid === id);
+    }
+    return { accountList, filerTaAccount, updateTaAccount }
 }