This commit is contained in:
@@ -51,7 +51,6 @@
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { ElCard, ElButton, ElIcon, ElMessage, ElTable, ElTableColumn, ElTag } from 'element-plus'
|
||||
import { ArrowLeft, Loading } from '@element-plus/icons-vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import DetailPage from '@/components/common/DetailPage.vue'
|
||||
import type { DetailSection } from '@/components/common/DetailPage.vue'
|
||||
import { OrderService } from '@/api/modules'
|
||||
@@ -60,7 +59,6 @@
|
||||
|
||||
defineOptions({ name: 'OrderDetail' })
|
||||
|
||||
const { t } = useI18n()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
@@ -74,24 +72,20 @@
|
||||
|
||||
// 获取订单类型文本
|
||||
const getOrderTypeText = (type: string): string => {
|
||||
return type === 'single_card'
|
||||
? t('orderManagement.orderType.singleCard')
|
||||
: t('orderManagement.orderType.device')
|
||||
return type === 'single_card' ? '单卡购买' : '设备购买'
|
||||
}
|
||||
|
||||
// 获取买家类型文本
|
||||
const getBuyerTypeText = (type: string): string => {
|
||||
return type === 'personal'
|
||||
? t('orderManagement.buyerType.personal')
|
||||
: t('orderManagement.buyerType.agent')
|
||||
return type === 'personal' ? '个人客户' : '代理商'
|
||||
}
|
||||
|
||||
// 获取支付方式文本
|
||||
const getPaymentMethodText = (method: string): string => {
|
||||
const methodMap: Record<string, string> = {
|
||||
wallet: t('orderManagement.paymentMethod.wallet'),
|
||||
wechat: t('orderManagement.paymentMethod.wechat'),
|
||||
alipay: t('orderManagement.paymentMethod.alipay')
|
||||
wallet: '钱包支付',
|
||||
wechat: '微信支付',
|
||||
alipay: '支付宝支付'
|
||||
}
|
||||
return methodMap[method] || method
|
||||
}
|
||||
@@ -99,9 +93,9 @@
|
||||
// 获取佣金状态文本
|
||||
const getCommissionStatusText = (status: number): string => {
|
||||
const statusMap: Record<number, string> = {
|
||||
0: t('orderManagement.commissionStatus.notApplicable'),
|
||||
1: t('orderManagement.commissionStatus.pending'),
|
||||
2: t('orderManagement.commissionStatus.settled')
|
||||
0: '不适用',
|
||||
1: '待结算',
|
||||
2: '已结算'
|
||||
}
|
||||
return statusMap[status] || '-'
|
||||
}
|
||||
@@ -122,17 +116,17 @@
|
||||
{
|
||||
title: '基本信息',
|
||||
fields: [
|
||||
{ label: t('orderManagement.table.orderNo'), prop: 'order_no' },
|
||||
{ label: '订单号', prop: 'order_no' },
|
||||
{
|
||||
label: t('orderManagement.table.orderType'),
|
||||
label: '订单类型',
|
||||
formatter: (_, data) => getOrderTypeText(data.order_type)
|
||||
},
|
||||
{
|
||||
label: t('orderManagement.table.paymentStatus'),
|
||||
label: '支付状态',
|
||||
formatter: (_, data) => data.payment_status_text || '-'
|
||||
},
|
||||
{
|
||||
label: t('orderManagement.table.totalAmount'),
|
||||
label: '订单金额',
|
||||
prop: 'total_amount',
|
||||
formatter: (value) => formatCurrency(value)
|
||||
},
|
||||
@@ -148,7 +142,7 @@
|
||||
formatter: (value) => value || '-'
|
||||
},
|
||||
{
|
||||
label: t('orderManagement.table.buyerType'),
|
||||
label: '买家类型',
|
||||
formatter: (_, data) => (data.buyer_type ? getBuyerTypeText(data.buyer_type) : '-')
|
||||
},
|
||||
{
|
||||
@@ -198,7 +192,7 @@
|
||||
formatter: (value) => (value ? formatDateTime(value) : '-')
|
||||
},
|
||||
{
|
||||
label: t('orderManagement.table.commissionStatus'),
|
||||
label: '佣金状态',
|
||||
formatter: (_, data) => getCommissionStatusText(data.commission_status)
|
||||
},
|
||||
{
|
||||
@@ -206,12 +200,12 @@
|
||||
prop: 'commission_config_version'
|
||||
},
|
||||
{
|
||||
label: t('orderManagement.table.createdAt'),
|
||||
label: '创建时间',
|
||||
prop: 'created_at',
|
||||
formatter: (value) => formatDateTime(value)
|
||||
},
|
||||
{
|
||||
label: t('orderManagement.table.updatedAt'),
|
||||
label: '更新时间',
|
||||
prop: 'updated_at',
|
||||
formatter: (value) => formatDateTime(value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user