<script setup lang="ts">
import { ref } from "vue";
import { httpDetail } from "/@/api/InvoiceSales/capitalPool";
import BasicDescriptions from "/@/components/BasicDescriptions";
import { CAPITAL_COLUMNS } from "/@/utils/details/tragelog";
import { useAsync } from "/@/hooks";

const visible = ref(false);

const { data, run, loading } = useAsync({
  initalData: {}
});

defineExpose({
  onDisplay(logNo) {
    visible.value = true;

    run(
      httpDetail({
        logNo
      })
    );
  }
});
</script>

<template>
  <el-dialog v-model="visible" center title="资金详情">
    <BasicDescriptions
      v-loading="loading"
      :columns="CAPITAL_COLUMNS"
      :col-number="2"
      :data="data"
    />
  </el-dialog>
</template>
