|
@@ -20,46 +20,49 @@
|
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="期货公司"
|
|
<a-form-item label="期货公司"
|
|
|
- name="userinfotype">
|
|
|
|
|
|
|
+ name="fcid">
|
|
|
<a-select class="inlineFormSelect"
|
|
<a-select class="inlineFormSelect"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.fcid"
|
|
|
placeholder="请选择期货公司">
|
|
placeholder="请选择期货公司">
|
|
|
- <a-select-option value="权限一">权限一</a-select-option>
|
|
|
|
|
|
|
+ <a-select-option :value="item.fcid"
|
|
|
|
|
+ :key="item.fcid"
|
|
|
|
|
+ v-for="item in companyList">{{item.fcname}}
|
|
|
|
|
+ </a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="账户名称"
|
|
<a-form-item label="账户名称"
|
|
|
- name="">
|
|
|
|
|
|
|
+ name="accountname">
|
|
|
<a-input class="dialogInput"
|
|
<a-input class="dialogInput"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.accountname"
|
|
|
placeholder="请输入账户名称" />
|
|
placeholder="请输入账户名称" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="期货登录账号"
|
|
<a-form-item label="期货登录账号"
|
|
|
- name="">
|
|
|
|
|
|
|
+ name="accountid">
|
|
|
<a-input class="dialogInput"
|
|
<a-input class="dialogInput"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.accountid"
|
|
|
placeholder="请输入期货登录账号" />
|
|
placeholder="请输入期货登录账号" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="登录密码"
|
|
|
|
|
- name="">
|
|
|
|
|
|
|
+ <a-form-item label="交易密码"
|
|
|
|
|
+ name="password">
|
|
|
<a-input-password class="dialogInput"
|
|
<a-input-password class="dialogInput"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.password"
|
|
|
placeholder="请输入登录密码" />
|
|
placeholder="请输入登录密码" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
|
<a-form-item label="指定交易用户"
|
|
<a-form-item label="指定交易用户"
|
|
|
name="">
|
|
name="">
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- placeholder="请选择指定交易用户">
|
|
|
|
|
- <a-select-option value="权限一">权限一</a-select-option>
|
|
|
|
|
- </a-select>
|
|
|
|
|
|
|
+ <span class="white">{{getUserName()}}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
@@ -69,55 +72,70 @@
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
|
-import { initData } from '@/common/methods/index';
|
|
|
|
|
-import { defineComponent, ref, reactive, toRaw, UnwrapRef } from 'vue';
|
|
|
|
|
-import { AllEnums } from '@/services/go/commonService/interface';
|
|
|
|
|
-import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
|
|
|
|
|
+import { defineComponent, ref, watchEffect, PropType } from 'vue';
|
|
|
|
|
+import { ErmcpFuturesCompany, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
|
|
|
|
|
+import { handleAddOrModifyFuturesForm } from '../setup';
|
|
|
|
|
+import { queryResultLoadingAndInfo, requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
|
|
+import { QueryFuturesCompany } from '@/services/go/ermcp/account';
|
|
|
|
|
+import { getUserName } from '@/services/bus/user';
|
|
|
|
|
+import { validateAction } from '@/common/setup/form';
|
|
|
|
|
+import { AddFuturesFormState } from '../interface';
|
|
|
|
|
+import { hedgeOutMainReq } from '@/services/proto/accountinfo';
|
|
|
|
|
+import { mergeTwoObj } from '@/utils/objHandle';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
- name: 'add-custom',
|
|
|
|
|
|
|
+ name: 'account_info_futures_btn_modify',
|
|
|
components: {},
|
|
components: {},
|
|
|
- setup() {
|
|
|
|
|
|
|
+ props: {
|
|
|
|
|
+ selectedData: {
|
|
|
|
|
+ default: {},
|
|
|
|
|
+ type: Object as PropType<ErmcpTaAccountEx>,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ setup(props, context) {
|
|
|
// 控制关闭弹窗
|
|
// 控制关闭弹窗
|
|
|
const { visible, cancel } = closeModal('account_info_futures_btn_modify');
|
|
const { visible, cancel } = closeModal('account_info_futures_btn_modify');
|
|
|
- // 证件类型
|
|
|
|
|
- // 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';
|
|
|
|
|
- // }
|
|
|
|
|
- // function submit() {
|
|
|
|
|
- // formRef.value
|
|
|
|
|
- // .validate()
|
|
|
|
|
- // .then(() => {
|
|
|
|
|
- // const param = toRaw(formState);
|
|
|
|
|
- // applyAction(param);
|
|
|
|
|
- // console.log('values', formState);
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch((error: ValidateErrorEntity<FormState>) => {
|
|
|
|
|
- // console.log('error', error);
|
|
|
|
|
- // });
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
|
|
+ const companyList = ref<ErmcpFuturesCompany[]>([]);
|
|
|
|
|
+ const { rules, formState, formRef } = handleAddOrModifyFuturesForm();
|
|
|
|
|
+ watchEffect(() => {
|
|
|
|
|
+ if (visible.value) {
|
|
|
|
|
+ mergeTwoObj(formState, props.selectedData.mainAcc);
|
|
|
|
|
+ queryResultLoadingAndInfo(QueryFuturesCompany, loading).then((res) => {
|
|
|
|
|
+ companyList.value = res;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ function submit() {
|
|
|
|
|
+ validateAction<AddFuturesFormState>(formRef, formState).then((res) => {
|
|
|
|
|
+ // let reqParam: ErmcpBizGroupReq = {
|
|
|
|
|
+ // // BizGroupID: number; // uint64 分组ID(修改/删除必填)
|
|
|
|
|
+ // // BizType: number; // int32 业务类型 - 1:套保 2:套利
|
|
|
|
|
+ // // Remark: string; // string 新增/修改备注
|
|
|
|
|
+ // // ApplySrc: number; // int32 新增/修改来源 - 1:管理端 2:终端
|
|
|
|
|
+ // // ApplyId: number; // uint64 新增/修改人
|
|
|
|
|
+ // // SpotGoods: ErmcpBizGroupSpotGoods[]; // ErmcpBizGroupSpotGoods 期货账户分组商品
|
|
|
|
|
+ // // TAAccount: ErmcpBizGroupTAAccount[]; // ErmcpBizGroupTAAccount 期货账户分组账户
|
|
|
|
|
+ // // OptType: number; // int32 操作类型 - 1:新增 2:修改 3:删除
|
|
|
|
|
+ // // AreaUserID: number; // uint64 所属机构
|
|
|
|
|
+ // };
|
|
|
|
|
+
|
|
|
|
|
+ requestResultLoadingAndInfo(hedgeOutMainReq, {}, loading, ['新增账户成功', '新增账户失败:']).then(() => {
|
|
|
|
|
+ cancel();
|
|
|
|
|
+ context.emit('refresh');
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
return {
|
|
return {
|
|
|
- // formState,
|
|
|
|
|
- // rules,
|
|
|
|
|
- // formRef,
|
|
|
|
|
- // cardTypeList,
|
|
|
|
|
- // isPersonal,
|
|
|
|
|
|
|
+ formState,
|
|
|
|
|
+ rules,
|
|
|
|
|
+ formRef,
|
|
|
visible,
|
|
visible,
|
|
|
cancel,
|
|
cancel,
|
|
|
- // submit,
|
|
|
|
|
- // loading,
|
|
|
|
|
|
|
+ companyList,
|
|
|
|
|
+ getUserName,
|
|
|
|
|
+ submit,
|
|
|
|
|
+ loading,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|