|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <PageWrapper :title="`订单号:${id}`" contentBackground>
|
|
|
|
|
|
+ <PageWrapper :title="`订单号:${ids}`" contentBackground>
|
|
<Description
|
|
<Description
|
|
size="middle"
|
|
size="middle"
|
|
title="商品详情"
|
|
title="商品详情"
|
|
@@ -45,24 +45,24 @@
|
|
title="用户信息"
|
|
title="用户信息"
|
|
:bordered="false"
|
|
:bordered="false"
|
|
:column="3"
|
|
:column="3"
|
|
- :data="personData"
|
|
|
|
|
|
+ :data="refundData"
|
|
:schema="personSchema"
|
|
:schema="personSchema"
|
|
/>
|
|
/>
|
|
<a-card title="物流进度" :bordered="false">
|
|
<a-card title="物流进度" :bordered="false">
|
|
- <a-steps :current="2" progress-dot size="small">
|
|
|
|
|
|
+ <a-steps :current="current" progress-dot size="small">
|
|
<a-step title="创建订单">
|
|
<a-step title="创建订单">
|
|
<template #description>
|
|
<template #description>
|
|
- <p>2016-12-12 12:32</p>
|
|
|
|
|
|
+ <Time v-if="refundSchema.addTime" :value="refundSchema.addTime" mode="datetime" />
|
|
</template>
|
|
</template>
|
|
</a-step>
|
|
</a-step>
|
|
<a-step title="已付款">
|
|
<a-step title="已付款">
|
|
<template #description>
|
|
<template #description>
|
|
- <p>2016-12-13 12:32</p>
|
|
|
|
|
|
+ <Time v-if="refundSchema.payTime" :value="refundSchema.payTime" mode="datetime" />
|
|
</template>
|
|
</template>
|
|
</a-step>
|
|
</a-step>
|
|
<a-step title="物流配送">
|
|
<a-step title="物流配送">
|
|
<template #description>
|
|
<template #description>
|
|
- <p>顺丰速送 </p>
|
|
|
|
|
|
+ <p>{{ refundSchema.shippingName }} </p>
|
|
</template>
|
|
</template>
|
|
</a-step>
|
|
</a-step>
|
|
<a-step title="已配送" />
|
|
<a-step title="已配送" />
|
|
@@ -85,20 +85,23 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
- import { defineComponent } from 'vue';
|
|
|
|
|
|
+ import { defineComponent, onMounted, ref } from 'vue';
|
|
import { PageWrapper } from '/@/components/Page';
|
|
import { PageWrapper } from '/@/components/Page';
|
|
import { Description } from '/@/components/Description/index';
|
|
import { Description } from '/@/components/Description/index';
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
import { useTabs } from '/@/hooks/web/useTabs';
|
|
import { useTabs } from '/@/hooks/web/useTabs';
|
|
import { TableImg } from '/@/components/Table';
|
|
import { TableImg } from '/@/components/Table';
|
|
- import { refundSchema, refundData, personData, goodsSchema, personSchema } from './data';
|
|
|
|
|
|
+ import { refundSchema, personData, goodsSchema, personSchema } from './data';
|
|
import { Divider, Card, Row, Col, Steps } from 'ant-design-vue';
|
|
import { Divider, Card, Row, Col, Steps } from 'ant-design-vue';
|
|
|
|
+ import { GetOrderInfoApi } from '/@/api/order/list';
|
|
|
|
+ import { Time } from '/@/components/Time';
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
components: {
|
|
components: {
|
|
PageWrapper,
|
|
PageWrapper,
|
|
Description,
|
|
Description,
|
|
TableImg,
|
|
TableImg,
|
|
|
|
+ Time,
|
|
[Divider.name]: Divider,
|
|
[Divider.name]: Divider,
|
|
[Card.name]: Card,
|
|
[Card.name]: Card,
|
|
[Steps.name]: Steps,
|
|
[Steps.name]: Steps,
|
|
@@ -107,14 +110,47 @@
|
|
[Col.name]: Col,
|
|
[Col.name]: Col,
|
|
},
|
|
},
|
|
setup() {
|
|
setup() {
|
|
|
|
+ const refundData = ref({});
|
|
|
|
+ const current = ref(0);
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
const { setTitle } = useTabs();
|
|
const { setTitle } = useTabs();
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
- const id = route.params.id;
|
|
|
|
- console.log('id', id);
|
|
|
|
-
|
|
|
|
- setTitle(`No.${id} - 订单详情`);
|
|
|
|
-
|
|
|
|
|
|
+ const ids = route.params.id;
|
|
|
|
+ const id = Number(route.query.id);
|
|
|
|
+ const brandId = Number(route.query.brandId);
|
|
|
|
+ setTitle(`No.${route.params.id} - 订单详情`);
|
|
|
|
+ onMounted(async () => {
|
|
|
|
+ let res = await GetOrderInfoApi({
|
|
|
|
+ id,
|
|
|
|
+ brandId,
|
|
|
|
+ });
|
|
|
|
+ refundData.value = res;
|
|
|
|
+ let ordercurrent = 0;
|
|
|
|
+ switch (res.orderStatus) {
|
|
|
|
+ case 0:
|
|
|
|
+ ordercurrent = 0;
|
|
|
|
+ break;
|
|
|
|
+ case 101:
|
|
|
|
+ ordercurrent = 0;
|
|
|
|
+ break;
|
|
|
|
+ case 201:
|
|
|
|
+ ordercurrent = 1;
|
|
|
|
+ break;
|
|
|
|
+ case 1:
|
|
|
|
+ ordercurrent = 2;
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ ordercurrent = 3;
|
|
|
|
+ break;
|
|
|
|
+ case 501:
|
|
|
|
+ ordercurrent = 3;
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ ordercurrent = 1;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ current.value = ordercurrent;
|
|
|
|
+ });
|
|
return {
|
|
return {
|
|
refundSchema,
|
|
refundSchema,
|
|
refundData,
|
|
refundData,
|
|
@@ -122,7 +158,8 @@
|
|
personSchema,
|
|
personSchema,
|
|
goodsSchema,
|
|
goodsSchema,
|
|
router,
|
|
router,
|
|
- id,
|
|
|
|
|
|
+ ids,
|
|
|
|
+ current,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
});
|
|
});
|