feat(finance): 统一履约事实并改造人工账单分类
This commit is contained in:
@@ -32,7 +32,7 @@ import StatusTag from '@/components/admin/StatusTag'
|
||||
import { fetchAdminOrderDetail, updateAdminOrderClaimStatus } from '@/services/admin'
|
||||
import type { AdminOrderDetail, AdminTaskListItem } from '@/types/admin'
|
||||
import { formatAdminDateTime } from '@/utils/admin-time'
|
||||
import { resolveOrderFulfillmentMode } from '@/utils/admin-display'
|
||||
import { resolveOrderFulfillmentMode, resolveVoucherStateLabel } from '@/utils/admin-display'
|
||||
|
||||
export default function AdminOrderDetailPage() {
|
||||
const navigate = useNavigate()
|
||||
@@ -185,9 +185,11 @@ export default function AdminOrderDetailPage() {
|
||||
detail.order.payStatus === 'refunded' || detail.order.orderStatus === 'cancelled'
|
||||
const canPauseOrClose = !isOrderFulfilled && !isOrderRefundedOrCancelled
|
||||
const isAutoClaimOrder = Boolean(
|
||||
detail.order.canClaimH5 || detail.order.fulfillmentType === 'auto_claim',
|
||||
detail.order.fulfillmentMode === 'affiliate_dash' ||
|
||||
(detail.order.fulfillmentMode === 'mixed' && detail.order.canClaimH5),
|
||||
)
|
||||
const fulfillmentMode = resolveOrderFulfillmentMode(detail.order)
|
||||
const voucherLabel = resolveVoucherStateLabel(detail.order.voucherState)
|
||||
|
||||
return (
|
||||
<section className="page-stack">
|
||||
@@ -254,6 +256,15 @@ export default function AdminOrderDetailPage() {
|
||||
{fulfillmentMode.label}
|
||||
</Tag>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="核销码">
|
||||
{detail.order.hasVoucher && voucherLabel ? (
|
||||
<Tag color="gold" style={{ margin: 0 }}>
|
||||
🎫 {voucherLabel}
|
||||
</Tag>
|
||||
) : (
|
||||
<span className="muted">无</span>
|
||||
)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="订单状态">
|
||||
<StatusTag value={detail.order.orderStatus} />
|
||||
</Descriptions.Item>
|
||||
|
||||
@@ -32,7 +32,11 @@ import StatusTag from '@/components/admin/StatusTag'
|
||||
import dayjs from '@/lib/dayjs'
|
||||
import { fetchAdminOrders } from '@/services/admin'
|
||||
import type { AdminOrderListItem } from '@/types/admin'
|
||||
import { resolveOrderFulfillmentMode, resolveOrderPlatformBadge } from '@/utils/admin-display'
|
||||
import {
|
||||
resolveOrderFulfillmentMode,
|
||||
resolveOrderPlatformBadge,
|
||||
resolveVoucherStateLabel,
|
||||
} from '@/utils/admin-display'
|
||||
import {
|
||||
adminOrderExecutorOptions,
|
||||
adminOrderPlatformSegmentedOptions,
|
||||
@@ -271,6 +275,7 @@ export default function AdminOrdersPage() {
|
||||
minWidth: 230,
|
||||
render: (_, row) => {
|
||||
const fulfillmentMode = resolveOrderFulfillmentMode(row)
|
||||
const voucherLabel = resolveVoucherStateLabel(row.voucherState)
|
||||
|
||||
return (
|
||||
<div className="cell-stack" style={{ gap: 4 }}>
|
||||
@@ -278,6 +283,11 @@ export default function AdminOrdersPage() {
|
||||
<Tag color={fulfillmentMode.color} style={{ margin: 0, fontSize: 11 }}>
|
||||
{fulfillmentMode.label}
|
||||
</Tag>
|
||||
{row.hasVoucher && voucherLabel ? (
|
||||
<Tag color="gold" style={{ margin: 0, fontSize: 11 }}>
|
||||
🎫 {voucherLabel}
|
||||
</Tag>
|
||||
) : null}
|
||||
<StatusTag value={row.payStatus} kind="pay" />
|
||||
<StatusTag value={row.resourceStatus} kind="resource" />
|
||||
<StatusTag value={row.customerStatus} kind="customer" />
|
||||
@@ -318,8 +328,7 @@ export default function AdminOrdersPage() {
|
||||
render: (_, row) => {
|
||||
const orderNo = row.platformOrderId || String(row.orderId)
|
||||
const h5Url = `${window.location.origin}/h5/${encodeURIComponent(orderNo)}`
|
||||
const isManualOrder =
|
||||
row.fulfillmentType === 'manual' || (!row.canClaimH5 && !row.workOrderCount)
|
||||
const isManualOrder = Number(row.manualItemCount || 0) > 0
|
||||
|
||||
return (
|
||||
<Space size={6} wrap>
|
||||
|
||||
Reference in New Issue
Block a user