|
@@ -5,6 +5,16 @@
|
|
|
<template #cover="{ record }">
|
|
|
<TableImg :size="150" :simpleShow="true" :imgList="[record.cover]" />
|
|
|
</template>
|
|
|
+ <template #orderType="{ record }"> {{ renderOrderTypeLabel(record.orderType) }} </template>
|
|
|
+ <template #orderStatus="{ record }">
|
|
|
+ {{ renderOrderStatusLabel(record.orderStatus) }}
|
|
|
+ </template>
|
|
|
+ <template #shipingStatus="{ record }">
|
|
|
+ {{ renderShipingStatusLabel(record.shipingStatus) }}
|
|
|
+ </template>
|
|
|
+ <template #paymentStatus="{ record }">
|
|
|
+ {{ renderPaymentStatusLabel(record.paymentStatus) }}
|
|
|
+ </template>
|
|
|
<template #action="{ record }">
|
|
|
<TableAction
|
|
|
:actions="[
|
|
@@ -64,6 +74,7 @@
|
|
|
{
|
|
|
title: '订单号',
|
|
|
dataIndex: 'orderNo',
|
|
|
+
|
|
|
width: 160,
|
|
|
},
|
|
|
{
|
|
@@ -79,21 +90,28 @@
|
|
|
{
|
|
|
title: '订单类型',
|
|
|
dataIndex: 'orderType',
|
|
|
+ slots: { customRender: 'orderType' },
|
|
|
+ sorter: true,
|
|
|
width: 80,
|
|
|
},
|
|
|
{
|
|
|
title: '订单状态',
|
|
|
dataIndex: 'orderStatus',
|
|
|
- width: 60,
|
|
|
+ sorter: true,
|
|
|
+ slots: { customRender: 'orderStatus' },
|
|
|
+ width: 80,
|
|
|
},
|
|
|
{
|
|
|
title: '发货状态',
|
|
|
dataIndex: 'shipingStatus',
|
|
|
- width: 60,
|
|
|
+ sorter: true,
|
|
|
+ slots: { customRender: 'shipingStatus' },
|
|
|
+ width: 80,
|
|
|
},
|
|
|
{
|
|
|
title: '付款状态',
|
|
|
dataIndex: 'paymentStatus',
|
|
|
+ slots: { customRender: 'paymentStatus' },
|
|
|
width: 60,
|
|
|
},
|
|
|
{
|
|
@@ -137,15 +155,6 @@
|
|
|
xxl: 5,
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
- field: 'userName',
|
|
|
- label: '企业账号',
|
|
|
- component: 'Input',
|
|
|
- colProps: {
|
|
|
- xl: 12,
|
|
|
- xxl: 8,
|
|
|
- },
|
|
|
- },
|
|
|
],
|
|
|
};
|
|
|
|
|
@@ -160,13 +169,65 @@
|
|
|
showIndexColumn: false,
|
|
|
rowKey: 'id',
|
|
|
pagination: { pageSize: 20 },
|
|
|
+ bordered: true,
|
|
|
});
|
|
|
|
|
|
+ function renderOrderTypeLabel(type: number): string {
|
|
|
+ switch (type) {
|
|
|
+ case 0:
|
|
|
+ return '立即购买';
|
|
|
+ case 1:
|
|
|
+ return '延后购买';
|
|
|
+ default:
|
|
|
+ return '立即购买';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function renderOrderStatusLabel(type: number): string {
|
|
|
+ switch (type) {
|
|
|
+ case 0:
|
|
|
+ return '已取消';
|
|
|
+ case 1:
|
|
|
+ return '待付款';
|
|
|
+ case 2:
|
|
|
+ return '已付款';
|
|
|
+ case 3:
|
|
|
+ return '已发货';
|
|
|
+ case 4:
|
|
|
+ return '已收货';
|
|
|
+ default:
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function renderShipingStatusLabel(type: number): string {
|
|
|
+ switch (type) {
|
|
|
+ case 0:
|
|
|
+ return '未发货';
|
|
|
+ case 1:
|
|
|
+ return '已发货';
|
|
|
+ default:
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function renderPaymentStatusLabel(type: number): string {
|
|
|
+ switch (type) {
|
|
|
+ case 0:
|
|
|
+ return '未付款';
|
|
|
+ case 1:
|
|
|
+ return '已付款';
|
|
|
+ default:
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return {
|
|
|
registerTable,
|
|
|
createMessage,
|
|
|
t,
|
|
|
go,
|
|
|
+ renderOrderTypeLabel,
|
|
|
+ renderOrderStatusLabel,
|
|
|
+ renderShipingStatusLabel,
|
|
|
+ renderPaymentStatusLabel,
|
|
|
uploadApi: uploadApi as any,
|
|
|
};
|
|
|
},
|