feat: Track 网页端已完成/已入库/已出库状态展示与筛选
- ProductCard/ScanPage 徽标改用整体状态,补全宏观状态中文映射 - 产品管理/任务全景/我的任务/看板/WIP分析 状态筛选与徽标区分 - 转入在库显示在库实际操作人;新增已出库/OUTBOUND 状态色
This commit is contained in:
@ -115,7 +115,10 @@ const SlimCard = memo(function SlimCard({
|
||||
<p className={`${sz.title} font-bold text-gray-800 truncate`}>{task.task_name}</p>
|
||||
<div className={`${sz.metaRow} flex items-center gap-1`}>
|
||||
<span className={`rounded-full ${sz.status} font-medium ${cfg.bg} ${cfg.text}`}>{cfg.label}</span>
|
||||
<span className={`${sz.assignee} text-gray-400 truncate`}>{assigneeName || task.assignee_id || "—"}</span>
|
||||
{/* 在库任务不单独显示负责人,由下方"转入在库"统一展示实际操作人 */}
|
||||
{!isWarehouse && (
|
||||
<span className={`${sz.assignee} text-gray-400 truncate`}>{assigneeName || task.assignee_id || "—"}</span>
|
||||
)}
|
||||
</div>
|
||||
{/* 单行时间 */}
|
||||
<p className={`${sz.time} text-gray-300`}>
|
||||
@ -124,9 +127,9 @@ const SlimCard = memo(function SlimCard({
|
||||
</p>
|
||||
{legacy && <p className={`${sz.sub} text-orange-500`}>源自: {assigneeName || (findParent(task)?.assignee_id) || "历史任务"}</p>}
|
||||
{isNestedSpawn && <p className={`${sz.sub} text-purple-500`}>协助: {findParent(task)?.assignee_id || "—"}</p>}
|
||||
{/* 📥 在库任务:显示谁转入在库 */}
|
||||
{isWarehouse && task.created_by && (
|
||||
<p className={`${sz.sub} text-emerald-600`}>📥 转入在库: {assigneeNames?.[task.created_by] || task.created_by}</p>
|
||||
{/* 📥 在库任务:显示实际执行"转入在库"的操作人(任务负责人) */}
|
||||
{isWarehouse && task.assignee_id && (
|
||||
<p className={`${sz.sub} text-emerald-600`}>📥 转入在库: {assigneeName || task.assignee_id}</p>
|
||||
)}
|
||||
{/* 操作按钮 */}
|
||||
{active && isOwner && (
|
||||
|
||||
@ -8,13 +8,15 @@ interface ProductCardProps {
|
||||
}
|
||||
|
||||
export default function ProductCard({ product }: ProductCardProps) {
|
||||
// 优先显示宏观状态(整体流转),回退到产品状态字段
|
||||
const displayStatus = product.overall_status || product.status;
|
||||
return (
|
||||
<div className="rounded-xl bg-white p-4 shadow-sm">
|
||||
<div className="mb-3 flex items-center gap-2">
|
||||
<Package className="h-5 w-5 text-blue-600" />
|
||||
<h3 className="font-semibold text-gray-800">产品信息</h3>
|
||||
<span className={`ml-auto rounded-full px-2.5 py-0.5 text-xs font-medium ${statusColor(product.status)}`}>
|
||||
{statusLabel(product.status)}
|
||||
<span className={`ml-auto rounded-full px-2.5 py-0.5 text-xs font-medium ${statusColor(displayStatus)}`}>
|
||||
{statusLabel(displayStatus)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-2 text-sm">
|
||||
|
||||
Reference in New Issue
Block a user