<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 { _closeModal } from '@/common/setup/modal/modal';
import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
import { defineComponent, PropType, ref } from 'vue';
import Detail from '../common-detail/index.vue';

export default defineComponent({
  name: 'custom-detail',
  emits: ['cancel', 'update'],
  components: { Detail },
  props: {
    selectedRow: {
      type: Object as PropType<QueryCustomInfoType>,
      default: {},
    },
  },
  setup(props, context) {
    const { visible, cancel } = _closeModal(context);
    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>
