V1-V6 收口移动视口与 PDF 发票上传
这个提交包含在:
@@ -174,7 +174,7 @@ export function MobileCapturePage() {
|
||||
<PageScaffold className="space-y-4">
|
||||
<PageHeader
|
||||
title="票据上传"
|
||||
subtitle="拍照或选择文件。"
|
||||
subtitle="上传 PDF 发票文件。"
|
||||
/>
|
||||
|
||||
{error ? (
|
||||
@@ -189,7 +189,7 @@ export function MobileCapturePage() {
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div>
|
||||
<h3 className="text-base font-semibold text-zinc-900">选择票据</h3>
|
||||
<p className="mt-1 text-sm leading-5 text-zinc-500">图片或 PDF。</p>
|
||||
<p className="mt-1 text-sm leading-5 text-zinc-500">仅支持 PDF 发票。</p>
|
||||
</div>
|
||||
<span className={isOnline ? "shrink-0 text-sm text-emerald-600" : "shrink-0 text-sm text-orange-600"}>
|
||||
{isOnline ? "在线" : "离线"}
|
||||
@@ -197,58 +197,14 @@ export function MobileCapturePage() {
|
||||
</div>
|
||||
|
||||
<div className="grid gap-2" data-testid="mobile-capture-file">
|
||||
<label
|
||||
htmlFor="mobile-capture-camera-file"
|
||||
className="flex min-h-16 cursor-pointer items-center gap-3 rounded-xl border border-zinc-200 bg-white px-4 py-3 text-left shadow-sm transition-colors hover:bg-zinc-50"
|
||||
>
|
||||
<span className="material-symbols-outlined flex size-10 shrink-0 items-center justify-center rounded-lg bg-blue-50 text-[22px] text-blue-700">photo_camera</span>
|
||||
<span className="min-w-0">
|
||||
<span className="block text-sm font-semibold text-zinc-900">拍照上传</span>
|
||||
<span className="mt-0.5 block text-xs leading-5 text-zinc-500">打开摄像头拍摄发票</span>
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
id="mobile-capture-camera-file"
|
||||
accept="image/*"
|
||||
capture="environment"
|
||||
className="sr-only"
|
||||
data-testid="mobile-capture-camera-file"
|
||||
onChange={(event) => {
|
||||
setSelectedFiles(Array.from(event.target.files ?? []));
|
||||
}}
|
||||
type="file"
|
||||
/>
|
||||
|
||||
<label
|
||||
htmlFor="mobile-capture-image-file"
|
||||
className="flex min-h-16 cursor-pointer items-center gap-3 rounded-xl border border-zinc-200 bg-white px-4 py-3 text-left shadow-sm transition-colors hover:bg-zinc-50"
|
||||
>
|
||||
<span className="material-symbols-outlined flex size-10 shrink-0 items-center justify-center rounded-lg bg-cyan-50 text-[22px] text-cyan-700">image</span>
|
||||
<span className="min-w-0">
|
||||
<span className="block text-sm font-semibold text-zinc-900">选择图片</span>
|
||||
<span className="mt-0.5 block text-xs leading-5 text-zinc-500">JPG、PNG、WEBP</span>
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
id="mobile-capture-image-file"
|
||||
accept="image/jpeg,image/png,image/webp"
|
||||
className="sr-only"
|
||||
data-testid="mobile-capture-image-file"
|
||||
multiple
|
||||
onChange={(event) => {
|
||||
setSelectedFiles(Array.from(event.target.files ?? []));
|
||||
}}
|
||||
type="file"
|
||||
/>
|
||||
|
||||
<label
|
||||
htmlFor="mobile-capture-pdf-file"
|
||||
className="flex min-h-16 cursor-pointer items-center gap-3 rounded-xl border border-zinc-200 bg-white px-4 py-3 text-left shadow-sm transition-colors hover:bg-zinc-50"
|
||||
>
|
||||
<span className="material-symbols-outlined flex size-10 shrink-0 items-center justify-center rounded-lg bg-emerald-50 text-[22px] text-emerald-700">picture_as_pdf</span>
|
||||
<span className="min-w-0">
|
||||
<span className="block text-sm font-semibold text-zinc-900">选择 PDF</span>
|
||||
<span className="mt-0.5 block text-xs leading-5 text-zinc-500">数电票和扫描件 PDF</span>
|
||||
<span className="block text-sm font-semibold text-zinc-900">选择 PDF 发票</span>
|
||||
<span className="mt-0.5 block text-xs leading-5 text-zinc-500">数电票或扫描件 PDF</span>
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
|
||||
在新工单中引用
屏蔽一个用户