feat: add report review publish flow

This commit is contained in:
wushumin
2026-06-04 12:08:16 +08:00
parent 9dfd5976ed
commit 55c357f2c2
14 changed files with 624 additions and 52 deletions

View File

@@ -515,6 +515,9 @@ export interface AdminReportListItem {
report_entry_admin_name: string;
report_entered_at: string;
trace_info_visible: boolean;
reject_reason: string;
rejected_by_name: string;
rejected_at: string;
product_name: string;
category_name: string;
brand_name: string;
@@ -542,6 +545,9 @@ export interface AdminReportDetail {
report_entry_admin_name: string;
report_entered_at: string;
trace_info_visible: boolean;
reject_reason: string;
rejected_by_name: string;
rejected_at: string;
};
product_info: Record<string, any>;
result_info: Record<string, any>;
@@ -565,6 +571,8 @@ export interface AdminReportDetail {
report_page_url: string;
verify_count: number;
};
audit_logs: AdminReportLog[];
change_logs: AdminReportLog[];
}
export interface AdminPublishReportResponse {
@@ -575,6 +583,18 @@ export interface AdminPublishReportResponse {
report_page_url: string;
}
export interface AdminReportLog {
id: number;
action: string;
action_text: string;
operator_id: number;
operator_name: string;
before_data: Record<string, any>;
after_data: Record<string, any>;
remark: string;
created_at: string;
}
export interface AdminManualInspectionPayload {
id?: number;
report_header: {
@@ -1864,6 +1884,16 @@ export const adminApi = {
data: AdminPublishReportResponse & { material_tag?: AdminMaterialTagCode | null };
}>;
},
rejectReport(id: number, reason: string) {
return request.post("/api/admin/report/reject", {
id,
reason,
}) as Promise<{
code: number;
message: string;
data: { id: number; report_status: string; reject_reason: string };
}>;
},
updateReportTraceVisibility(id: number, visible: boolean) {
return request.post("/api/admin/report/trace-visibility", {
id,