修复 R7E 真机反馈回流与移动入口 WF8-11A R7E-16A R7E-16B BIZ8-12A

这个提交包含在:
2026-05-14 21:53:20 +08:00
父节点 45900e0673
当前提交 5491e922e6
共修改 26 个文件,包含 281 行新增和 56 行删除
@@ -45,6 +45,7 @@ import {
} from "../components/ui/dialog";
import { Input } from "../components/ui/input";
import { Textarea } from "../components/ui/textarea";
import { PDF_FILE_ACCEPT, rejectedPdfMessage, splitPdfFiles } from "../lib/pdfFiles";
import { buildPrecheckDialogMessage } from "../lib/precheck";
import {
formatInvoiceDisplayTitle,
@@ -224,6 +225,16 @@ export function MobileReimbursementDetailPage() {
const canManageAttachments = Boolean(canEdit && (isParticipant || canViewAllExpense));
const selectedInvoiceEntries = Object.entries(selectedInvoices);
function handleInvoicePdfSelection(files: FileList | null) {
const { accepted, rejected } = splitPdfFiles(files);
setSelectedInvoiceFiles(accepted);
const message = rejectedPdfMessage(rejected);
setInvoiceActionError(message);
if (message) {
toast.warning(message);
}
}
const bindableInvoicesQuery = useQuery({
enabled: Boolean(reimbursementId && isInvoiceDialogOpen && canOpenInvoiceDialog),
queryKey: ["invoice-pool", "bindable", reimbursementId, invoiceSearch],
@@ -1266,9 +1277,12 @@ export function MobileReimbursementDetailPage() {
className="sr-only"
data-testid={TEST_IDS.reimbursement.invoiceUploadFile}
type="file"
accept="application/pdf"
accept={PDF_FILE_ACCEPT}
multiple
onChange={(event) => setSelectedInvoiceFiles(Array.from(event.target.files ?? []))}
onChange={(event) => {
handleInvoicePdfSelection(event.target.files);
event.target.value = "";
}}
/>
{selectedInvoiceFiles.length ? (