接单工单支持置顶,抢单大厅优先展示

- 新增 work_orders.pinned_at 字段与迁移
- 管理端对已发布(待抢单)订单提供置顶/取消置顶操作,置顶订单带标记
- 抢单大厅按置顶时间优先排序,打手端卡片展示置顶标签
This commit is contained in:
yml2213
2026-08-16 15:57:25 +08:00
parent 737f9ddcbe
commit 8d07b06d52
12 changed files with 121 additions and 11 deletions
@@ -1,4 +1,4 @@
import { ClockCircleOutlined, ReloadOutlined, SearchOutlined, TrophyOutlined } from '@ant-design/icons'
import { ClockCircleOutlined, PushpinOutlined, ReloadOutlined, SearchOutlined, TrophyOutlined } from '@ant-design/icons'
import { useQuery, useQueryClient } from '@tanstack/react-query'
import {
Alert,
@@ -367,6 +367,11 @@ export default function WorkerHallPage() {
{/* 卡片头部: 分类 + 拼单/时限标签 + 订单号 */}
<div className="worker-hall-mobile-card-top">
<div className="worker-hall-mobile-card-tags">
{order.pinnedAt ? (
<Tag color="gold" icon={<PushpinOutlined />} className="worker-hall-mobile-tag">
</Tag>
) : null}
{order.categoryName ? (
<Tag color="blue" className="worker-hall-mobile-tag">
{order.categoryName}
@@ -610,6 +615,11 @@ export default function WorkerHallPage() {
return (
<article key={order.workOrderId} className="worker-hall-card">
<div className="worker-hall-card-title">
{order.pinnedAt ? (
<Tag color="gold" icon={<PushpinOutlined />} className="worker-hall-pinned-tag">
</Tag>
) : null}
<strong
className="worker-hall-card-title-text"
title={order.productName || '未命名商品'}