|
@@ -63,7 +63,7 @@
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
autocomplete="new-password"
|
|
autocomplete="new-password"
|
|
|
v-model:value="formState.password"
|
|
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">
|
|
@@ -78,80 +78,80 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
- import {closeModal} from '@/common/setup/modal/index';
|
|
|
|
|
- import {defineComponent, ref, watchEffect} from 'vue';
|
|
|
|
|
- import {queryResultLoadingAndInfo, requestResultLoadingAndInfo} from '@/common/methods/request/resultInfo';
|
|
|
|
|
- import {hedgeOutMainReq} from '@/services/proto/accountinfo';
|
|
|
|
|
- import {ErmcpBizGroupReq, HedgeOutMainConfigReq} from '@/services/proto/accountinfo/interface';
|
|
|
|
|
- import {ErmcpFuturesCompany} from '@/services/go/ermcp/account/interface';
|
|
|
|
|
- import {QueryFuturesCompany} from '@/services/go/ermcp/account';
|
|
|
|
|
- import {getUserName} from '@/services/bus/user';
|
|
|
|
|
- import {validateAction} from '@/common/setup/form';
|
|
|
|
|
- import {handleAddOrModifyFuturesForm} from '../setup';
|
|
|
|
|
- import {AddFuturesFormState} from '../interface';
|
|
|
|
|
- import {getLongTypeLoginID} from "@/services/bus/login";
|
|
|
|
|
- import {LongType} from "@/services/socket/login/interface";
|
|
|
|
|
- import {getUserId} from "@/services/bus/account";
|
|
|
|
|
|
|
+import { closeModal } from '@/common/setup/modal/index';
|
|
|
|
|
+import { defineComponent, ref, watchEffect } from 'vue';
|
|
|
|
|
+import { queryResultLoadingAndInfo, requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
|
|
+import { hedgeOutMainReq } from '@/services/proto/accountinfo';
|
|
|
|
|
+import { ErmcpBizGroupReq, HedgeOutMainConfigReq } from '@/services/proto/accountinfo/interface';
|
|
|
|
|
+import { ErmcpFuturesCompany } from '@/services/go/ermcp/account/interface';
|
|
|
|
|
+import { QueryFuturesCompany } from '@/services/go/ermcp/account';
|
|
|
|
|
+import { getUserName } from '@/services/bus/user';
|
|
|
|
|
+import { validateAction } from '@/common/setup/form';
|
|
|
|
|
+import { handleAddOrModifyFuturesForm } from '../setup';
|
|
|
|
|
+import { AddFuturesFormState } from '../interface';
|
|
|
|
|
+import { getLongTypeLoginID } from '@/services/bus/login';
|
|
|
|
|
+import { LongType } from '@/services/socket/login/interface';
|
|
|
|
|
+import { getUserId } from '@/services/bus/account';
|
|
|
|
|
|
|
|
- export default defineComponent({
|
|
|
|
|
- name: 'account_info_futures_btn_add',
|
|
|
|
|
- components: {},
|
|
|
|
|
- setup(props, context) {
|
|
|
|
|
- // 控制关闭弹窗
|
|
|
|
|
- const {visible, cancel} = closeModal('account_info_futures_btn_add');
|
|
|
|
|
- const loading = ref<boolean>(false);
|
|
|
|
|
- const companyList = ref<ErmcpFuturesCompany[]>([]);
|
|
|
|
|
- const {rules, formState, formRef} = handleAddOrModifyFuturesForm();
|
|
|
|
|
- watchEffect(() => {
|
|
|
|
|
- if (visible.value) {
|
|
|
|
|
- queryResultLoadingAndInfo(QueryFuturesCompany, loading).then((res) => {
|
|
|
|
|
- companyList.value = res;
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- function submit() {
|
|
|
|
|
- validateAction<AddFuturesFormState>(formRef, formState).then((res) => {
|
|
|
|
|
- let reqParam: HedgeOutMainConfigReq = {
|
|
|
|
|
- marketid: 15101, // uint64 内部市场ID(HedgeOutMainConfig)
|
|
|
|
|
- hedgeaccountcode: res.accountid, // string 对冲账号ID(HedgeOutMainConfig)
|
|
|
|
|
- hedgeaccountpwd: res.password, // string 对冲账号密码(HedgeOutMainConfig)
|
|
|
|
|
- limitnumber: 0, // uint64 挂单笔数限额默认0(HedgeOutMainConfig)
|
|
|
|
|
- status: 1, // int32 渠道账号状态 1-可买入可卖出 2-可卖出不可买入默认1(HedgeOutMainConfig)
|
|
|
|
|
- accountname: res.accountname, // string 账户名称accountname1(Taaccount)
|
|
|
|
|
- // accountid: Number(res.accountid), // uint64 资金账户ID(Taaccount)
|
|
|
|
|
- taaccounttype: 1, // int32 账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号(Taaccount)
|
|
|
|
|
- currencyid: 1, // int32 货币ID默认为1(Taaccount)
|
|
|
|
|
- outthreshold: 0, // double 出金阈值默认为0(Taaccount)
|
|
|
|
|
- ismain: 1, // int32 是否母账号 0:不是母账户 1:是母账户(Taaccount)
|
|
|
|
|
- relateduserid: getUserId(), // uint64 关联用户(Taaccount)
|
|
|
|
|
- maxsubaccouts: 0, // uint64 最大子账户数[最大99999][外部母账户用 默认0(TAACCOUNTCONFIG)
|
|
|
|
|
- fcid: res.fcid as number, // uint64 期货公司
|
|
|
|
|
- creatorid: Number(getLongTypeLoginID()), // uint64 创建人
|
|
|
|
|
- modifierid: Number(getLongTypeLoginID()), // uint64 修改人
|
|
|
|
|
- areauserid: getUserId(), // uint64 机构用户ID
|
|
|
|
|
- };
|
|
|
|
|
- // 期货账户主账户
|
|
|
|
|
- requestResultLoadingAndInfo(hedgeOutMainReq, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
|
|
|
|
|
- cancel();
|
|
|
|
|
- context.emit('refresh');
|
|
|
|
|
- });
|
|
|
|
|
|
|
+export default defineComponent({
|
|
|
|
|
+ name: 'account_info_futures_btn_add',
|
|
|
|
|
+ components: {},
|
|
|
|
|
+ setup(props, context) {
|
|
|
|
|
+ // 控制关闭弹窗
|
|
|
|
|
+ const { visible, cancel } = closeModal('account_info_futures_btn_add');
|
|
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
|
|
+ const companyList = ref<ErmcpFuturesCompany[]>([]);
|
|
|
|
|
+ const { rules, formState, formRef } = handleAddOrModifyFuturesForm();
|
|
|
|
|
+ watchEffect(() => {
|
|
|
|
|
+ if (visible.value) {
|
|
|
|
|
+ queryResultLoadingAndInfo(QueryFuturesCompany, loading).then((res) => {
|
|
|
|
|
+ companyList.value = res;
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ function submit() {
|
|
|
|
|
+ validateAction<AddFuturesFormState>(formRef, formState).then((res) => {
|
|
|
|
|
+ let reqParam: HedgeOutMainConfigReq = {
|
|
|
|
|
+ marketid: 15101, // uint64 内部市场ID(HedgeOutMainConfig)
|
|
|
|
|
+ hedgeaccountcode: res.accountid, // string 对冲账号ID(HedgeOutMainConfig)
|
|
|
|
|
+ hedgeaccountpwd: res.password, // string 对冲账号密码(HedgeOutMainConfig)
|
|
|
|
|
+ limitnumber: 0, // uint64 挂单笔数限额默认0(HedgeOutMainConfig)
|
|
|
|
|
+ status: 1, // int32 渠道账号状态 1-可买入可卖出 2-可卖出不可买入默认1(HedgeOutMainConfig)
|
|
|
|
|
+ accountname: res.accountname, // string 账户名称accountname1(Taaccount)
|
|
|
|
|
+ // accountid: Number(res.accountid), // uint64 资金账户ID(Taaccount)
|
|
|
|
|
+ taaccounttype: 1, // int32 账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号(Taaccount)
|
|
|
|
|
+ currencyid: 1, // int32 货币ID默认为1(Taaccount)
|
|
|
|
|
+ outthreshold: 0, // double 出金阈值默认为0(Taaccount)
|
|
|
|
|
+ ismain: 1, // int32 是否母账号 0:不是母账户 1:是母账户(Taaccount)
|
|
|
|
|
+ relateduserid: getUserId(), // uint64 关联用户(Taaccount)
|
|
|
|
|
+ maxsubaccouts: 0, // uint64 最大子账户数[最大99999][外部母账户用 默认0(TAACCOUNTCONFIG)
|
|
|
|
|
+ fcid: res.fcid as number, // uint64 期货公司
|
|
|
|
|
+ creatorid: Number(getLongTypeLoginID()), // uint64 创建人
|
|
|
|
|
+ modifierid: Number(getLongTypeLoginID()), // uint64 修改人
|
|
|
|
|
+ areauserid: getUserId(), // uint64 机构用户ID
|
|
|
|
|
+ };
|
|
|
|
|
+ // 期货账户主账户
|
|
|
|
|
+ requestResultLoadingAndInfo(hedgeOutMainReq, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
|
|
|
|
|
+ cancel();
|
|
|
|
|
+ context.emit('refresh');
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- return {
|
|
|
|
|
- formState,
|
|
|
|
|
- rules,
|
|
|
|
|
- formRef,
|
|
|
|
|
- visible,
|
|
|
|
|
- cancel,
|
|
|
|
|
- companyList,
|
|
|
|
|
- getUserName,
|
|
|
|
|
- submit,
|
|
|
|
|
- loading,
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ return {
|
|
|
|
|
+ formState,
|
|
|
|
|
+ rules,
|
|
|
|
|
+ formRef,
|
|
|
|
|
+ visible,
|
|
|
|
|
+ cancel,
|
|
|
|
|
+ companyList,
|
|
|
|
|
+ getUserName,
|
|
|
|
|
+ submit,
|
|
|
|
|
+ loading,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|