refundOrderModelView.vue 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <BasicModal v-bind="$attrs" @register="registerModal" title="查看退款详情" width="1000px" destroyOnClose>
  3. <div class="px3 max-h-900px overflow-y-scroll" v-if="orderInfo">
  4. <TypographyTitle :level="5">订单信息</TypographyTitle>
  5. <div class="w-full">
  6. <Table :columns="orderCloumsData" :dataSource="orderInfo.refundOrderProInfoList" bordered :pagination="{ hideOnSinglePage: true }"></Table>
  7. </div>
  8. </div>
  9. </BasicModal>
  10. </template>
  11. <script lang="ts" setup>
  12. import { Image } from 'ant-design-vue';
  13. import { TypographyTitle, Divider, Table, Descriptions, DescriptionsItem, StatisticCountdown } from 'ant-design-vue';
  14. import { computed, ref } from 'vue';
  15. import { BasicModal, useModalInner } from '/@/components/Modal';
  16. import { queryByid, AppOrderInfoVO } from '../refundOrder.api';
  17. import { orderStatus, orderColum, getColumText, verificationRecordColumns, gameScheduleVOListColumns } from '../refundOrder.data';
  18. import dayjs from 'dayjs';
  19. const orderId = ref();
  20. const orderInfo = ref<AppOrderInfoVO>();
  21. const [registerModal, { setModalProps }] = useModalInner(async (data) => {
  22. setModalProps({ loading: true, showCancelBtn: false, showOkBtn: false });
  23. // orderInfo.value = undefined;
  24. // orderId.value = data.record.orderId;
  25. // const res = await queryByid(data.record.orderId);
  26. orderInfo.value = data.record;
  27. console.log(orderInfo.value,'弹窗数据')
  28. setModalProps({ loading: false });
  29. });
  30. const count = computed(() => {
  31. return orderInfo.value?.proInfoList?.filter((it) => it.type != 6).length;
  32. });
  33. async function finish() {
  34. const res = await queryByid(orderId.value);
  35. orderInfo.value = res;
  36. }
  37. const normalClass = computed(() => {
  38. const newList = orderInfo.value?.verificationRecordDTOList?.filter((it) => it.coursesType == 0);
  39. return newList?.length ? newList[0].verificationRecordList : [];
  40. });
  41. const supplementClass = computed(() => {
  42. const newList = orderInfo.value?.verificationRecordDTOList?.filter((it) => it.coursesType == 1);
  43. return newList?.length ? newList[0].verificationRecordList : [];
  44. });
  45. const getGameCertification = computed(() => {
  46. if (orderInfo.value?.gameCertification) {
  47. return JSON.parse(orderInfo.value?.gameCertification);
  48. }
  49. return '';
  50. });
  51. const getImageList = computed(() => {
  52. if (getGameCertification.value && getGameCertification.value.teamEmblemImg) {
  53. console.log(getGameCertification.value.teamEmblemImg.split(','), 'getGameCertification.value.teamEmblemImg');
  54. return getGameCertification.value.teamEmblemImg.split(',');
  55. }
  56. return [];
  57. });
  58. const orderCloumsData = computed(() => {
  59. if (orderInfo.value?.orderType == 0) {
  60. const newColum = [...orderColum];
  61. newColum.splice(1, 1, {
  62. title: '使用日期-时段',
  63. dataIndex: 'useTime',
  64. width: 380,
  65. align: 'center',
  66. customRender: ({ record }) => {
  67. return record.type != 6 ? record.useDateStr + '-' + record.frameTimeStr : '无';
  68. },
  69. });
  70. newColum.splice(2, 1, {
  71. title: '使用人/联系电话',
  72. dataIndex: 'useTime',
  73. width: 380,
  74. align: 'center',
  75. customRender: ({ record }) => {
  76. return record.type != 6 ? record.userName + '-' + record.userPhone : '无';
  77. },
  78. });
  79. console.log(newColum, 'newColum');
  80. return newColum;
  81. }
  82. return orderColum;
  83. });
  84. </script>