Selaa lähdekoodia

修改平安期货账号

huangbin 4 vuotta sitten
vanhempi
commit
8668f0a3c7

+ 13 - 9
src/views/information/account_info/compoments/add-child-futures/index.vue

@@ -27,7 +27,8 @@
         <a-col :span="12">
           <a-form-item label="所属期货账户"
                        name="userinfotype">
-            <span class="white">{{selectedData.mainAcc.accountname}}/{{selectedData.mainAcc.hedgeaccountcode}}</span>
+            <span
+                  class="white">{{selectedData.mainAcc.accountname}}/{{selectedData.mainAcc.hedgeaccountcode}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
@@ -69,7 +70,8 @@
             </a-select>
           </a-form-item>
         </a-col>
-        <a-col :span="12">
+        <a-col :span="12"
+               v-if="!isPingAnOem()">
           <a-form-item label="指定交易用户"
                        name="traderUserId">
             <a-select class="inlineFormSelect"
@@ -96,22 +98,23 @@
 import { closeModal, openModal } from '@/common/setup/modal/index';
 import { defineComponent, PropType, ref, watchEffect } from 'vue';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import {ErmcpBizGroupReq, HedgeOutMainConfigReq} from '@/services/proto/accountinfo/interface';
+import { ErmcpBizGroupReq, HedgeOutMainConfigReq } from '@/services/proto/accountinfo/interface';
 import { validateAction } from '@/common/setup/form';
 import { FormState } from './interface';
 import { handleBusinessForm, handleTradeTemplate } from './setup';
 import { hedgeOutMainReq } from '@/services/proto/accountinfo';
 import { ErmcpLoginUserEx, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 import { handlerManagerList } from '@/common/setup/user';
-import {getLongTypeLoginID} from "@/services/bus/login";
-import {getUserId} from "@/services/bus/account";
-import AddTrader from '../add-traders/index.vue'
+import { getLongTypeLoginID } from '@/services/bus/login';
+import { getUserId } from '@/services/bus/account';
+import AddTrader from '../add-traders/index.vue';
 import { ErmcpTradeConfigTMP } from '@/services/go/ermcp/business-review/interface';
+import { isPingAnOem } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'account_info_futures_btn_add',
     components: {
-      AddTrader,
+        AddTrader,
     },
     props: {
         selectedData: {
@@ -135,11 +138,11 @@ export default defineComponent({
         // 控制关闭弹窗
         const { visible, cancel } = closeModal('account_info_futures_btn_child_add');
         // 新增交易用户
-        const {openAction: addTrader} = openModal('account_info_trade_btn_add') 
+        const { openAction: addTrader } = openModal('account_info_trade_btn_add');
         const loading = ref<boolean>(false);
         const { rules, formState, formRef } = handleBusinessForm();
         function updateTrader() {
-          context.emit('updateTrader')
+            context.emit('updateTrader');
         }
         function submit() {
             validateAction<FormState>(formRef, formState).then((res) => {
@@ -179,6 +182,7 @@ export default defineComponent({
             addTrader,
             updateTrader,
             loading,
+            isPingAnOem,
         };
     },
 });

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

@@ -66,7 +66,8 @@
                               placeholder="请输入交易密码" />
           </a-form-item>
         </a-col>
-        <a-col :span="24">
+        <a-col :span="24"
+               v-if="!isPingAnOem()">
           <a-form-item label="指定交易用户"
                        name="">
             <span class="white">{{getUserName()}}</span>
@@ -92,6 +93,7 @@ import { AddFuturesFormState } from '../interface';
 import { getLongTypeLoginID } from '@/services/bus/login';
 import { LongType } from '@/services/socket/login/interface';
 import { getUserId } from '@/services/bus/account';
+import { isPingAnOem } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'account_info_futures_btn_add',
@@ -149,6 +151,7 @@ export default defineComponent({
             getUserName,
             submit,
             loading,
+            isPingAnOem,
         };
     },
 });

+ 19 - 7
src/views/information/account_info/compoments/detail-commom-futures/index.vue

@@ -7,6 +7,7 @@
 import { defineComponent, PropType, watchEffect } from 'vue';
 import { ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 import { Des, handleDesList } from '@/common/components/commonDes';
+import { isPingAnOem } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'futures-comom-detail',
@@ -37,13 +38,24 @@ export default defineComponent({
             if (props.selectedData) {
                 const { secondeData, selectedData } = props;
                 const data = props.selectedData;
-                getDesList([
-                    { label: '所属期货账户', value: selectedData.mainAcc?.accountname },
-                    { label: '账户名称', value: secondeData.accountname },
-                    { label: '期货保证金', value: secondeData.trademargintmpname },
-                    { label: '期货手续费', value: secondeData.tradefeetmpname },
-                    { label: '指定交易用户', value: getRoleName() },
-                ]);
+                let list = [];
+                if (isPingAnOem()) {
+                    list = [
+                        { label: '所属期货账户', value: selectedData.mainAcc?.accountname },
+                        { label: '账户名称', value: secondeData.accountname },
+                        { label: '期货保证金', value: secondeData.trademargintmpname },
+                        { label: '期货手续费', value: secondeData.tradefeetmpname },
+                    ];
+                } else {
+                    list = [
+                        { label: '所属期货账户', value: selectedData.mainAcc?.accountname },
+                        { label: '账户名称', value: secondeData.accountname },
+                        { label: '期货保证金', value: secondeData.trademargintmpname },
+                        { label: '期货手续费', value: secondeData.tradefeetmpname },
+                        { label: '指定交易用户', value: getRoleName() },
+                    ];
+                }
+                getDesList(list);
             }
         });
         return {

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

@@ -25,7 +25,8 @@
         <a-col :span="12">
           <a-form-item label="所属期货账户"
                        name="userinfotype">
-            <span class="white">{{selectedData.mainAcc.accountname}}/{{selectedData.mainAcc.hedgeaccountcode}}</span>
+            <span
+                  class="white">{{selectedData.mainAcc.accountname}}/{{selectedData.mainAcc.hedgeaccountcode}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
@@ -67,7 +68,8 @@
             </a-select>
           </a-form-item>
         </a-col>
-        <a-col :span="24">
+        <a-col :span="24"
+               v-if="!isPingAnOem()">
           <a-form-item label="指定交易用户"
                        name="traderUserId">
             <span class="white">{{getRoleName()}}</span>
@@ -92,6 +94,7 @@ import { handleBusinessForm } from '../add-child-futures/setup';
 import { ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 import { mergeTwoObj } from '@/utils/objHandle';
 import { ErmcpTradeConfigTMP } from '@/services/go/ermcp/business-review/interface';
+import { isPingAnOem } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'account_info_futures_btn_child_modify',
@@ -175,6 +178,7 @@ export default defineComponent({
             submit,
             getRoleName,
             loading,
+            isPingAnOem,
         };
     },
 });

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

@@ -64,7 +64,8 @@
                               placeholder="请输入登录密码" />
           </a-form-item>
         </a-col>
-        <a-col :span="24">
+        <a-col :span="24"
+               v-if="!isPingAnOem()">
           <a-form-item label="指定交易用户"
                        name="">
             <span class="white">{{getUserName()}}</span>
@@ -87,9 +88,10 @@ import { validateAction } from '@/common/setup/form';
 import { AddFuturesFormState } from '../interface';
 import { hedgeOutMainReq } from '@/services/proto/accountinfo';
 import { mergeTwoObj } from '@/utils/objHandle';
-import { getUserId } from "@/services/bus/account";
-import { getLongTypeLoginID } from "@/services/bus/login";
+import { getUserId } from '@/services/bus/account';
+import { getLongTypeLoginID } from '@/services/bus/login';
 import { HedgeOutMainConfigReq } from '@/services/proto/accountinfo/interface';
+import { isPingAnOem } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'account_info_futures_btn_modify',
@@ -108,11 +110,11 @@ export default defineComponent({
         const { rules, formState, formRef, initFormData } = handleAddOrModifyFuturesForm();
         watchEffect(() => {
             if (visible.value) {
-              console.log(props.selectedData);
-              
+                console.log(props.selectedData);
+
                 mergeTwoObj(formState, props.selectedData?.mainAcc);
-                if(props.selectedData?.mainAcc) {
-                  formState.accountid = props.selectedData.mainAcc.hedgeaccountcode
+                if (props.selectedData?.mainAcc) {
+                    formState.accountid = props.selectedData.mainAcc.hedgeaccountcode;
                 }
                 queryResultLoadingAndInfo(QueryFuturesCompany, loading).then((res) => {
                     companyList.value = res;
@@ -122,22 +124,22 @@ export default defineComponent({
         function submit() {
             validateAction<AddFuturesFormState>(formRef, formState).then((res) => {
                 let reqParam: HedgeOutMainConfigReq = {
-                      marketid: 15101, // uint64 内部市场ID(HedgeOutMainConfig)
-                      hedgeaccountcode: res.accountid, // string 对冲账号ID(HedgeOutMainConfig)
-                      hedgeaccountpwd: res.password, // string 对冲账号密码(HedgeOutMainConfig)
-                      limitnumber: 0, // uint64 挂单笔数限额默认0(HedgeOutMainConfig)
-                      status: 1, // int32 渠道账号状态 1-可买入可卖出 2-可卖出不可买入默认1(HedgeOutMainConfig)
-                      accountname: res.accountname, // string 账户名称accountname1(Taaccount)
-                      accountid: props.selectedData.mainAcc.accountid, // uint64 资金账户ID(Taaccount)
-                      taaccounttype: 1, // int32 账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号(Taaccount)
-                      currencyid: 1, // int32 货币ID默认为1(Taaccount)
-                      outthreshold: 0, // double 出金阈值默认为0(Taaccount)
-                      ismain: 1, // int32 是否母账号 0:不是母账户 1:是母账户(Taaccount)
-                      relateduserid: getUserId(), // uint64 关联用户(Taaccount)
-                      maxsubaccouts: 0, // uint64 最大子账户数[最大99999][外部母账户用 默认0(TAACCOUNTCONFIG)
-                      fcid: res.fcid as number, // uint64 期货公司
-                      modifierid: Number(getLongTypeLoginID()), // uint64 修改人
-                      areauserid: getUserId(), // uint64 机构用户ID
+                    marketid: 15101, // uint64 内部市场ID(HedgeOutMainConfig)
+                    hedgeaccountcode: res.accountid, // string 对冲账号ID(HedgeOutMainConfig)
+                    hedgeaccountpwd: res.password, // string 对冲账号密码(HedgeOutMainConfig)
+                    limitnumber: 0, // uint64 挂单笔数限额默认0(HedgeOutMainConfig)
+                    status: 1, // int32 渠道账号状态 1-可买入可卖出 2-可卖出不可买入默认1(HedgeOutMainConfig)
+                    accountname: res.accountname, // string 账户名称accountname1(Taaccount)
+                    accountid: props.selectedData.mainAcc.accountid, // uint64 资金账户ID(Taaccount)
+                    taaccounttype: 1, // int32 账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号(Taaccount)
+                    currencyid: 1, // int32 货币ID默认为1(Taaccount)
+                    outthreshold: 0, // double 出金阈值默认为0(Taaccount)
+                    ismain: 1, // int32 是否母账号 0:不是母账户 1:是母账户(Taaccount)
+                    relateduserid: getUserId(), // uint64 关联用户(Taaccount)
+                    maxsubaccouts: 0, // uint64 最大子账户数[最大99999][外部母账户用 默认0(TAACCOUNTCONFIG)
+                    fcid: res.fcid as number, // uint64 期货公司
+                    modifierid: Number(getLongTypeLoginID()), // uint64 修改人
+                    areauserid: getUserId(), // uint64 机构用户ID
                 };
 
                 requestResultLoadingAndInfo(hedgeOutMainReq, reqParam, loading, ['修改账户成功', '修改账户失败:']).then(() => {
@@ -147,8 +149,8 @@ export default defineComponent({
             });
         }
         function closeAction() {
-          Object.assign(formState, initFormData())
-          cancel();
+            Object.assign(formState, initFormData());
+            cancel();
         }
         return {
             formState,
@@ -161,6 +163,7 @@ export default defineComponent({
             submit,
             loading,
             cancel,
+            isPingAnOem,
         };
     },
 });