|
|
@@ -718,13 +718,32 @@ export function CustomerWorkspacePage() {
|
|
|
|
|
|
<section className="ops-record-card customer-workspace-panel" id="customer-panel-materials" role="tabpanel" aria-labelledby="customer-tab-materials" hidden={tab !== "materials"}>
|
|
|
<div className="customer-panel"><h3>登记材料 · 营业执照影像</h3>
|
|
|
- {!licenseApplicable ? <p className="ops-muted">不适用(个人与个体工商户不采集证件影像)</p>
|
|
|
- : license?.status === "viewable" ? <div className="customer-file-list"><div><span className="customer-file-thumb"><FileText size={16} /></span><div><strong>{license.file_name ?? MISSING}</strong><p>可查看(签名短时效,仅本次页面有效)</p></div>
|
|
|
- <Button variant="ghost" onClick={() => window.open(license.view_url ?? "", "_blank", "noopener,noreferrer")}>查看</Button>
|
|
|
- <Button variant="ghost" onClick={() => { const a = document.createElement("a"); a.href = license.view_url ?? ""; a.download = license.file_name ?? ""; a.target = "_blank"; a.rel = "noopener noreferrer"; document.body.appendChild(a); a.click(); a.remove(); }}>下载</Button></div></div>
|
|
|
- : license?.status === "expired" ? <p className="ops-muted">已超期(影像留存期限已过,不再提供查看与下载)</p>
|
|
|
- : <div className="customer-file-list"><div><span className="customer-file-thumb"><FileText size={16} /></span><div><strong>{license ? "未登记影像" : MISSING}</strong><p>{license ? "营业执照影像未登记(选填,可在本面板补传)" : "后端未下发 license 摘要(/customer/get@v1 旧版本)"}</p></div></div></div>}
|
|
|
- {licenseApplicable && license?.status !== "expired" && <div className="ops-section-actions"><label className="customer-upload-button" title="选择后立即直传平台对象存储(字节流不经过本系统)"><Upload size={15} />{licenseBusy ? "正在上传…" : license?.status === "viewable" ? "替换影像" : "上传影像"}<input aria-label="上传营业执照影像" type="file" disabled={licenseBusy || busy} onChange={(event) => { const file = event.target.files?.[0] ?? null; event.target.value = ""; void replaceLicense(file); }} /></label><span className="ops-muted">格式与大小上限随平台桶策略;重新上传不重置留存期限(起算点=建档日)。</span></div>}
|
|
|
+ <div className="customer-license-row">
|
|
|
+ {!licenseApplicable ? <p className="ops-muted">不适用(个人与个体工商户不采集证件影像)</p>
|
|
|
+ : license?.status === "viewable" ? <div className="customer-file-list"><div><span className="customer-file-thumb"><FileText size={16} /></span><div><strong>{license.file_name ?? MISSING}</strong><p>可查看(签名短时效,仅本次页面有效)</p></div>
|
|
|
+ <Button variant="ghost" onClick={() => window.open(license.view_url ?? "", "_blank", "noopener,noreferrer")}>查看</Button>
|
|
|
+ <Button variant="ghost" onClick={() => { const a = document.createElement("a"); a.href = license.view_url ?? ""; a.download = license.file_name ?? ""; a.target = "_blank"; a.rel = "noopener noreferrer"; document.body.appendChild(a); a.click(); a.remove(); }}>下载</Button></div></div>
|
|
|
+ : license?.status === "expired" ? <p className="ops-muted">已超期(影像留存期限已过,不再提供查看与下载)</p>
|
|
|
+ : <div className="customer-file-list"><div><span className="customer-file-thumb"><FileText size={16} /></span><div><strong>{license ? "未登记影像" : MISSING}</strong><p>{license ? "营业执照影像未登记(选填,可在本面板补传)" : "后端未下发 license 摘要(/customer/get@v1 旧版本)"}</p></div></div></div>}
|
|
|
+ {licenseApplicable && license?.status !== "expired" && <div className="customer-license-upload">
|
|
|
+ <label className="customer-upload-button" title="选择后立即直传平台对象存储(字节流不经过本系统)">
|
|
|
+ <Upload size={15} aria-hidden="true" />
|
|
|
+ {licenseBusy ? "正在上传…" : license?.status === "viewable" ? "替换影像" : "上传影像"}
|
|
|
+ <input
|
|
|
+ aria-label="上传营业执照影像"
|
|
|
+ aria-describedby="customer-license-upload-note"
|
|
|
+ type="file"
|
|
|
+ disabled={licenseBusy || busy}
|
|
|
+ onChange={(event) => {
|
|
|
+ const file = event.target.files?.[0] ?? null;
|
|
|
+ event.target.value = "";
|
|
|
+ void replaceLicense(file);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </label>
|
|
|
+ <small id="customer-license-upload-note">格式与大小上限随平台桶策略;重新上传不重置留存期限(起算点=建档日)。</small>
|
|
|
+ </div>}
|
|
|
+ </div>
|
|
|
{licenseError && <p className="ops-form-error" role="alert">{licenseError}</p>}
|
|
|
</div>
|
|
|
<div className="customer-panel"><h3>合同文档</h3>{contractFiles.length ? <div className="customer-file-list">{contractFiles.map((document) => <div key={`${document.contractNo}-${document.name}`}><span className="customer-file-thumb"><FileText size={16} /></span><div><strong>{document.name}</strong><p>{document.contractNo}</p></div><Button variant="ghost" onClick={() => navigate(`/contracts/${encodeURIComponent(document.contractNo)}?download=${encodeURIComponent(document.name)}`, { state: outgoingState })}>预览</Button></div>)}</div> : <p className="ops-muted">暂无文档,合同文档随合同登记上传。</p>}</div>
|