|
|
@@ -719,47 +719,45 @@ 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 customer-license-panel">
|
|
|
<h3>登记材料 · 营业执照影像</h3>
|
|
|
- <div className="customer-license-row">
|
|
|
- <div className="customer-license-document">
|
|
|
- <span className="customer-file-thumb" aria-hidden="true"><FileText size={20} /></span>
|
|
|
- <div className="customer-license-description">
|
|
|
- {!licenseApplicable ? <>
|
|
|
- <strong>不适用</strong>
|
|
|
- <p>个人和个体工商户无需登记营业执照影像。</p>
|
|
|
- </> : license?.status === "viewable" ? <>
|
|
|
- <div className="customer-license-filename"><strong>{license.file_name ?? "营业执照影像"}</strong><OpsStatus tone="success">已登记</OpsStatus></div>
|
|
|
- <p>{license.view_url ? "查看链接短期有效,失效后请刷新页面。" : "查看链接暂不可用,请刷新页面。"}</p>
|
|
|
- {license.view_url && <div className="customer-license-links">
|
|
|
- <a href={license.view_url} target="_blank" rel="noopener noreferrer">查看影像</a>
|
|
|
- <a href={license.view_url} download={license.file_name ?? ""} target="_blank" rel="noopener noreferrer">下载</a>
|
|
|
- </div>}
|
|
|
- </> : license?.status === "expired" ? <>
|
|
|
- <strong>已超期</strong>
|
|
|
- <p>影像留存期已满,无法查看或下载。</p>
|
|
|
- </> : <>
|
|
|
- <strong>{license ? "未登记影像" : MISSING}</strong>
|
|
|
- <p>{license ? "营业执照影像为选填材料,可在此补传。" : "暂未获取影像登记状态。"}</p>
|
|
|
- </>}
|
|
|
- </div>
|
|
|
+ <div className="customer-license-document">
|
|
|
+ <span className="customer-file-thumb" aria-hidden="true"><FileText size={20} /></span>
|
|
|
+ <div className="customer-license-description">
|
|
|
+ {!licenseApplicable ? <>
|
|
|
+ <strong>不适用</strong>
|
|
|
+ <p>个人和个体工商户无需登记营业执照影像。</p>
|
|
|
+ </> : license?.status === "viewable" ? <>
|
|
|
+ <div className="customer-license-filename"><strong>{license.file_name ?? "营业执照影像"}</strong><OpsStatus tone="success">已登记</OpsStatus></div>
|
|
|
+ <p>{license.view_url ? "查看链接短期有效,失效后请刷新页面。" : "查看链接暂不可用,请刷新页面。"}</p>
|
|
|
+ {license.view_url && <div className="customer-license-links">
|
|
|
+ <a href={license.view_url} target="_blank" rel="noopener noreferrer">查看影像</a>
|
|
|
+ <a href={license.view_url} download={license.file_name ?? ""} target="_blank" rel="noopener noreferrer">下载</a>
|
|
|
+ </div>}
|
|
|
+ </> : license?.status === "expired" ? <>
|
|
|
+ <strong>已超期</strong>
|
|
|
+ <p>影像留存期已满,无法查看或下载。</p>
|
|
|
+ </> : <>
|
|
|
+ <strong>{license ? "未登记影像" : MISSING}</strong>
|
|
|
+ <p>{license ? "营业执照影像为选填材料,可在此补传。" : "暂未获取影像登记状态。"}</p>
|
|
|
+ </>}
|
|
|
+ {licenseApplicable && license?.status !== "expired" && <div className="customer-license-upload">
|
|
|
+ <label className="customer-upload-button customer-license-button">
|
|
|
+ <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>
|
|
|
- {licenseApplicable && license?.status !== "expired" && <div className="customer-license-upload">
|
|
|
- <label className="customer-upload-button customer-license-button">
|
|
|
- <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>
|