<script setup lang="ts">
import { ref } from "vue";
import Invoice from "/@/components/Invoice";

const visible = ref(false);

const invoiceNumber = ref("");

defineExpose({
  onDisplay: ({ invoiceNumber: _invoiceNumber }) => {
    visible.value = true;
    invoiceNumber.value = _invoiceNumber;
  }
});
</script>

<template>
  <el-dialog v-model="visible" width="1040px" :close-on-click-modal="false"
    :close-on-press-escape="false">
    <Invoice :inv-number="invoiceNumber" type="purchase" />
  </el-dialog>
</template>
