R7E-16E/R7E-16F 高风险操作确认统一
这个提交包含在:
@@ -25,6 +25,7 @@ import { fetchCostCenters, fetchLegalEntities } from "../api/masterData";
|
||||
import { useAuth } from "../auth/AuthContext";
|
||||
import { hasPermission } from "../auth/permissions";
|
||||
import { CardSkeleton } from "../components/common/CardSkeleton";
|
||||
import { ActionConfirmDialog } from "../components/common/ActionConfirmDialog";
|
||||
import { EmptyStateCard } from "../components/common/EmptyStateCard";
|
||||
import { PageHeader } from "../components/common/PageHeader";
|
||||
import { RiskFlagsCard } from "../components/common/RiskFlagsCard";
|
||||
@@ -201,6 +202,7 @@ export function TravelRequestsPage() {
|
||||
const [costCenterId, setCostCenterId] = useState("");
|
||||
const [estimatedAmount, setEstimatedAmount] = useState("0.00");
|
||||
const [segments, setSegments] = useState<DraftSegment[]>([emptySegment()]);
|
||||
const [submitPrecheckConfirm, setSubmitPrecheckConfirm] = useState<string | null>(null);
|
||||
|
||||
const selectedQueryId = searchParams.get("id") ?? "";
|
||||
const selectedBatchId = searchParams.get("batchId") ?? "";
|
||||
@@ -351,7 +353,8 @@ export function TravelRequestsPage() {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((precheck.decision === "warn" || precheck.decision === "manual_review") && !window.confirm(message)) {
|
||||
if (precheck.decision === "warn" || precheck.decision === "manual_review") {
|
||||
setSubmitPrecheckConfirm(message);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -510,8 +513,9 @@ export function TravelRequestsPage() {
|
||||
const totalPages = Math.max(1, Math.ceil((listQuery.data?.total ?? 0) / PAGE_SIZE));
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<PageHeader
|
||||
<>
|
||||
<div className="space-y-6">
|
||||
<PageHeader
|
||||
title="差旅管理"
|
||||
subtitle="差旅申请、对公支付轨道与批次对账在同一路径统一收口。"
|
||||
actions={
|
||||
@@ -918,7 +922,20 @@ export function TravelRequestsPage() {
|
||||
) : (
|
||||
<EmptyStateCard title="暂无可访问的差旅页签" description="当前账号缺少差旅申请与对账访问权限。" />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<ActionConfirmDialog
|
||||
open={Boolean(submitPrecheckConfirm)}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) setSubmitPrecheckConfirm(null);
|
||||
}}
|
||||
kind="precheck"
|
||||
targetName={detail?.requestNo ?? "差旅申请"}
|
||||
description={submitPrecheckConfirm}
|
||||
onConfirm={async () => {
|
||||
submitMutation.mutate();
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户