<template>
  <!-- 客户资料详情-->
  <a-modal class="add-custom custom-detail"
           title="客户资料详情"
           centered
           v-model:visible="visible"
           :maskClosable="false"
           @cancel="cancel"
           width="890px">
    <template #footer>
      <a-button key="submit"
                type="primary"
                :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';
import { QhjCustomer } from '@/services/go/ermcp/qhj/interface';

export default defineComponent({
    name: 'custom-detail',
    components: { Detail },
    props: {
        selectedRow: {
            type: Object as PropType<QhjCustomer>,
            default: {},
        },
    },
    setup(props, context) {
        const { visible, cancel } = closeModal('detail');
        const loading = ref<boolean>(false);
        const maskClosableFlag = ref<boolean>(false);
        return {
            cancel,
            visible,
            loading,
            maskClosableFlag,
        };
    },
});
</script>

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