|
@@ -87,10 +87,14 @@ import { closeModal } from '@/common/setup/modal/index';
|
|
|
import { defineComponent, ref, PropType, watchEffect } from 'vue';
|
|
import { defineComponent, ref, PropType, watchEffect } from 'vue';
|
|
|
import { ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
|
|
import { ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
|
|
|
import { queryTableList } from '../../list/account_info_futures/setup';
|
|
import { queryTableList } from '../../list/account_info_futures/setup';
|
|
|
-import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
|
|
|
|
+import {queryResultLoadingAndInfo, requestResultLoadingAndInfo} from '@/common/methods/request/resultInfo';
|
|
|
import { handleBusinessForm } from '../setup';
|
|
import { handleBusinessForm } from '../setup';
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
import { BusinessFormState } from '../interface';
|
|
import { BusinessFormState } from '../interface';
|
|
|
|
|
+import {loginAccountOperate} from "@/services/proto/accountinfo";
|
|
|
|
|
+import {LoginaccountOperateReq, LoginTaaccount} from "@/services/proto/accountinfo/interface";
|
|
|
|
|
+import {getUserId} from "@/services/bus/account";
|
|
|
|
|
+import {getLongTypeLoginID} from "@/services/bus/login";
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'account_info_trade_btn_add',
|
|
name: 'account_info_trade_btn_add',
|
|
@@ -101,7 +105,7 @@ export default defineComponent({
|
|
|
type: Object as PropType<ErmcpLoginUserEx>,
|
|
type: Object as PropType<ErmcpLoginUserEx>,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- setup(props) {
|
|
|
|
|
|
|
+ setup(props, context) {
|
|
|
const { loading, tableList, queryTable } = queryTableList();
|
|
const { loading, tableList, queryTable } = queryTableList();
|
|
|
const accountList = ref<ErmcpTaAccount[]>([]);
|
|
const accountList = ref<ErmcpTaAccount[]>([]);
|
|
|
// 控制关闭弹窗
|
|
// 控制关闭弹窗
|
|
@@ -121,7 +125,28 @@ export default defineComponent({
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
function submit() {
|
|
function submit() {
|
|
|
- validateAction<BusinessFormState>(formRef, formState).then((res) => {});
|
|
|
|
|
|
|
+ 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 {
|
|
return {
|
|
|
formState,
|
|
formState,
|