统一寄卖仓库与提报审核规格展示
- 规格标签只显示值,0 璀璨不再显示「无」 - 仓库列表长规格文本改为纯值一行 - 列表物品名展示层清理历史 0 璀璨残留 - 补充规格展示回归测试
This commit is contained in:
@@ -67,8 +67,10 @@ import { buildConsignmentCategoryGroups } from '@/utils/consignment-category-tre
|
||||
import { describeGiftEvidence, resolveGiftEvidenceBadge } from '@/utils/consignment-evidence'
|
||||
import {
|
||||
CONSIGNMENT_SPEC_TAG_COLORS,
|
||||
resolveConsignmentSpecDisplayItems,
|
||||
resolveConsignmentDisplayItemName,
|
||||
resolveConsignmentSpecTagItems,
|
||||
resolveConsignmentSpecText,
|
||||
resolveConsignmentSpecValueText,
|
||||
} from '@/utils/consignment-spec-display'
|
||||
import { CONSIGNMENT_SYSTEM_OPTIONS, CONSIGNMENT_ZONE_OPTIONS } from '@/utils/consignment-spec'
|
||||
import { formatDateTime } from '@/utils/date-time'
|
||||
@@ -480,64 +482,69 @@ export default function ConsignmentInventoryPanel() {
|
||||
title: '物品/寄卖单号',
|
||||
key: 'item',
|
||||
width: 240,
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
<div style={{ fontWeight: 600, fontSize: 14 }}>{record.itemName}</div>
|
||||
{record.specText ? (
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
{record.specText}
|
||||
</Text>
|
||||
) : null}
|
||||
<Space size={4} align="center">
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
寄卖单号
|
||||
</Text>
|
||||
<Text copyable style={{ fontSize: 12, fontWeight: 600 }}>
|
||||
{resolveConsignmentNo(record)}
|
||||
</Text>
|
||||
</Space>
|
||||
{record.giftWorkOrderNo ? (
|
||||
render: (_, record) => {
|
||||
const specLine = resolveConsignmentSpecValueText(record, { omitZeroBrilliance: true })
|
||||
return (
|
||||
<div>
|
||||
<div style={{ fontWeight: 600, fontSize: 14 }}>
|
||||
{resolveConsignmentDisplayItemName(record)}
|
||||
</div>
|
||||
{specLine ? (
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
{specLine}
|
||||
</Text>
|
||||
) : null}
|
||||
<Space size={4} align="center">
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
寄卖单号
|
||||
</Text>
|
||||
<Text copyable style={{ fontSize: 12, fontWeight: 600 }}>
|
||||
{resolveConsignmentNo(record)}
|
||||
</Text>
|
||||
</Space>
|
||||
{record.giftWorkOrderNo ? (
|
||||
<div style={{ marginTop: 2 }}>
|
||||
<Space size={4} align="center" wrap>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
关联工单
|
||||
</Text>
|
||||
<Text copyable style={{ fontSize: 12, fontWeight: 600, color: '#1677ff' }}>
|
||||
{record.giftWorkOrderNo}
|
||||
</Text>
|
||||
{record.giftWorkOrderStatus ? (
|
||||
<Tag
|
||||
color="cyan"
|
||||
style={{
|
||||
fontSize: 10,
|
||||
lineHeight: '16px',
|
||||
padding: '0 4px',
|
||||
marginInlineEnd: 0,
|
||||
}}
|
||||
>
|
||||
{formatGiftWorkOrderStatus(record.giftWorkOrderStatus)}
|
||||
</Tag>
|
||||
) : null}
|
||||
</Space>
|
||||
</div>
|
||||
) : null}
|
||||
<div style={{ marginTop: 2 }}>
|
||||
<Space size={4} align="center" wrap>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
关联工单
|
||||
</Text>
|
||||
<Text copyable style={{ fontSize: 12, fontWeight: 600, color: '#1677ff' }}>
|
||||
{record.giftWorkOrderNo}
|
||||
</Text>
|
||||
{record.giftWorkOrderStatus ? (
|
||||
<Tag
|
||||
color="cyan"
|
||||
style={{
|
||||
fontSize: 10,
|
||||
lineHeight: '16px',
|
||||
padding: '0 4px',
|
||||
marginInlineEnd: 0,
|
||||
}}
|
||||
>
|
||||
{formatGiftWorkOrderStatus(record.giftWorkOrderStatus)}
|
||||
</Tag>
|
||||
) : null}
|
||||
</Space>
|
||||
{record.sourceType === 'worker_portal' ? (
|
||||
<Tag color="purple" style={{ fontSize: 11, padding: '0 4px' }}>
|
||||
打手端提报
|
||||
</Tag>
|
||||
) : record.sourceType === 'recycle' ? (
|
||||
<Tag color="green" style={{ fontSize: 11, padding: '0 4px' }}>
|
||||
回收
|
||||
</Tag>
|
||||
) : (
|
||||
<Tag color="blue" style={{ fontSize: 11, padding: '0 4px' }}>
|
||||
人工入库
|
||||
</Tag>
|
||||
)}
|
||||
</div>
|
||||
) : null}
|
||||
<div style={{ marginTop: 2 }}>
|
||||
{record.sourceType === 'worker_portal' ? (
|
||||
<Tag color="purple" style={{ fontSize: 11, padding: '0 4px' }}>
|
||||
打手端提报
|
||||
</Tag>
|
||||
) : record.sourceType === 'recycle' ? (
|
||||
<Tag color="green" style={{ fontSize: 11, padding: '0 4px' }}>
|
||||
回收
|
||||
</Tag>
|
||||
) : (
|
||||
<Tag color="blue" style={{ fontSize: 11, padding: '0 4px' }}>
|
||||
人工入库
|
||||
</Tag>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '寄卖分类',
|
||||
@@ -562,7 +569,7 @@ export default function ConsignmentInventoryPanel() {
|
||||
width: 220,
|
||||
render: (_, record) => {
|
||||
// 规格按该分类已发布的寄卖模板渲染;没有规格配置的历史库存才回退旧字段。
|
||||
const specItems = resolveConsignmentSpecDisplayItems(record.specs, record.specValues)
|
||||
const specItems = resolveConsignmentSpecTagItems(record.specs, record.specValues)
|
||||
if (specItems.length > 0) {
|
||||
return (
|
||||
<Space size={4} wrap>
|
||||
@@ -570,8 +577,10 @@ export default function ConsignmentInventoryPanel() {
|
||||
<Tag
|
||||
key={item.key}
|
||||
color={CONSIGNMENT_SPEC_TAG_COLORS[index % CONSIGNMENT_SPEC_TAG_COLORS.length]}
|
||||
title={`${item.label}:${item.value}`}
|
||||
style={{ marginInlineEnd: 0, fontSize: 11, padding: '0 6px' }}
|
||||
>
|
||||
{item.label} {item.value}
|
||||
{item.value}
|
||||
</Tag>
|
||||
))}
|
||||
</Space>
|
||||
|
||||
@@ -46,7 +46,8 @@ import { formatConsignmentContactSupporter } from '@/utils/consignment-contact'
|
||||
import { describeGiftEvidence, resolveGiftEvidenceBadge } from '@/utils/consignment-evidence'
|
||||
import {
|
||||
CONSIGNMENT_SPEC_TAG_COLORS,
|
||||
resolveConsignmentSpecDisplayItems,
|
||||
resolveConsignmentDisplayItemName,
|
||||
resolveConsignmentSpecTagItems,
|
||||
resolveConsignmentSpecText,
|
||||
} from '@/utils/consignment-spec-display'
|
||||
import { CONSIGNMENT_SYSTEM_OPTIONS, CONSIGNMENT_ZONE_OPTIONS } from '@/utils/consignment-spec'
|
||||
@@ -245,18 +246,20 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
width: 230,
|
||||
render: (_, record) => {
|
||||
// 规格按该分类已发布的寄卖模板渲染;没配置规格的历史提报才回退旧字段。
|
||||
const specItems = resolveConsignmentSpecDisplayItems(record.specs, record.specValues)
|
||||
const specItems = resolveConsignmentSpecTagItems(record.specs, record.specValues)
|
||||
return (
|
||||
<Space direction="vertical" size={2}>
|
||||
<div style={{ fontWeight: 600 }}>{record.itemName}</div>
|
||||
<div style={{ fontWeight: 600 }}>{resolveConsignmentDisplayItemName(record)}</div>
|
||||
<Space size={4} wrap>
|
||||
{specItems.length > 0 ? (
|
||||
specItems.map((item, index) => (
|
||||
<Tag
|
||||
key={item.key}
|
||||
color={CONSIGNMENT_SPEC_TAG_COLORS[index % CONSIGNMENT_SPEC_TAG_COLORS.length]}
|
||||
title={`${item.label}:${item.value}`}
|
||||
style={{ marginInlineEnd: 0, fontSize: 11, padding: '0 6px' }}
|
||||
>
|
||||
{item.label} {item.value}
|
||||
{item.value}
|
||||
</Tag>
|
||||
))
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user