fix(worker-platform): 接单平台工单详情抽屉完整展示寄售手动匹配与指派订单的卖家资料
1. 修复管理后台「接单平台 -> 接单工单」抽屉中,手动匹配或指派寄售库存履约的工单因 booster_material_json 为空导致卖家资料全部显示 '-' 的问题; 2. 后端在履约及指派时将卖家角色昵称、数字ID、联系方式、手机号、备注及上架凭证截图完整写入工单 material.consignment; 3. 后端工单查询及展示映射层增加自动回退与批量库存补充解析机制,确保历史与新增的寄售工单均能准确解析出卖家角色名、ID、区服、系统与截图; 4. 前端工单抽屉卡片优化寄售订单的资料展示与阶段标签,清晰展示卖家角色名、游戏ID、联系方式(微信/QQ/手机)、提报/仓库单号及上架截图。
This commit is contained in:
@@ -333,6 +333,27 @@ export async function getConsignmentInventoryById(
|
||||
return res.rows[0] || null
|
||||
}
|
||||
|
||||
export async function listConsignmentInventoriesByIds(
|
||||
ids: Array<number | string>,
|
||||
): Promise<ConsignmentInventoryRow[]> {
|
||||
const numericIds = [...new Set(ids.map(Number).filter((n) => Number.isFinite(n) && n > 0))]
|
||||
if (numericIds.length === 0) return []
|
||||
|
||||
const sql = `
|
||||
SELECT
|
||||
ci.*,
|
||||
wc.name AS category_name,
|
||||
cs.submission_no AS source_submission_no,
|
||||
cs.screenshots_json AS submission_screenshots_json
|
||||
FROM consignment_inventories ci
|
||||
LEFT JOIN work_categories wc ON wc.id = ci.category_id
|
||||
LEFT JOIN consignment_submissions cs ON cs.id = ci.source_submission_id
|
||||
WHERE ci.id = ANY($1::bigint[])
|
||||
`
|
||||
const res = await query<ConsignmentInventoryRow>(sql, [numericIds])
|
||||
return res.rows
|
||||
}
|
||||
|
||||
export async function updateConsignmentInventory(
|
||||
id: number | string,
|
||||
input: {
|
||||
|
||||
@@ -25,3 +25,4 @@ export * from './worker-cancel-request-repo.js'
|
||||
export * from './after-sales-repo.js'
|
||||
export * from './product-match-repo.js'
|
||||
export * from './sms-code-repo.js'
|
||||
export * from './consignment-repo.js'
|
||||
|
||||
Reference in New Issue
Block a user