|
@@ -80,17 +80,15 @@
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
|
-import { defineComponent, ref, reactive, toRaw, UnwrapRef, watchEffect, PropType } from 'vue';
|
|
|
|
|
-import {validateAction} from "@/common/setup/form";
|
|
|
|
|
-import {FormState} from "@/views/information/account_info/compoments/add-child-futures/interface";
|
|
|
|
|
-import {HedgeOutMainConfigReq} from "@/services/proto/accountinfo/interface";
|
|
|
|
|
-import {getLongTypeLoginID} from "@/services/bus/login";
|
|
|
|
|
-import {getUserId} from "@/services/bus/account";
|
|
|
|
|
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
|
|
|
|
|
-import {hedgeOutMainReq} from "@/services/proto/accountinfo";
|
|
|
|
|
-import { handleAddOrModifyFuturesForm } from '../setup';
|
|
|
|
|
-import { handlerManagerList } from '@/common/setup/user';
|
|
|
|
|
-import { handleBusinessForm, handleTradeTemplate } from '../add-child-futures/setup';
|
|
|
|
|
|
|
+import { defineComponent, ref, watchEffect, PropType } from 'vue';
|
|
|
|
|
+import { validateAction } from '@/common/setup/form';
|
|
|
|
|
+import { FormState } from '@/views/information/account_info/compoments/add-child-futures/interface';
|
|
|
|
|
+import { HedgeOutMainConfigReq } from '@/services/proto/accountinfo/interface';
|
|
|
|
|
+import { getLongTypeLoginID } from '@/services/bus/login';
|
|
|
|
|
+import { getUserId } from '@/services/bus/account';
|
|
|
|
|
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
|
|
+import { hedgeOutMainReq } from '@/services/proto/accountinfo';
|
|
|
|
|
+import { handleBusinessForm } from '../add-child-futures/setup';
|
|
|
import { ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
|
|
import { ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
|
|
|
import { mergeTwoObj } from '@/utils/objHandle';
|
|
import { mergeTwoObj } from '@/utils/objHandle';
|
|
|
import { ErmcpTradeConfigTMP } from '@/services/go/ermcp/business-review/interface';
|
|
import { ErmcpTradeConfigTMP } from '@/services/go/ermcp/business-review/interface';
|
|
@@ -98,7 +96,7 @@ import { ErmcpTradeConfigTMP } from '@/services/go/ermcp/business-review/interfa
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'account_info_futures_btn_child_modify',
|
|
name: 'account_info_futures_btn_child_modify',
|
|
|
components: {},
|
|
components: {},
|
|
|
- props: {
|
|
|
|
|
|
|
+ props: {
|
|
|
selectedData: {
|
|
selectedData: {
|
|
|
default: {},
|
|
default: {},
|
|
|
type: Object as PropType<ErmcpTaAccountEx>,
|
|
type: Object as PropType<ErmcpTaAccountEx>,
|
|
@@ -107,7 +105,7 @@ export default defineComponent({
|
|
|
default: {},
|
|
default: {},
|
|
|
type: Object as PropType<ErmcpTaAccount>,
|
|
type: Object as PropType<ErmcpTaAccount>,
|
|
|
},
|
|
},
|
|
|
- userList: {
|
|
|
|
|
|
|
+ userList: {
|
|
|
type: Array as PropType<ErmcpLoginUserEx[]>,
|
|
type: Array as PropType<ErmcpLoginUserEx[]>,
|
|
|
default: [],
|
|
default: [],
|
|
|
},
|
|
},
|
|
@@ -128,25 +126,15 @@ export default defineComponent({
|
|
|
const { rules, formState, formRef } = handleBusinessForm();
|
|
const { rules, formState, formRef } = handleBusinessForm();
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
|
if (visible.value) {
|
|
if (visible.value) {
|
|
|
- // 默认第一个 服务只放回一个,这里是个坑
|
|
|
|
|
- const {userList, secondeData, marginList,
|
|
|
|
|
- feeList} = props
|
|
|
|
|
- if (userList.length) {
|
|
|
|
|
- formState.traderUserId = userList[0].roleid
|
|
|
|
|
- }
|
|
|
|
|
- if(marginList.length) {
|
|
|
|
|
- formState.trademargintmpid = marginList[0].tradeconfigtmpid
|
|
|
|
|
- }
|
|
|
|
|
- if(feeList.length) {
|
|
|
|
|
- formState.tradefeetmpid = feeList[0].tradeconfigtmpid
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 默认第一个 服务只放回一个,这里是个坑
|
|
|
|
|
+ const { secondeData } = props;
|
|
|
|
|
+ formState.traderUserId = secondeData.relateduserid;
|
|
|
mergeTwoObj(formState, secondeData);
|
|
mergeTwoObj(formState, secondeData);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
});
|
|
});
|
|
|
function getRoleName() {
|
|
function getRoleName() {
|
|
|
- const item = props.userList.find(e => e.roleid === props.secondeData.relateduserid)
|
|
|
|
|
- return item ? item.rolename : '--'
|
|
|
|
|
|
|
+ const item = props.userList.find((e) => e.roleid === props.secondeData.relateduserid);
|
|
|
|
|
+ return item ? item.rolename : '--';
|
|
|
}
|
|
}
|
|
|
// 增加accountid 就是修改
|
|
// 增加accountid 就是修改
|
|
|
function submit() {
|
|
function submit() {
|
|
@@ -171,7 +159,7 @@ export default defineComponent({
|
|
|
modifierid: Number(getLongTypeLoginID()), // uint64 修改人
|
|
modifierid: Number(getLongTypeLoginID()), // uint64 修改人
|
|
|
areauserid: getUserId(), // uint64 机构用户ID
|
|
areauserid: getUserId(), // uint64 机构用户ID
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
requestResultLoadingAndInfo(hedgeOutMainReq, reqParam, loading, ['修改期货子账户成功', '修改期货子账户失败:']).then(() => {
|
|
requestResultLoadingAndInfo(hedgeOutMainReq, reqParam, loading, ['修改期货子账户成功', '修改期货子账户失败:']).then(() => {
|
|
|
cancel();
|
|
cancel();
|
|
|
context.emit('refresh');
|
|
context.emit('refresh');
|