|
@@ -7,11 +7,12 @@
|
|
|
</div>
|
|
|
<div class="mt3">
|
|
|
<div v-if="orderInfo.orderType != 1 && orderInfo.orderType != 2"
|
|
|
- >共{{ orderInfo.proInfoList?.length }}人 <span class="text-gray">{{ orderStatus[orderInfo.orderStatus] }}</span>
|
|
|
+ >共{{ count }}人 <span class="text-gray">{{ orderStatus[orderInfo.orderStatus] }}</span>
|
|
|
</div>
|
|
|
- <div v-else> 共 {{ orderInfo.proInfoList?.length }} 场 </div>
|
|
|
+ <div v-else> 共 {{ count }} 场 </div>
|
|
|
<div class="flex items-center mt3" v-if="orderInfo.orderStatus == 1 || orderInfo.orderStatus == 2">
|
|
|
<div class="flex items-center mr2" v-for="item in orderInfo.proInfoList" :key="item.id">
|
|
|
+ <!-- //6为保险不展示 -->
|
|
|
<template v-if="item.type != 6">
|
|
|
<div class="mr3 text-gray" v-if="orderInfo.orderType != 1 && orderInfo.orderType != 2">{{ item.userName }} </div>
|
|
|
<div class="mr3 text-gray" :class="[item.orderStatus == 2 ? 'line-through' : '']" v-else> {{ item.ticketNo }} </div>
|
|
@@ -40,7 +41,7 @@
|
|
|
<div class="text-gray">地点:{{ orderInfo.siteName }}</div>
|
|
|
<div class="text-gray">地址:{{ orderInfo.address }} </div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
+ <div v-if="!getGameCertification">
|
|
|
<div>付款信息 </div>
|
|
|
<div class="text-gray">实付金额:{{ orderInfo.price || 0 }}元</div>
|
|
|
<div class="text-gray">付款时间:{{ orderInfo.payTime || '--' }}</div>
|
|
@@ -50,11 +51,25 @@
|
|
|
<div class="text-gray">买家昵称:{{ orderInfo.nikeName }}</div>
|
|
|
<div class="text-gray">买家电话:{{ orderInfo.phoneNumber }}</div>
|
|
|
</div>
|
|
|
+ <div v-if="getGameCertification">
|
|
|
+ <div>团队信息 </div>
|
|
|
+ <div class="text-gray">队名:{{ getGameCertification.teamName }}</div>
|
|
|
+ <div class="text-gray flex items-center" v-if="getImageList.length"
|
|
|
+ >队徽:
|
|
|
+ <div class="overflow-x-scroll w220px flex items-center">
|
|
|
+ <div v-for="item in getImageList" :key="item" class="flex items-center">
|
|
|
+ <div class="mr2">
|
|
|
+ <Image :width="40" :height="40" class="rounded-16px mr2" :src="item" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<Divider></Divider>
|
|
|
<TypographyTitle :level="5">订单信息</TypographyTitle>
|
|
|
<div class="w-full">
|
|
|
- <Table :columns="orderColum" :dataSource="orderInfo.proInfoList" bordered :pagination="{ hideOnSinglePage: true }"></Table>
|
|
|
+ <Table :columns="orderCloumsData" :dataSource="orderInfo.proInfoList" bordered :pagination="{ hideOnSinglePage: true }"></Table>
|
|
|
</div>
|
|
|
<div class="mt3">
|
|
|
<Descriptions title="费用信息" bordered layout="vertical">
|
|
@@ -103,7 +118,7 @@
|
|
|
</DescriptionsItem>
|
|
|
</Descriptions>
|
|
|
</div>
|
|
|
- <div class="mt3" v-if="orderInfo.isinList">
|
|
|
+ <div class="mt3">
|
|
|
<TypographyTitle :level="5">使用记录</TypographyTitle>
|
|
|
<Table :columns="getColumText(orderInfo.orderType)" :dataSource="orderInfo.isinList" :pagination="{ hideOnSinglePage: true }"></Table>
|
|
|
</div>
|
|
@@ -115,23 +130,33 @@
|
|
|
<TypographyTitle :level="5">(补课)核销记录</TypographyTitle>
|
|
|
<Table :columns="verificationRecordColumns" :dataSource="supplementClass" :pagination="{ hideOnSinglePage: true }"></Table>
|
|
|
</div>
|
|
|
+ <div class="mt3" v-if="orderInfo?.gameScheduleVOList?.length">
|
|
|
+ <TypographyTitle :level="5">赛程安排</TypographyTitle>
|
|
|
+ <Table :columns="gameScheduleVOListColumns" :dataSource="orderInfo?.gameScheduleVOList" :pagination="{ hideOnSinglePage: true }"></Table>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</BasicModal>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
+ import { Image } from 'ant-design-vue';
|
|
|
import { TypographyTitle, Divider, Table, Descriptions, DescriptionsItem, StatisticCountdown } from 'ant-design-vue';
|
|
|
import { computed, ref } from 'vue';
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
import { queryByid, AppOrderInfoVO } from '../order.api';
|
|
|
- import { orderStatus, orderColum, getColumText, verificationRecordColumns } from '../order.data';
|
|
|
+ import { orderStatus, orderColum, getColumText, verificationRecordColumns, gameScheduleVOListColumns } from '../order.data';
|
|
|
import dayjs from 'dayjs';
|
|
|
const orderId = ref();
|
|
|
const orderInfo = ref<AppOrderInfoVO>();
|
|
|
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
|
|
|
- setModalProps({ confirmLoading: false, showCancelBtn: false, showOkBtn: false });
|
|
|
+ setModalProps({ loading: true, showCancelBtn: false, showOkBtn: false });
|
|
|
+ orderInfo.value = undefined;
|
|
|
orderId.value = data.record.id;
|
|
|
const res = await queryByid(data.record.id);
|
|
|
orderInfo.value = res;
|
|
|
+ setModalProps({ loading: false });
|
|
|
+ });
|
|
|
+ const count = computed(() => {
|
|
|
+ return orderInfo.value?.proInfoList?.filter((it) => it.type != 6).length;
|
|
|
});
|
|
|
async function finish() {
|
|
|
const res = await queryByid(orderId.value);
|
|
@@ -145,4 +170,46 @@
|
|
|
const newList = orderInfo.value?.verificationRecordDTOList?.filter((it) => it.coursesType == 1);
|
|
|
return newList?.length ? newList[0].verificationRecordList : [];
|
|
|
});
|
|
|
+ const getGameCertification = computed(() => {
|
|
|
+ if (orderInfo.value?.gameCertification) {
|
|
|
+ return JSON.parse(orderInfo.value?.gameCertification);
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ });
|
|
|
+ const getImageList = computed(() => {
|
|
|
+ if (getGameCertification.value) {
|
|
|
+ console.log(getGameCertification.value.teamEmblemImg.split(','), 'getGameCertification.value.teamEmblemImg');
|
|
|
+
|
|
|
+ return getGameCertification.value.teamEmblemImg.split(',');
|
|
|
+ }
|
|
|
+ return [];
|
|
|
+ });
|
|
|
+ const orderCloumsData = computed(() => {
|
|
|
+ if (orderInfo.value?.orderType == 0) {
|
|
|
+ const newColum = [...orderColum];
|
|
|
+
|
|
|
+ newColum.splice(1, 1, {
|
|
|
+ title: '使用日期-时段',
|
|
|
+ dataIndex: 'useTime',
|
|
|
+ width: 380,
|
|
|
+ align: 'center',
|
|
|
+ customRender: ({ record }) => {
|
|
|
+ return record.type != 6 ? record.useDateStr + '-' + record.frameTimeStr : '无';
|
|
|
+ },
|
|
|
+ });
|
|
|
+ newColum.splice(2, 1, {
|
|
|
+ title: '使用人/联系电话',
|
|
|
+ dataIndex: 'useTime',
|
|
|
+ width: 380,
|
|
|
+ align: 'center',
|
|
|
+ customRender: ({ record }) => {
|
|
|
+ return record.type != 6 ? record.userName + '-' + record.userPhone : '无';
|
|
|
+ },
|
|
|
+ });
|
|
|
+ console.log(newColum, 'newColum');
|
|
|
+
|
|
|
+ return newColum;
|
|
|
+ }
|
|
|
+ return orderColum;
|
|
|
+ });
|
|
|
</script>
|