chore(shipping-notice): 统一货代发货生命周期阶段命名并优化全链路业务逻辑
This commit is contained in:
1 parent
5ef8329bd8
commit
4ec4e57005
183 files changed
+14653
-3936
No files matched your search
@@ -315,6 +315,32 @@ export const listOrderProfileSampleXfaSyntheticPreviewPages = (documentId: numbe
|
||||
export const orderProfileSampleXfaSyntheticPreviewPagePath = (documentId: number, pageNo: number) =>
|
||||
`/api/admin/shipping-notice/order-document-profile-samples/${documentId}/xfa/preview/pages/${pageNo}`;
|
||||
|
||||
/** 入队统一 PDF 自动标记;服务端按 Profile 能力选择坐标或 XFA 多源证据。 */
|
||||
export const enqueueOrderProfilePdfAutomark = (
|
||||
profileId: number,
|
||||
payload: { document_id: number; table_id?: string; schema_version_id?: number; page_no?: number; force?: boolean },
|
||||
) => requestJson<{ job_id: number; status: string }>(
|
||||
`/api/admin/shipping-notice/order-document-profiles/${profileId}/pdf-automark`,
|
||||
{ method: 'POST', body: JSON.stringify(payload), ...jsonAuth() },
|
||||
);
|
||||
|
||||
/** 轮询统一 PDF 自动标记 Job;候选格式不暴露模板类型。 */
|
||||
export const getOrderProfilePdfAutomarkJob = (profileId: number, jobId: number) =>
|
||||
requestJson<{
|
||||
job_id: number;
|
||||
status: string;
|
||||
kind?: 'coordinate_regions' | 'visual_binding' | null;
|
||||
candidates?: Array<Record<string, unknown>>;
|
||||
diagnostics?: Record<string, unknown>;
|
||||
preview_render_checksum?: string | null;
|
||||
renderer_version?: string | null;
|
||||
error_code?: string | null;
|
||||
message?: string | null;
|
||||
}>(
|
||||
`/api/admin/shipping-notice/order-document-profiles/${profileId}/pdf-automark/jobs/${jobId}`,
|
||||
auth(),
|
||||
);
|
||||
|
||||
/** 入队 XFA OCR 自动标记 Job(须合成预览 ready)。 */
|
||||
export const enqueueOrderProfileXfaOcrAutomark = (
|
||||
profileId: number,
|
||||
@@ -645,6 +671,17 @@ export const authorizeOrderProfilePreviewPages = (profileId: number, documentId:
|
||||
},
|
||||
);
|
||||
|
||||
/** 为统一编辑画布申请一次性原 PDF 内存读取令牌;响应绝不包含存储地址。 */
|
||||
export const authorizeOrderProfilePdfPreview = (profileId: number, documentId: number) =>
|
||||
requestJson<import('../types/shipping-order-document-profile.types').OrderProfilePdfPreviewGrant>(
|
||||
`/api/admin/shipping-notice/order-document-profiles/${profileId}/pdf-preview`, {
|
||||
method: 'POST', body: JSON.stringify({ document_id: documentId }), ...jsonAuth(),
|
||||
},
|
||||
);
|
||||
|
||||
/** @deprecated 旧 XFA 调用方兼容别名;新代码使用 authorizeOrderProfilePdfPreview。 */
|
||||
export const authorizeOrderProfileXfaPdfPreview = authorizeOrderProfilePdfPreview;
|
||||
|
||||
/** 为冻结样本绑定申请只读详情页逐页预览授权,禁止回退到当前 document layout。 */
|
||||
export const authorizeOrderProfileFrozenSamplePreviewPages = (profileId: number, sampleBindingId: number) =>
|
||||
requestJson<OrderProfilePreviewPages>(
|
||||
|
||||
Reference in new issue
Block a user