<script setup lang="ts">
import { inject } from "vue";
import { useDetail } from "../config/detail";
import { detailProps } from "../types";
import { purchaseOrderNotIncludeProduceColumns } from "/@/utils/details/_purchase";
import BasicDescriptions from "/@/components/BasicDescriptions";
import { injectStandBookKey } from "./../context";

const props = defineProps(detailProps);
defineEmits(["map-offset-top"]);

const { setGoodData } = inject(injectStandBookKey);
const { data, code, defaultRef } = useDetail(props, () =>
  setGoodData(data.value)
);
</script>

<template>
  <BasicDescriptions
    :show="code === '0'"
    ref="defaultRef"
    :data="data"
    :columns="purchaseOrderNotIncludeProduceColumns"
  />
</template>
