|
|
@@ -19,129 +19,73 @@
|
|
|
@click="submit">注销
|
|
|
</a-button>
|
|
|
</template>
|
|
|
- <a-form class="inlineForm">
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="所属期货账户"
|
|
|
- name="userinfotype">
|
|
|
- <span class="white">{{selectedData.mainAcc.accountname}}/{{selectedData.mainAcc.hedgeaccountcode}}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="账户名称"
|
|
|
- name="accountname">
|
|
|
- <span class="white">{{secondeData.accountname}}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="期货保证金"
|
|
|
- name="trademargintmpid">
|
|
|
- <span class="white"
|
|
|
- v-if="marginList.length">{{marginList[0].tradeconfigtmpname}}</span>
|
|
|
- <span class="white"
|
|
|
- v-else>--</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="期货手续费"
|
|
|
- name="tradefeetmpid">
|
|
|
- <span class="white"
|
|
|
- v-if="feeList.length">{{feeList[0].tradeconfigtmpname}}</span>
|
|
|
- <span class="white"
|
|
|
- v-else>--</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item label="指定交易用户"
|
|
|
- name="traderUserId">
|
|
|
- <span class="white">{{getRoleName()}}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
+ <Detail :selectedData="selectedData"
|
|
|
+ :userList="userList"
|
|
|
+ :secondeData="secondeData" />
|
|
|
</a-modal>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
- import {closeModal} from '@/common/setup/modal/index';
|
|
|
- import {defineComponent, ref, PropType, watchEffect} from 'vue';
|
|
|
- import {Modal} from 'ant-design-vue';
|
|
|
- import {LoginaccountOperateReq, TaaccountOperateReq} from '@/services/proto/accountinfo/interface';
|
|
|
- import {requestResultLoadingAndInfo} from '@/common/methods/request/resultInfo';
|
|
|
- import {loginAccountOperate, taAccountOperateReq} from '@/services/proto/accountinfo';
|
|
|
- import {
|
|
|
- ErmcpLoginUser,
|
|
|
- ErmcpLoginUserEx,
|
|
|
- ErmcpTaAccount,
|
|
|
- ErmcpTaAccountEx
|
|
|
- } from '@/services/go/ermcp/account/interface';
|
|
|
- import {getLongTypeLoginID} from "@/services/bus/login";
|
|
|
- import {ErmcpTradeConfigTMP} from '@/services/go/ermcp/business-review/interface';
|
|
|
-
|
|
|
- export default defineComponent({
|
|
|
- name: 'account_info_futures_btn_child_cancel',
|
|
|
- components: {},
|
|
|
- props: {
|
|
|
- selectedData: {
|
|
|
- type: Object as PropType<ErmcpTaAccountEx>,
|
|
|
- default: {},
|
|
|
- },
|
|
|
- secondeData: {
|
|
|
- default: {},
|
|
|
- type: Object as PropType<ErmcpTaAccount>,
|
|
|
- },
|
|
|
- userList: {
|
|
|
- type: Array as PropType<ErmcpLoginUserEx[]>,
|
|
|
- default: [],
|
|
|
- },
|
|
|
- marginList: {
|
|
|
- type: Array as PropType<ErmcpTradeConfigTMP[]>,
|
|
|
- default: [],
|
|
|
- },
|
|
|
- feeList: {
|
|
|
- type: Array as PropType<ErmcpTradeConfigTMP[]>,
|
|
|
- default: [],
|
|
|
- },
|
|
|
+import { closeModal } from '@/common/setup/modal/index';
|
|
|
+import { defineComponent, ref, PropType } from 'vue';
|
|
|
+import { Modal } from 'ant-design-vue';
|
|
|
+import { TaaccountOperateReq } from '@/services/proto/accountinfo/interface';
|
|
|
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
+import { taAccountOperateReq } from '@/services/proto/accountinfo';
|
|
|
+import { ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
|
|
|
+import { getLongTypeLoginID } from '@/services/bus/login';
|
|
|
+import Detail from '../detail-commom-futures/index.vue';
|
|
|
+export default defineComponent({
|
|
|
+ name: 'account_info_futures_btn_child_cancel',
|
|
|
+ components: { Detail },
|
|
|
+ props: {
|
|
|
+ selectedData: {
|
|
|
+ type: Object as PropType<ErmcpTaAccountEx>,
|
|
|
+ default: {},
|
|
|
+ },
|
|
|
+ secondeData: {
|
|
|
+ default: {},
|
|
|
+ type: Object as PropType<ErmcpTaAccount>,
|
|
|
+ },
|
|
|
+ userList: {
|
|
|
+ type: Array as PropType<ErmcpLoginUserEx[]>,
|
|
|
+ default: [],
|
|
|
},
|
|
|
- setup(props, context) {
|
|
|
- // 控制关闭弹窗
|
|
|
- const {visible, cancel} = closeModal('account_info_futures_btn_child_cancel');
|
|
|
- const loading = ref<boolean>(false);
|
|
|
+ },
|
|
|
+ setup(props, context) {
|
|
|
+ // 控制关闭弹窗
|
|
|
+ const { visible, cancel } = closeModal('account_info_futures_btn_child_cancel');
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
|
|
|
- function submit() {
|
|
|
- Modal.confirm({
|
|
|
- title: '是否确认注销该账户',
|
|
|
- okText: '确认注销',
|
|
|
- cancelText: '取消',
|
|
|
- onOk() {
|
|
|
- let reqParam: TaaccountOperateReq = {
|
|
|
- accountid: props.secondeData.accountid, // uint64 期货账户ID
|
|
|
- tradestatus: 7, // uint32 7注销
|
|
|
- modifierid: Number(getLongTypeLoginID()), // uint64 修改人
|
|
|
- areauserid: Number(props.secondeData.relateduserid), // uint64 机构用户ID
|
|
|
- };
|
|
|
- requestResultLoadingAndInfo(taAccountOperateReq, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
|
|
|
- cancel();
|
|
|
- context.emit('refresh');
|
|
|
- });
|
|
|
- },
|
|
|
- onCancel() {
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
- function getRoleName() {
|
|
|
- const item = props.userList.find(e => e.roleid === props.secondeData.relateduserid)
|
|
|
- return item ? item.rolename : '--'
|
|
|
+ function submit() {
|
|
|
+ Modal.confirm({
|
|
|
+ title: '是否确认注销该账户',
|
|
|
+ okText: '确认注销',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk() {
|
|
|
+ let reqParam: TaaccountOperateReq = {
|
|
|
+ accountid: props.secondeData.accountid, // uint64 期货账户ID
|
|
|
+ tradestatus: 7, // uint32 7注销
|
|
|
+ modifierid: Number(getLongTypeLoginID()), // uint64 修改人
|
|
|
+ areauserid: Number(props.secondeData.relateduserid), // uint64 机构用户ID
|
|
|
+ };
|
|
|
+ requestResultLoadingAndInfo(taAccountOperateReq, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
|
|
|
+ cancel();
|
|
|
+ context.emit('refresh');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onCancel() {},
|
|
|
+ });
|
|
|
}
|
|
|
- return {
|
|
|
- visible,
|
|
|
- cancel,
|
|
|
- submit,
|
|
|
- loading,
|
|
|
- getRoleName,
|
|
|
- };
|
|
|
- },
|
|
|
- });
|
|
|
+
|
|
|
+ return {
|
|
|
+ visible,
|
|
|
+ cancel,
|
|
|
+ submit,
|
|
|
+ loading,
|
|
|
+ };
|
|
|
+ },
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|