detail-dialog.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <script setup lang="ts">
  2. import { ref } from "vue";
  3. import { GOOD_COLUMNS, ORDER_COLUMNS } from "/@/utils/details/sale";
  4. import BasicDescriptions from "/@/components/BasicDescriptions";
  5. import { httpDetail } from "/@/api/InvoiceSales/sheetOrderPool";
  6. import { useAsync } from "/@/hooks";
  7. const visible = ref(false);
  8. const { data, run, loading } = useAsync({
  9. initalData: {}
  10. });
  11. const requesetSheetOrderDetail = sequenceNo => run(httpDetail({ sequenceNo }));
  12. defineExpose({
  13. onDisplay(sequenceNo) {
  14. visible.value = true;
  15. requesetSheetOrderDetail(sequenceNo);
  16. }
  17. });
  18. </script>
  19. <template>
  20. <ElDialog
  21. center
  22. title="销售订单详情"
  23. v-model="visible"
  24. width="1040px"
  25. :close-on-click-modal="false"
  26. >
  27. <div v-loading="loading">
  28. <BasicDescriptions
  29. v-loading="loading"
  30. ref="defaultRef"
  31. :data="data"
  32. :columns="ORDER_COLUMNS"
  33. :col-number="3"
  34. />
  35. <h1 text-18px my-2 text-center text="#303133">商品详情</h1>
  36. <BasicDescriptions
  37. v-loading="loading"
  38. ref="defaultRef"
  39. :data="data"
  40. :columns="GOOD_COLUMNS"
  41. :col-number="3"
  42. />
  43. </div>
  44. </ElDialog>
  45. </template>