|
|
@@ -21,37 +21,41 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="所属用户"
|
|
|
name="">
|
|
|
- <span class="white">王凌团队</span>
|
|
|
+ <span class="white">{{rolename}}</span>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="账户名称"
|
|
|
- name="">
|
|
|
+ name="logincode">
|
|
|
<a-input class="dialogInput"
|
|
|
style="width: 200px"
|
|
|
+ v-model:value="formState.logincode"
|
|
|
placeholder="请输入账户名称" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="登录账号"
|
|
|
- name="">
|
|
|
+ name="accountname">
|
|
|
<a-input class="dialogInput"
|
|
|
style="width: 200px"
|
|
|
+ v-model:value="formState.accountname"
|
|
|
placeholder="请输入登录账号" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="登录密码"
|
|
|
- name="">
|
|
|
+ name="password">
|
|
|
<a-input-password class="dialogInput"
|
|
|
style="width: 200px"
|
|
|
+ v-model:value="formState.password"
|
|
|
placeholder="请输入登录密码" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
<a-form-item label="手机号码"
|
|
|
- name="">
|
|
|
+ name="mobile">
|
|
|
<a-input class="dialogInput"
|
|
|
+ v-model:value="formState.mobile"
|
|
|
style="width: 200px"
|
|
|
placeholder="请输入手机号码" />
|
|
|
</a-form-item>
|
|
|
@@ -59,22 +63,14 @@
|
|
|
<a-col :span="24">
|
|
|
<a-form-item label="授权期货账户"
|
|
|
class="checkboxGroupItem"
|
|
|
- name="">
|
|
|
- <a-checkbox-group class="commonCheckboxGroup">
|
|
|
+ name="logintaaccounts">
|
|
|
+ <a-checkbox-group class="commonCheckboxGroup"
|
|
|
+ v-model:value="formState.logintaaccounts">
|
|
|
<a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-checkbox value="A">期货子账户/250000010003</a-checkbox>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-checkbox value="B">铜套保专用账户/25000000011</a-checkbox>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12"
|
|
|
- class="mt20">
|
|
|
- <a-checkbox value="C">银套保专用账户/250000010003</a-checkbox>
|
|
|
- </a-col>
|
|
|
<a-col :span="12"
|
|
|
- class="mt20">
|
|
|
- <a-checkbox value="D">铁矿石套保专用账户/25000000013Q</a-checkbox>
|
|
|
+ v-for="(item, index) in accountList"
|
|
|
+ :key="index">
|
|
|
+ <a-checkbox :value="item.accountid">{{item.accountname}}/{{item.accountid}}</a-checkbox>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-checkbox-group>
|
|
|
@@ -87,37 +83,43 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
|
-import {defineComponent, ref, reactive, toRaw, UnwrapRef, PropType} from 'vue';
|
|
|
-import { AllEnums } from '@/services/go/commonService/interface';
|
|
|
-import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
|
-import {ErmcpLoginUser} from "@/services/go/ermcp/account/interface";
|
|
|
-import {LoginaccountOperateReq, LoginTaaccount} from "@/services/proto/accountinfo/interface";
|
|
|
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
|
|
|
-import {loginAccountOperate} from "@/services/proto/accountinfo";
|
|
|
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
|
|
|
+import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
|
|
|
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
|
|
|
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
+import { loginAccountOperate } from '@/services/proto/accountinfo';
|
|
|
+import { handleBusinessForm, handleRoleName } from '../setup';
|
|
|
+import { mergeTwoObj } from '@/utils/objHandle';
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: 'add-custom',
|
|
|
- components: {},
|
|
|
- setup(name, context) {
|
|
|
+ name: 'account_info_trade_btn_modify',
|
|
|
+ props: {
|
|
|
+ selectedData: {
|
|
|
+ type: Object as PropType<ErmcpLoginUser>,
|
|
|
+ default: {},
|
|
|
+ },
|
|
|
+ tableList: {
|
|
|
+ type: Array as PropType<ErmcpLoginUserEx[]>,
|
|
|
+ default: [],
|
|
|
+ },
|
|
|
+ accountList: {
|
|
|
+ default: [],
|
|
|
+ type: Object as PropType<ErmcpTaAccount[]>,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ setup(props, context) {
|
|
|
// 控制关闭弹窗
|
|
|
const { visible, cancel } = closeModal('account_info_trade_btn_modify');
|
|
|
const loading = ref<boolean>(false);
|
|
|
- // 证件类型
|
|
|
- // const cardTypeList = ref<AllEnums[]>(getCardType());
|
|
|
- // // 表单
|
|
|
- // const formRef = ref();
|
|
|
- // const formState: UnwrapRef<FormState> = reactive(initFormState());
|
|
|
- // const rules = {
|
|
|
- // userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
|
|
|
- // customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
|
|
|
- // nickname: [{ required: true, message: '请输入企业简称', trigger: 'blur' }],
|
|
|
- // cardtype: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
|
|
|
- // };
|
|
|
- // // 下单方法
|
|
|
- // const { loading, applyAction } = handleApply();
|
|
|
- // function isPersonal(): boolean {
|
|
|
- // return formState.userinfotype === '1';
|
|
|
- // }
|
|
|
+ const { rules, formState, formRef } = handleBusinessForm();
|
|
|
+ const { rolename, getRoleName } = handleRoleName();
|
|
|
+ watchEffect(() => {
|
|
|
+ if (visible.value) {
|
|
|
+ const { selectedData, tableList } = props;
|
|
|
+ mergeTwoObj(formState, selectedData);
|
|
|
+ getRoleName(tableList, selectedData);
|
|
|
+ }
|
|
|
+ });
|
|
|
function submit() {
|
|
|
const reqParam: LoginaccountOperateReq = {
|
|
|
operatetype: 13, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
|
|
|
@@ -134,22 +136,23 @@ export default defineComponent({
|
|
|
// };
|
|
|
// return taAccount
|
|
|
// }), // LoginTaaccount 期货账户(勾选交易员必填)
|
|
|
- }
|
|
|
+ };
|
|
|
requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['修改交易员成功', '修改交易员失败:']).then(() => {
|
|
|
cancel();
|
|
|
context.emit('refresh');
|
|
|
});
|
|
|
}
|
|
|
return {
|
|
|
- // formState,
|
|
|
- // rules,
|
|
|
- // formRef,
|
|
|
+ formState,
|
|
|
+ rules,
|
|
|
+ formRef,
|
|
|
+ rolename,
|
|
|
// cardTypeList,
|
|
|
// isPersonal,
|
|
|
visible,
|
|
|
cancel,
|
|
|
- // submit,
|
|
|
- // loading,
|
|
|
+ submit,
|
|
|
+ loading,
|
|
|
};
|
|
|
},
|
|
|
});
|