修改订单管理
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 2m28s

This commit is contained in:
sexygoat
2026-02-28 16:49:28 +08:00
parent ce1032c7f9
commit 7b459b5c8d
6 changed files with 219 additions and 21 deletions

View File

@@ -106,6 +106,17 @@
return statusMap[status] || '-'
}
// 获取订单角色文本
const getPurchaseRoleText = (role: string): string => {
const roleMap: Record<string, string> = {
self_purchase: '自己购买',
purchased_by_parent: '上级代理购买',
purchased_by_platform: '平台代购',
purchase_for_subordinate: '给下级购买'
}
return roleMap[role] || role
}
// 详情页配置
const detailSections: DetailSection[] = [
{
@@ -125,6 +136,11 @@
prop: 'total_amount',
formatter: (value) => formatCurrency(value)
},
{
label: '实付金额',
prop: 'actual_paid_amount',
formatter: (value) => (value !== undefined && value !== null ? formatCurrency(value) : '-')
},
{
label: 'IoT卡ID',
prop: 'iot_card_id',
@@ -132,7 +148,7 @@
},
{
label: t('orderManagement.table.buyerType'),
formatter: (_, data) => data.buyer_type ? getBuyerTypeText(data.buyer_type) : '-'
formatter: (_, data) => (data.buyer_type ? getBuyerTypeText(data.buyer_type) : '-')
},
{
label: '买家ID',
@@ -140,8 +156,32 @@
formatter: (value) => value || '-'
},
{
label: '代付订单',
formatter: (_, data) => data.is_purchase_on_behalf ? '是' : '否'
label: '订单角色',
formatter: (_, data) => (data.purchase_role ? getPurchaseRoleText(data.purchase_role) : '-')
},
{
label: '购买备注',
prop: 'purchase_remark',
formatter: (value) => value || '-'
},
{
label: '是否上级代购',
formatter: (_, data) => (data.is_purchased_by_parent ? '是' : '否')
},
{
label: '操作者ID',
prop: 'operator_id',
formatter: (value) => value || '-'
},
{
label: '操作者类型',
prop: 'operator_type',
formatter: (value) => value || '-'
},
{
label: '操作者名称',
prop: 'operator_name',
formatter: (value) => value || '-'
},
{
label: t('orderManagement.table.commissionStatus'),