<template>
    <vxe-modal v-model="dialogVisible" :title="title" show-zoom resize show-footer destroy-on-close transfer @hide="close" :width="width" :z-index="1002">
        <template #default>
            <div>
                <div>发票抬头：{{ info?.headTitle }}</div>
                <div>税号：{{ info?.taxSn }}</div>
                <div>收票邮箱：{{ info?.email }}</div>
                <div>单位地址：{{ info?.address }}</div>
                <div>电话号码：{{ info?.contactPhone }}</div>
                <div>开户银行：{{ info?.bankName }}</div>
                <div>银行账户：{{ info?.bankAccount }}</div>
            </div>
        </template>
    </vxe-modal>
</template>

<script setup name="InvoiceInfo" lang="ts">
import { propTypes } from '@/utils/propTypes';
const emit = defineEmits(['update:show', 'close', 'success']);
const props = defineProps({
    show: propTypes.bool.def(false),
    title: propTypes.string.def('发票信息'),
    width: propTypes.number.def(560),
    info: propTypes.any.def(null),
    dict: propTypes.object.def({}),
});
const dialogVisible = ref(false);

const close = () => {

    emit('update:show', false);
    emit('close', false);
};

watch(
    () => props.show,
    (val) => {
        dialogVisible.value = val;
    },
    { immediate: true }
);
</script>
