fix(worker-platform): 修复寄售匹配工单详情中卖家上架截图丢失问题,并收敛手动匹配为内部现货直接履约
1. 修复文件归一化器 normalizeUploadedFiles 遇到纯字符串 URL 数组被误过滤为空的问题,自动提取 objectKey 并构造规范 UploadedFile 结构; 2. 优化工单展示映射器 resolveWorkOrderEffectiveBoosterMaterial:当工单资料中截图为空时,自动回退并加载寄售卖家上架/主页截图; 3. 前端管理后台详情抽屉与打手端详情抽屉支持读取 detailOrder.gift.boosterMaterial.screenshots 与 consignmentInfo.screenshots 降级兜底渲染; 4. 手动匹配弹窗与发布拦截弹窗全面收敛为单一标准的【内部现货直接履约】,废除旧版指派打手带来的重复扣押金与二次填资料问题; 5. 新增 consignment-booster-material 单元测试,更新寄卖库存优化现状与进度追踪文档,前后端全套测试通过。
This commit is contained in:
@@ -808,6 +808,7 @@ export default function WorkOrdersPanel() {
|
||||
consignmentNo: string
|
||||
workerName?: string
|
||||
depositFen?: number | null
|
||||
costPriceFen?: number | null
|
||||
onOk: () => void
|
||||
}) {
|
||||
const isPartial = input.matchType !== 'exact'
|
||||
@@ -2413,6 +2414,14 @@ export default function WorkOrdersPanel() {
|
||||
files={detailOrder.gift.boosterMaterial.screenshots}
|
||||
size={72}
|
||||
/>
|
||||
) : Array.isArray(consignmentInfo?.screenshots) &&
|
||||
consignmentInfo.screenshots.length > 0 ? (
|
||||
<ImagePreviewList
|
||||
imageUrls={(consignmentInfo.screenshots as string[]).filter(
|
||||
(item) => typeof item === 'string' && item.trim(),
|
||||
)}
|
||||
size={72}
|
||||
/>
|
||||
) : (
|
||||
<Typography.Text type="secondary">未提交</Typography.Text>
|
||||
)}
|
||||
@@ -3429,49 +3438,36 @@ export default function WorkOrdersPanel() {
|
||||
backgroundColor: '#fff',
|
||||
}}
|
||||
>
|
||||
{inv.workerId ? (
|
||||
<>
|
||||
<Button
|
||||
block
|
||||
type="primary"
|
||||
icon={<TeamOutlined />}
|
||||
style={{ backgroundColor: '#722ed1', borderColor: '#722ed1' }}
|
||||
loading={consignmentInterceptModal.submitting}
|
||||
onClick={() =>
|
||||
confirmConsignmentMatchAction({
|
||||
kind: 'assign_worker',
|
||||
matchType: m.matchType,
|
||||
consignmentNo: inv.sourceSubmissionNo || '客服手工入库',
|
||||
workerName: inv.workerName,
|
||||
depositFen: inv.depositAmountFen,
|
||||
onOk: () => {
|
||||
void handleAssignWithConsignmentWorker(
|
||||
inv.id,
|
||||
inv.workerId!,
|
||||
!isExact,
|
||||
)
|
||||
},
|
||||
})
|
||||
}
|
||||
>
|
||||
走接单平台指派打手
|
||||
</Button>
|
||||
<div
|
||||
style={{
|
||||
fontSize: 11,
|
||||
color: '#8c8c8c',
|
||||
marginTop: 6,
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
指派供货打手履约 · 自动冻结履约押金
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<div style={{ fontSize: 12, color: '#cf1322', textAlign: 'center' }}>
|
||||
该现货未关联供货打手,无法走平台指派;请先关联打手
|
||||
</div>
|
||||
)}
|
||||
<Button
|
||||
block
|
||||
type="primary"
|
||||
icon={<PushpinOutlined />}
|
||||
style={{ backgroundColor: '#52c41a', borderColor: '#52c41a' }}
|
||||
loading={consignmentInterceptModal.submitting}
|
||||
onClick={() =>
|
||||
confirmConsignmentMatchAction({
|
||||
kind: 'internal_stock',
|
||||
matchType: m.matchType,
|
||||
consignmentNo: inv.sourceSubmissionNo || '客服手工入库',
|
||||
costPriceFen: inv.costPriceFen,
|
||||
onOk: () => {
|
||||
void handleFulfillWithConsignment(inv.id, !isExact)
|
||||
},
|
||||
})
|
||||
}
|
||||
>
|
||||
内部现货直接履约
|
||||
</Button>
|
||||
<div
|
||||
style={{
|
||||
fontSize: 11,
|
||||
color: '#8c8c8c',
|
||||
marginTop: 6,
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
免外派佣金 · 不扣打手押金 · 自动进冷静期
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user