diff --git a/client/tests/e2e/procurement-flow.spec.ts b/client/tests/e2e/procurement-flow.spec.ts index aa156213..e4777e10 100644 --- a/client/tests/e2e/procurement-flow.spec.ts +++ b/client/tests/e2e/procurement-flow.spec.ts @@ -30,6 +30,8 @@ test("E2E 采购主链路:员工提单→经理审批→财务归档", async ( const title = `Playwright 采购 ${Date.now()}`; let requestNo = ""; + page.on("response", async (r) => { const u = new URL(r.url()); if (r.request().method() === "GET" && /^\/api\/workflow\/tasks\/[0-9a-f-]{36}$/.test(u.pathname)) { try { const j = await r.json(); console.log("DIAG-CLIENT", new Date().toISOString(), u.pathname.slice(-36), r.status(), j?.data?.task?.status, j?.data?.workflowInstance?.currentStatus); } catch { console.log("DIAG-CLIENT parse-fail", u.pathname); } } }); + page.on("request", (q) => { const u = new URL(q.url()); if (/^\/api\/workflow\/tasks\//.test(u.pathname)) console.log("DIAG-REQ", new Date().toISOString(), q.method(), u.pathname.slice(-44)); }); await page.setViewportSize({ width: 1440, height: 960 }); await login(page, EMPLOYEE); await (await openNavLink(page, "采购")).click(); diff --git a/server/src/routes/workflow.js b/server/src/routes/workflow.js index 3bb49e47..5b5c715e 100644 --- a/server/src/routes/workflow.js +++ b/server/src/routes/workflow.js @@ -2306,6 +2306,7 @@ async function workflowRoutes(fastify) { }, }); + request.log.info({ diagTaskId: taskId, diagTaskStatus: task?.status ?? null, diagInstanceStatus: task?.workflow_instance?.current_status ?? null }, "DIAG task detail read"); if (!task) { const existing = await fastify.prisma.workflowTask.findUnique({ where: { id: taskId },