|
|
@@ -79,25 +79,70 @@ import { closeModal } from '@/common/setup/modal/index';
|
|
|
import { defineComponent, ref, toRaw } from 'vue';
|
|
|
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
|
import { handleForm, FormState } from './setup';
|
|
|
+import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
|
|
|
+import {QueryAddUserInfoApply} from "@/services/go/ermcp/customInfo";
|
|
|
+import {loginAccountOperate} from "@/services/proto/accountinfo";
|
|
|
+import {getUserId} from "@/services/bus/account";
|
|
|
+import {getLongTypeLoginID} from "@/services/bus/login";
|
|
|
+import {LoginaccountOperateReq} from "@/services/proto/accountinfo/interface";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'add-business-info',
|
|
|
components: {},
|
|
|
- setup() {
|
|
|
+ setup(name ,context) {
|
|
|
// 控制关闭弹窗
|
|
|
const { visible, cancel } = closeModal('account_info_business_btn_add');
|
|
|
const loading = ref<boolean>(false);
|
|
|
const { rules, formState, formRef } = handleForm();
|
|
|
function submit() {
|
|
|
- formRef.value
|
|
|
- .validate()
|
|
|
- .then(() => {
|
|
|
- const param = toRaw(formState);
|
|
|
- console.log('values', param);
|
|
|
- })
|
|
|
- .catch((error: ValidateErrorEntity<FormState>) => {
|
|
|
- console.log('error', error);
|
|
|
- });
|
|
|
+
|
|
|
+ let reqParam :LoginaccountOperateReq = {
|
|
|
+ operatetype: 1, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
|
|
|
+ // userid: number, // uint64 用户ID(新增成功接口返回的userid)
|
|
|
+ // loginid: number, // uint64 登录ID(新增成功接口返回的loginid)
|
|
|
+ areauserid: getUserId(), // uint64 所属机构(当前登录userid 必填)
|
|
|
+ logincode: "10002130", // string 登录账号
|
|
|
+ accountname: "test432423", // string 账户名称
|
|
|
+ password: "123123", // string 登录密码(明文)
|
|
|
+ mobile: "131111111111", // string 手机号码(明文)
|
|
|
+ roleids: [22], // uint64 账号角色
|
|
|
+ // logintaaccounts: LoginTaaccount[], // LoginTaaccount 期货账户(勾选交易员必填)
|
|
|
+ modifierid: Number(getLongTypeLoginID()), // uint64 修改人ID(当前登录loginid 必填)
|
|
|
+
|
|
|
+ }
|
|
|
+ requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增账户成功', '新增账户失败:'] ).then(() => {
|
|
|
+ cancel();
|
|
|
+ context.emit('refresh');
|
|
|
+ });
|
|
|
+
|
|
|
+ // formRef.value
|
|
|
+ // .validate()
|
|
|
+ // .then(() => {
|
|
|
+ // const param = toRaw(formState);
|
|
|
+ // console.log('values', param);
|
|
|
+ //
|
|
|
+ // let reqParam :LoginaccountOperateReq = {
|
|
|
+ // operatetype: 1, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
|
|
|
+ // // userid: number, // uint64 用户ID(新增成功接口返回的userid)
|
|
|
+ // // loginid: number, // uint64 登录ID(新增成功接口返回的loginid)
|
|
|
+ // areauserid: getUserId(), // uint64 所属机构(当前登录userid 必填)
|
|
|
+ // logincode: param.logincode, // string 登录账号
|
|
|
+ // accountname: param.accountname, // string 账户名称
|
|
|
+ // password: param.password, // string 登录密码(明文)
|
|
|
+ // mobile: param.mobile, // string 手机号码(明文)
|
|
|
+ // roleids: [22, 23], // uint64 账号角色
|
|
|
+ // // logintaaccounts: LoginTaaccount[], // LoginTaaccount 期货账户(勾选交易员必填)
|
|
|
+ // modifierid: getLongTypeLoginID(), // uint64 修改人ID(当前登录loginid 必填)
|
|
|
+ // }
|
|
|
+ // requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
|
|
|
+ // cancel();
|
|
|
+ // context.emit('refresh');
|
|
|
+ // });
|
|
|
+ //
|
|
|
+ // })
|
|
|
+ // .catch((error: ValidateErrorEntity<FormState>) => {
|
|
|
+ // console.log('error', error);
|
|
|
+ // });
|
|
|
}
|
|
|
return {
|
|
|
formState,
|