<template>
  <!-- 客户资料详情-->
  <a-modal class="add-custom custom-detail"
           title="客户资料详情"
           v-model:visible="visible"
           centered
           :maskClosable="maskClosableFlag"
           @cancel="cancel"
           width="890px">
    <template #footer>
      <a-button key="submit"
                type="primary"
                :loading="loading.loading"
                @click="cancel">关闭</a-button>
    </template>
    <Detail :selectedRow="selectedRow" />
  </a-modal>
</template>

<script lang="ts">
import { defineComponent, PropType, ref } from 'vue';
import { closeModal } from '@/common/setup/modal/index';
import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
import Detail from '../common-detail/index.vue';

export default defineComponent({
    name: 'custom-detail',
    components: { Detail },
    props: {
        selectedRow: {
            type: Object as PropType<QueryCustomInfoType>,
            default: {},
        },
    },
    setup(props) {
        console.log('open');

        const { visible, cancel } = closeModal('detail');
        const loading = ref<boolean>(false);
        const maskClosableFlag = ref<boolean>(false);
        return {
            visible,
            cancel,
            loading,
            maskClosableFlag,
        };
    },
});
</script>

<style lang="less">
.custom-detail {
    .ant-form.inlineForm {
        margin-top: 20px;
    }
    .upload {
        .look {
            margin-left: 0;
        }
    }
}
</style>;
