feat(orders): 优化我的订单列表与订单详情界面
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
|||||||
Tag,
|
Tag,
|
||||||
Typography,
|
Typography,
|
||||||
} from 'antd'
|
} from 'antd'
|
||||||
import { ArrowLeftOutlined, MessageOutlined } from '@ant-design/icons'
|
import { ArrowLeftOutlined, CopyOutlined, MessageOutlined } from '@ant-design/icons'
|
||||||
import { useQueryClient } from '@tanstack/react-query'
|
import { useQueryClient } from '@tanstack/react-query'
|
||||||
import { Link, useNavigate, useParams } from 'react-router-dom'
|
import { Link, useNavigate, useParams } from 'react-router-dom'
|
||||||
|
|
||||||
@@ -37,6 +37,18 @@ const handoffRecordTypeMap: Record<string, string> = {
|
|||||||
renter_return: '归还记录',
|
renter_return: '归还记录',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TAG_COLORS: Record<string, string> = {
|
||||||
|
default: 'default',
|
||||||
|
primary: 'blue',
|
||||||
|
success: 'green',
|
||||||
|
warning: 'orange',
|
||||||
|
danger: 'red',
|
||||||
|
}
|
||||||
|
|
||||||
|
function toneColor(tone: string) {
|
||||||
|
return TAG_COLORS[tone] ?? 'default'
|
||||||
|
}
|
||||||
|
|
||||||
export function OrderDetailPage() {
|
export function OrderDetailPage() {
|
||||||
const { id } = useParams()
|
const { id } = useParams()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
@@ -50,6 +62,16 @@ export function OrderDetailPage() {
|
|||||||
const records = handoffQuery.data ?? []
|
const records = handoffQuery.data ?? []
|
||||||
const [openingChat, setOpeningChat] = useState(false)
|
const [openingChat, setOpeningChat] = useState(false)
|
||||||
|
|
||||||
|
const copyOrderNo = async () => {
|
||||||
|
if (!order) return
|
||||||
|
try {
|
||||||
|
await navigator.clipboard.writeText(order.order_no)
|
||||||
|
message.success('订单号已复制')
|
||||||
|
} catch {
|
||||||
|
message.error('复制失败,请手动选择订单号')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const openOrderChat = async () => {
|
const openOrderChat = async () => {
|
||||||
if (!order || openingChat) return
|
if (!order || openingChat) return
|
||||||
setOpeningChat(true)
|
setOpeningChat(true)
|
||||||
@@ -135,28 +157,78 @@ export function OrderDetailPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section className="pc-order-detail-hero">
|
<section className="pc-order-detail-hero">
|
||||||
<div>
|
<div className="pc-order-detail-hero__main">
|
||||||
<span className="pc-order-detail-hero__no">{order.order_no}</span>
|
<div className="pc-order-detail-hero__no">
|
||||||
|
<span>{order.order_no}</span>
|
||||||
|
<Button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
icon={<CopyOutlined />}
|
||||||
|
className="pc-order-detail-hero__copy"
|
||||||
|
onClick={() => void copyOrderNo()}
|
||||||
|
>
|
||||||
|
复制
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
<Typography.Title level={2} className="brand-title">
|
<Typography.Title level={2} className="brand-title">
|
||||||
{order.title}
|
{order.title}
|
||||||
</Typography.Title>
|
</Typography.Title>
|
||||||
<Space size={6} wrap>
|
<Space size={6} wrap>
|
||||||
<Tag color={status.tone}>{status.label}</Tag>
|
<Tag color={toneColor(status.tone)}>{status.label}</Tag>
|
||||||
<Tag color={handoff.tone} bordered={false}>
|
<Tag color={toneColor(handoff.tone)} bordered={false}>
|
||||||
交接:{handoff.label}
|
交接:{handoff.label}
|
||||||
</Tag>
|
</Tag>
|
||||||
<Tag color={settlement.tone} bordered={false}>
|
<Tag color={toneColor(settlement.tone)} bordered={false}>
|
||||||
结算:{settlement.label}
|
结算:{settlement.label}
|
||||||
</Tag>
|
</Tag>
|
||||||
|
{order.active_dispute ? <Tag color="red">申诉处理中</Tag> : null}
|
||||||
</Space>
|
</Space>
|
||||||
|
{order.status === 'pending_payment' ? (
|
||||||
|
<p className="pc-order-detail-hero__hint">
|
||||||
|
请在 {formatDateTime(order.payment_deadline_at)} 前完成支付,超时订单会自动关闭。
|
||||||
|
</p>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<div className="pc-order-detail-hero__amount">
|
<div className="pc-order-detail-hero__amount">
|
||||||
<span>订单金额</span>
|
<span>订单金额</span>
|
||||||
<strong>{formatMoney(order.display_amount_cent)}</strong>
|
<strong>{formatMoney(order.display_amount_cent)}</strong>
|
||||||
<small>押金 {formatMoney(order.deposit_amount_cent)}</small>
|
<small>含押金 {formatMoney(order.deposit_amount_cent)}</small>
|
||||||
|
{order.deposit_waived_amount_cent > 0 ? (
|
||||||
|
<small>已免押 {formatMoney(order.deposit_waived_amount_cent)}</small>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<div className="pc-order-metrics">
|
||||||
|
<div className="pc-order-metric">
|
||||||
|
<span>租金</span>
|
||||||
|
<strong>
|
||||||
|
{formatMoney(
|
||||||
|
order.rent_amount_cent ??
|
||||||
|
Math.max(0, order.display_amount_cent - order.deposit_amount_cent)
|
||||||
|
)}
|
||||||
|
</strong>
|
||||||
|
</div>
|
||||||
|
<div className="pc-order-metric">
|
||||||
|
<span>实收押金</span>
|
||||||
|
<strong>{formatMoney(order.deposit_amount_cent)}</strong>
|
||||||
|
</div>
|
||||||
|
<div className="pc-order-metric">
|
||||||
|
<span>押金减免</span>
|
||||||
|
<strong className={order.deposit_waived_amount_cent > 0 ? 'is-waived' : ''}>
|
||||||
|
{order.deposit_waived_amount_cent > 0
|
||||||
|
? `-${formatMoney(order.deposit_waived_amount_cent)}`
|
||||||
|
: '—'}
|
||||||
|
</strong>
|
||||||
|
</div>
|
||||||
|
<div className="pc-order-metric">
|
||||||
|
<span>预计租期</span>
|
||||||
|
<strong>
|
||||||
|
{order.estimated_duration_hours ? `${order.estimated_duration_hours} 小时` : '—'}
|
||||||
|
</strong>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Row gutter={[20, 20]} className="pc-order-detail-page__body">
|
<Row gutter={[20, 20]} className="pc-order-detail-page__body">
|
||||||
<Col xs={24} lg={16}>
|
<Col xs={24} lg={16}>
|
||||||
<Card title="商品信息" className="pc-order-detail-card">
|
<Card title="商品信息" className="pc-order-detail-card">
|
||||||
@@ -222,7 +294,7 @@ export function OrderDetailPage() {
|
|||||||
<Card title="结账单" className="pc-order-detail-card">
|
<Card title="结账单" className="pc-order-detail-card">
|
||||||
<Descriptions column={2} size="small" colon={false}>
|
<Descriptions column={2} size="small" colon={false}>
|
||||||
<Descriptions.Item label="结账状态">
|
<Descriptions.Item label="结账状态">
|
||||||
<Tag color={checkoutStatusMeta(checkout.status).tone}>
|
<Tag color={toneColor(checkoutStatusMeta(checkout.status).tone)}>
|
||||||
{checkoutStatusMeta(checkout.status).label}
|
{checkoutStatusMeta(checkout.status).label}
|
||||||
</Tag>
|
</Tag>
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
@@ -285,7 +357,10 @@ export function OrderDetailPage() {
|
|||||||
|
|
||||||
<Card title="交接与结账记录" className="pc-order-detail-card">
|
<Card title="交接与结账记录" className="pc-order-detail-card">
|
||||||
{records.length === 0 ? (
|
{records.length === 0 ? (
|
||||||
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="暂无交接或结账记录" />
|
<Empty
|
||||||
|
image={Empty.PRESENTED_IMAGE_SIMPLE}
|
||||||
|
description="暂无记录,支付完成并开始交接后,这里会保留每一次交接与结账内容。"
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="pc-order-records">
|
<div className="pc-order-records">
|
||||||
{records.map(record => (
|
{records.map(record => (
|
||||||
|
|||||||
@@ -4,12 +4,13 @@ import {
|
|||||||
Alert,
|
Alert,
|
||||||
Button,
|
Button,
|
||||||
Card,
|
Card,
|
||||||
|
Empty,
|
||||||
|
Pagination,
|
||||||
Select,
|
Select,
|
||||||
|
Skeleton,
|
||||||
Space,
|
Space,
|
||||||
Table,
|
|
||||||
Tag,
|
Tag,
|
||||||
Typography,
|
Typography,
|
||||||
type TableColumnsType,
|
|
||||||
} from 'antd'
|
} from 'antd'
|
||||||
import { ReloadOutlined, RightOutlined } from '@ant-design/icons'
|
import { ReloadOutlined, RightOutlined } from '@ant-design/icons'
|
||||||
import { Link, useNavigate } from 'react-router-dom'
|
import { Link, useNavigate } from 'react-router-dom'
|
||||||
@@ -23,6 +24,14 @@ import { formatDateTime, formatMoney, formatText } from '@/shared/utils/format'
|
|||||||
|
|
||||||
const PAGE_SIZE = 20
|
const PAGE_SIZE = 20
|
||||||
|
|
||||||
|
const TAG_COLORS: Record<string, string> = {
|
||||||
|
default: 'default',
|
||||||
|
primary: 'blue',
|
||||||
|
success: 'green',
|
||||||
|
warning: 'orange',
|
||||||
|
danger: 'red',
|
||||||
|
}
|
||||||
|
|
||||||
const statusOptions = [
|
const statusOptions = [
|
||||||
'pending_payment',
|
'pending_payment',
|
||||||
'pending_handoff',
|
'pending_handoff',
|
||||||
@@ -38,91 +47,79 @@ const statusOptions = [
|
|||||||
'abnormal',
|
'abnormal',
|
||||||
].map(value => ({ value, label: orderStatusMeta(value).label }))
|
].map(value => ({ value, label: orderStatusMeta(value).label }))
|
||||||
|
|
||||||
function buildColumns(navigate: (id: number) => void): TableColumnsType<UserOrderListItem> {
|
function toneColor(tone: string) {
|
||||||
return [
|
return TAG_COLORS[tone] ?? 'default'
|
||||||
{
|
}
|
||||||
title: '订单',
|
|
||||||
dataIndex: 'order_no',
|
function OrderCard({
|
||||||
width: 300,
|
order,
|
||||||
fixed: 'left',
|
onOpen,
|
||||||
render: (_, row) => (
|
}: {
|
||||||
<div className="pc-order-cell">
|
order: UserOrderListItem
|
||||||
<button type="button" className="pc-order-link" onClick={() => navigate(row.id)}>
|
onOpen: () => void
|
||||||
{row.order_no}
|
}) {
|
||||||
</button>
|
const status = orderStatusMeta(order.status)
|
||||||
<strong>{row.title}</strong>
|
const handoff = handoffStatusMeta(order.handoff_status)
|
||||||
<span>
|
|
||||||
<Tag bordered={false}>{roleLabel(row.role)}</Tag>
|
return (
|
||||||
<span className="pc-order-muted">{row.listing_no}</span>
|
<article
|
||||||
</span>
|
className="pc-order-card"
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
|
onClick={onOpen}
|
||||||
|
onKeyDown={event => {
|
||||||
|
if (event.key === 'Enter' || event.key === ' ') {
|
||||||
|
event.preventDefault()
|
||||||
|
onOpen()
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="pc-order-card__head">
|
||||||
|
<div className="pc-order-card__no">
|
||||||
|
<span>{order.order_no}</span>
|
||||||
|
<Tag bordered={false}>{roleLabel(order.role)}</Tag>
|
||||||
</div>
|
</div>
|
||||||
),
|
<Space size={6} wrap>
|
||||||
},
|
<Tag color={toneColor(status.tone)}>{status.label}</Tag>
|
||||||
{
|
<Tag color={toneColor(handoff.tone)} bordered={false}>
|
||||||
title: '商品',
|
{handoff.label}
|
||||||
key: 'listing',
|
|
||||||
width: 220,
|
|
||||||
render: (_, row) => (
|
|
||||||
<div className="pc-order-cell">
|
|
||||||
<span>{formatText(row.server_region)}</span>
|
|
||||||
<span className="pc-order-muted">{formatText(row.login_platform)}</span>
|
|
||||||
<span className="pc-order-muted">
|
|
||||||
{row.rental_days ? `${row.rental_days} 天` : '按账号规则'}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '金额',
|
|
||||||
key: 'amount',
|
|
||||||
width: 180,
|
|
||||||
align: 'right',
|
|
||||||
render: (_, row) => (
|
|
||||||
<div className="pc-order-amount">
|
|
||||||
<strong>{formatMoney(row.display_amount_cent)}</strong>
|
|
||||||
<span>押金 {formatMoney(row.deposit_amount_cent)}</span>
|
|
||||||
{row.deposit_waived_amount_cent > 0 ? (
|
|
||||||
<span>减免 {formatMoney(row.deposit_waived_amount_cent)}</span>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '状态',
|
|
||||||
key: 'status',
|
|
||||||
width: 190,
|
|
||||||
render: (_, row) => (
|
|
||||||
<Space size={4} wrap>
|
|
||||||
<Tag color={orderStatusMeta(row.status).tone}>{orderStatusMeta(row.status).label}</Tag>
|
|
||||||
<Tag color={handoffStatusMeta(row.handoff_status).tone} bordered={false}>
|
|
||||||
{handoffStatusMeta(row.handoff_status).label}
|
|
||||||
</Tag>
|
</Tag>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
</div>
|
||||||
},
|
|
||||||
{
|
<div className="pc-order-card__body">
|
||||||
title: '时间',
|
<div className="pc-order-card__main">
|
||||||
key: 'time',
|
<h3>{order.title || '未命名订单'}</h3>
|
||||||
width: 190,
|
<div className="pc-order-card__meta">
|
||||||
render: (_, row) => (
|
<span>商品编号 {formatText(order.listing_no)}</span>
|
||||||
<div className="pc-order-cell">
|
<span>{formatText(order.server_region)}</span>
|
||||||
<span>下单 {formatDateTime(row.created_at)}</span>
|
<span>{formatText(order.login_platform)}</span>
|
||||||
<span className="pc-order-muted">支付截止 {formatDateTime(row.payment_deadline_at)}</span>
|
<span>{order.rental_days ? `${order.rental_days} 天` : '按账号规则'}</span>
|
||||||
|
{order.daily_loss_m ? <span>日耗 {order.daily_loss_m}M</span> : null}
|
||||||
|
</div>
|
||||||
|
<div className="pc-order-card__times">
|
||||||
|
<span>下单 {formatDateTime(order.created_at)}</span>
|
||||||
|
<span>支付截止 {formatDateTime(order.payment_deadline_at)}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
),
|
|
||||||
},
|
<div className="pc-order-card__side">
|
||||||
{
|
<div className="pc-order-card__amount">
|
||||||
title: '',
|
<strong>{formatMoney(order.display_amount_cent)}</strong>
|
||||||
key: 'actions',
|
<span>押金 {formatMoney(order.deposit_amount_cent)}</span>
|
||||||
width: 90,
|
{order.deposit_waived_amount_cent > 0 ? (
|
||||||
fixed: 'right',
|
<span className="is-waived">
|
||||||
render: (_, row) => (
|
押金减免 -{formatMoney(order.deposit_waived_amount_cent)}
|
||||||
<Button type="link" onClick={() => navigate(row.id)}>
|
</span>
|
||||||
详情 <RightOutlined />
|
) : null}
|
||||||
</Button>
|
</div>
|
||||||
),
|
<span className="pc-order-card__detail">
|
||||||
},
|
查看详情 <RightOutlined />
|
||||||
]
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function OrderListPage() {
|
export function OrderListPage() {
|
||||||
@@ -139,8 +136,9 @@ export function OrderListPage() {
|
|||||||
enabled: Boolean(token),
|
enabled: Boolean(token),
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = buildColumns(id => navigate(`/orders/${id}`))
|
|
||||||
const errorText = error instanceof Error ? error.message : '请稍后重试或重新登录。'
|
const errorText = error instanceof Error ? error.message : '请稍后重试或重新登录。'
|
||||||
|
const items = data?.items ?? []
|
||||||
|
const total = data?.total ?? 0
|
||||||
|
|
||||||
if (!hydrated) {
|
if (!hydrated) {
|
||||||
return (
|
return (
|
||||||
@@ -183,7 +181,7 @@ export function OrderListPage() {
|
|||||||
查看租用进度、支付、交接、结账与申诉记录。
|
查看租用进度、支付、交接、结账与申诉记录。
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
</div>
|
</div>
|
||||||
<Space>
|
<Space wrap>
|
||||||
<Select
|
<Select
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: 190 }}
|
style={{ width: 190 }}
|
||||||
@@ -217,29 +215,52 @@ export function OrderListPage() {
|
|||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<Card className="pc-orders-card">
|
<Card className="pc-orders-card">
|
||||||
<Table<UserOrderListItem>
|
<div className="pc-orders-toolbar">
|
||||||
rowKey="id"
|
<Typography.Text type="secondary">
|
||||||
columns={columns}
|
{isFetching ? '正在刷新订单…' : `共 ${total} 条订单`}
|
||||||
dataSource={data?.items ?? []}
|
</Typography.Text>
|
||||||
loading={isPending || isFetching}
|
</div>
|
||||||
scroll={{ x: 'max-content' }}
|
|
||||||
pagination={{
|
{isPending ? (
|
||||||
current: data?.page ?? page,
|
<div className="pc-orders-skeleton">
|
||||||
pageSize: data?.page_size ?? PAGE_SIZE,
|
{[0, 1, 2].map(index => (
|
||||||
total: data?.total ?? 0,
|
<div key={index} className="pc-order-card pc-order-card--skeleton">
|
||||||
showSizeChanger: false,
|
<Skeleton active paragraph={{ rows: 2 }} title={false} />
|
||||||
showTotal: (count, range) => `第 ${range[0]}-${range[1]} 条 / 共 ${count} 条`,
|
|
||||||
onChange: next => setPage(next),
|
|
||||||
}}
|
|
||||||
locale={{
|
|
||||||
emptyText: (
|
|
||||||
<div className="pc-orders-empty">
|
|
||||||
<p>还没有订单</p>
|
|
||||||
<Link to="/#listings">去看看柜选</Link>
|
|
||||||
</div>
|
</div>
|
||||||
),
|
))}
|
||||||
}}
|
</div>
|
||||||
/>
|
) : items.length === 0 ? (
|
||||||
|
<Empty className="pc-orders-empty" description="还没有订单">
|
||||||
|
<Link to="/#listings">
|
||||||
|
<Button type="primary">去看看柜选</Button>
|
||||||
|
</Link>
|
||||||
|
</Empty>
|
||||||
|
) : (
|
||||||
|
<div className="pc-orders-list">
|
||||||
|
{items.map(order => (
|
||||||
|
<OrderCard
|
||||||
|
key={order.id}
|
||||||
|
order={order}
|
||||||
|
onOpen={() => navigate(`/orders/${order.id}`)}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{total > PAGE_SIZE ? (
|
||||||
|
<div className="pc-orders-pagination">
|
||||||
|
<Typography.Text type="secondary">
|
||||||
|
第 {page} 页 · 每页 {PAGE_SIZE} 条
|
||||||
|
</Typography.Text>
|
||||||
|
<Pagination
|
||||||
|
current={data?.page ?? page}
|
||||||
|
pageSize={data?.page_size ?? PAGE_SIZE}
|
||||||
|
total={total}
|
||||||
|
showSizeChanger={false}
|
||||||
|
onChange={next => setPage(next)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -152,6 +152,156 @@
|
|||||||
background: var(--paper-warm);
|
background: var(--paper-warm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pc-orders-toolbar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-orders-list,
|
||||||
|
.pc-orders-skeleton {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card {
|
||||||
|
padding: 16px 18px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
border-radius: 10px;
|
||||||
|
background: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
transition:
|
||||||
|
border-color 0.16s ease,
|
||||||
|
box-shadow 0.16s ease,
|
||||||
|
transform 0.16s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card:hover,
|
||||||
|
.pc-order-card:focus-visible {
|
||||||
|
border-color: var(--brand-ink);
|
||||||
|
box-shadow: 0 10px 26px rgba(30, 77, 66, 0.08);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card--skeleton {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__head {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 8px 12px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__no {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
color: var(--ink-muted);
|
||||||
|
font-family: 'Inter', monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__body {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) 220px;
|
||||||
|
gap: 20px;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__main h3 {
|
||||||
|
margin: 0 0 8px;
|
||||||
|
color: var(--brand-ink);
|
||||||
|
font-family: 'Noto Serif SC', 'Songti SC', serif;
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__meta,
|
||||||
|
.pc-order-card__times {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px 16px;
|
||||||
|
color: var(--ink-secondary);
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__times {
|
||||||
|
margin-top: 10px;
|
||||||
|
color: var(--ink-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__side {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
gap: 10px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__amount strong {
|
||||||
|
display: block;
|
||||||
|
color: var(--brand-seal);
|
||||||
|
font-family: 'Inter', 'DIN Alternate', sans-serif;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__amount span {
|
||||||
|
display: block;
|
||||||
|
color: var(--ink-muted);
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__amount .is-waived {
|
||||||
|
color: var(--brand-seal);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__detail {
|
||||||
|
color: var(--brand-ink);
|
||||||
|
font-size: 12px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-orders-pagination {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
margin-top: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-orders-empty {
|
||||||
|
padding: 36px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.pc-order-card__body {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__side {
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-card__amount strong {
|
||||||
|
font-size: 21px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.pc-orders-login {
|
.pc-orders-login {
|
||||||
max-width: 520px;
|
max-width: 520px;
|
||||||
margin: 60px auto;
|
margin: 60px auto;
|
||||||
@@ -249,12 +399,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pc-order-detail-hero__no {
|
.pc-order-detail-hero__no {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
color: #b9cbc3;
|
color: #b9cbc3;
|
||||||
font-family: 'Inter', monospace;
|
font-family: 'Inter', monospace;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pc-order-detail-hero__copy {
|
||||||
|
color: #d8e4de !important;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-detail-hero__hint {
|
||||||
|
margin: 12px 0 0;
|
||||||
|
color: #f0d7b8;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.pc-order-detail-hero h2 {
|
.pc-order-detail-hero h2 {
|
||||||
margin: 8px 0 12px !important;
|
margin: 8px 0 12px !important;
|
||||||
color: #f6f2e8 !important;
|
color: #f6f2e8 !important;
|
||||||
@@ -286,6 +450,39 @@
|
|||||||
background: var(--paper-warm);
|
background: var(--paper-warm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pc-order-metrics {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
|
gap: 12px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-metric {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 5px;
|
||||||
|
padding: 13px 16px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
border-radius: 10px;
|
||||||
|
background: var(--paper-warm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-metric span {
|
||||||
|
color: var(--ink-muted);
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-metric strong {
|
||||||
|
color: var(--brand-ink);
|
||||||
|
font-family: 'Inter', 'DIN Alternate', sans-serif;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-metric strong.is-waived {
|
||||||
|
color: var(--brand-seal);
|
||||||
|
}
|
||||||
|
|
||||||
.pc-order-detail-side {
|
.pc-order-detail-side {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 84px;
|
top: 84px;
|
||||||
@@ -300,6 +497,12 @@
|
|||||||
background: var(--paper-warm);
|
background: var(--paper-warm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pc-order-action-card .ant-btn-primary {
|
||||||
|
width: 100%;
|
||||||
|
height: 42px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
.pc-order-action-card .ant-card-head-title {
|
.pc-order-action-card .ant-card-head-title {
|
||||||
color: var(--brand-ink);
|
color: var(--brand-ink);
|
||||||
}
|
}
|
||||||
@@ -323,12 +526,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pc-order-record {
|
.pc-order-record {
|
||||||
padding: 14px 0;
|
position: relative;
|
||||||
border-bottom: 1px dashed var(--line);
|
margin-left: 6px;
|
||||||
|
padding: 0 0 18px 20px;
|
||||||
|
border-left: 1px solid var(--line);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-order-record::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
left: -4px;
|
||||||
|
width: 7px;
|
||||||
|
height: 7px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--brand-ink);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pc-order-record:last-child {
|
.pc-order-record:last-child {
|
||||||
border-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
border-left-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pc-order-record__head {
|
.pc-order-record__head {
|
||||||
@@ -354,6 +571,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
|
.pc-order-metrics {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
.pc-orders-page__head,
|
.pc-orders-page__head,
|
||||||
.pc-order-detail-hero {
|
.pc-order-detail-hero {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
Reference in New Issue
Block a user