feat(shipping-notice): 调拨预检解析增强与批号列交互完善

- 异动解析跳过无异动日期的在途/执行中行,兼容 datetime 日期单元格
- ERP 网关故障降级为逐票阻断并带原因,不再炸整来源
- 预检明细唯一约束升粒度:(预检,来源,单号,料号,收料日期)
- Invoice 恢复单号锚定并移至料号前;批号 lot_no 全链贯通,
  拨出/拨入批号按 WTP→HOW 转换展示;新增收料日期列
- 预检表格筛选/全选;单行与批量重查 ERP 库存
- 收料日期范围作为预检查询范围,截止卡控不超出 D+1 规则
- 来源多选打包下载收料文件;调拨消息与子流程容器放宽宽度
- 预检恢复明细补齐收料日期与批号字段(修复卡片三列空值)
This commit is contained in:
hugo committed 2026-09-21 19:29:52 +08:00
1 parent a06ff79d7c
commit 1ba38e1685
44 files changed
+963 -121

No files matched your search

@@ -26,6 +26,8 @@ const jsonHeaders = () => ({ 'Content-Type': 'application/json', ...getAuthHeade
export interface CreatePrecheckPayload {
source_codes: string[];
business_date?: string;
receipt_date_from?: string;
receipt_date_to?: string;
}
/** 创建预检(只读) */
@@ -92,6 +94,21 @@ export const downloadTransferErpInventory = (runNo: string) =>
export const downloadTransferExceptions = (runNo: string) =>
requestBlob(`${BASE}/runs/${runNo}/exceptions.xlsx`, { headers: getAuthHeaders() });
/** 批量重查 ERP 库存(可恢复阻断行;invoice_nos 缺省 = 全部阻断行) */
export const requeryTransferItems = (precheckNo: string, invoiceNos?: string[]) =>
requestJson<{ precheck_no: string; total: number; results: Array<Record<string, unknown>> }>(
`${BASE}/prechecks/${precheckNo}/items/requery`,
{ method: 'POST', body: JSON.stringify(invoiceNos ? { invoice_nos: invoiceNos } : {}), headers: { ...getAuthHeaders(), 'Content-Type': 'application/json' } },
);
/** 按选中来源打包下载各自最新归档收料文件(zip) */
export const downloadTransferSourceFiles = (sourceCodes: string[]) =>
requestBlob(`${BASE}/sources/receipt-files`, {
method: 'POST',
headers: { ...getAuthHeaders(), 'Content-Type': 'application/json' },
body: JSON.stringify({ source_codes: sourceCodes }),
});
/** 待处理异常列表(可恢复/已关闭/结果未知 + 老化等级) */
export const listTransferBacklog = () =>
requestJson<TransferBacklogItem[]>(`${BASE}/backlog`, { headers: getAuthHeaders() });