恢复付款入口与常开基线(08-01-reimbursement-notification-progress-clarity)
这个提交包含在:
@@ -65,7 +65,7 @@ export function resolveMobileNotificationTargetLink(item: NotificationTarget) {
|
||||
}
|
||||
|
||||
if (item.targetType === "payment_batch") {
|
||||
return `/payment-batches?id=${encodeSegment(item.targetId)}`;
|
||||
return `/mobile/payment-batches?id=${encodeSegment(item.targetId)}`;
|
||||
}
|
||||
|
||||
if (item.targetType === "leave_request") {
|
||||
|
||||
@@ -118,7 +118,6 @@ export function resolveMobileEquivalentPath(pathname: string, search = "") {
|
||||
normalizedPath.startsWith("/projects") ||
|
||||
normalizedPath.startsWith("/contracts-registry") ||
|
||||
normalizedPath.startsWith("/travel-requests") ||
|
||||
normalizedPath.startsWith("/payment-batches") ||
|
||||
normalizedPath.startsWith("/ap-operations") ||
|
||||
normalizedPath.startsWith("/weekly-reports") ||
|
||||
normalizedPath.startsWith("/todos") ||
|
||||
@@ -130,6 +129,10 @@ export function resolveMobileEquivalentPath(pathname: string, search = "") {
|
||||
return "/mobile";
|
||||
}
|
||||
|
||||
if (normalizedPath === "/payment-batches") {
|
||||
return `/mobile/payment-batches${search}`;
|
||||
}
|
||||
|
||||
if (normalizedPath === "/purchase-requests") {
|
||||
const purchaseRequestId = searchParams.get("highlight") ?? searchParams.get("id") ?? searchParams.get("requestId");
|
||||
if (purchaseRequestId) {
|
||||
|
||||
@@ -184,7 +184,10 @@ export function MobilePortalPage() {
|
||||
const paymentBatchEnabled = Boolean(financeSummary?.paymentBatchEnabled);
|
||||
const financePendingCount = financeSummary?.pendingBatchCount ?? 0;
|
||||
const financeExceptionCount = (financeSummary?.failedItemCount ?? 0) + (financeSummary?.riskCount ?? 0);
|
||||
const shouldShowFinanceCard = canUseFinance && !portalHomeQuery.isLoading && !portalHomeQuery.isError && (financePendingCount > 0 || financeExceptionCount > 0);
|
||||
const shouldShowFinanceCard = canUseFinance &&
|
||||
!portalHomeQuery.isLoading &&
|
||||
!portalHomeQuery.isError &&
|
||||
(paymentBatchEnabled || financePendingCount > 0 || financeExceptionCount > 0);
|
||||
const financeCardBadge = paymentBatchEnabled ? "复核与付款" : financePendingCount > 0 ? "待付款" : "异常与复核";
|
||||
|
||||
async function openHomeNotification(item: NotificationItem) {
|
||||
@@ -326,9 +329,14 @@ export function MobilePortalPage() {
|
||||
</div>
|
||||
<div className="rounded-lg bg-zinc-50 px-3 py-2">
|
||||
<div className="text-xs text-zinc-500">处理</div>
|
||||
<div className="mt-1 text-xl font-semibold text-zinc-900">电脑端</div>
|
||||
<div className="mt-1 text-xl font-semibold text-zinc-900">OA</div>
|
||||
</div>
|
||||
</div>
|
||||
{paymentBatchEnabled ? (
|
||||
<Button asChild className="mt-3 w-full" size="sm" type="button" variant="secondary">
|
||||
<Link to="/mobile/payment-batches">进入付款</Link>
|
||||
</Button>
|
||||
) : null}
|
||||
</section>
|
||||
) : null}
|
||||
|
||||
|
||||
@@ -352,6 +352,15 @@ const routeElements = (
|
||||
|
||||
<Route path="mobile/notifications" element={withRouteFallback(<MobileNotificationsPage />)} />
|
||||
|
||||
<Route
|
||||
path="mobile/payment-batches"
|
||||
element={
|
||||
<RequirePermission anyOf={["payment.batch.manage", "risk.review.manage", "payment.batch.review"]}>
|
||||
{withRouteFallback(<PaymentBatchesPage />)}
|
||||
</RequirePermission>
|
||||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="mobile/wecom-approval-archive"
|
||||
element={
|
||||
|
||||
在新工单中引用
屏蔽一个用户