<template>
  <!-- 账户明细-->
  <a-modal class="commonModal custom-detail"
           title="账户明细"
           v-model:visible="visible"
           centered
           :maskClosable="false"
           @cancel="cancel"
           width="890px">
    <template #footer>
      <a-button key="submit"
                type="primary"
                @click="cancel">关闭</a-button>
    </template>
      <template #buyorsell="{ record }">
          <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
      </template>
    <Detail :selectedData="selectedRow" />
  </a-modal>
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue';
import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
import Detail from '../detail-commom-business/index.vue';
import { _closeModal } from '@/common/setup/modal/modal';
import {getBuyOrSellName} from "@/common/constants/enumsName";

export default defineComponent({
    name: 'business-detail',
    components: {
        Detail,
    },
    emits: ['cancel', 'update'],
    props: {
        selectedRow: {
            type: Object as PropType<ErmcpLoginUser>,
            default: {},
        },
    },
    setup(props, context) {
        const { visible, cancel } = _closeModal(context);
        return {
            visible,
            cancel,
            maskClosableFlag: false,
            getBuyOrSellName
        };
    },
});
</script>

<style lang="less">
</style>;
