// 【重要】必须使用 const Component 作为组件变量名 // 运维管理 - 车辆业务 - 年审管理 · 查看(只读分组表单,打开即展示样例记录) const { useState } = React; const antd = window.antd; const { App, Button, Col, Form, Input, Modal, Row, Typography } = antd; const Image = antd.Image; const { Text, Paragraph } = Typography; const TextArea = Input.TextArea; /** 固定样例:打开页面即展示本条年审查看记录 */ const SAMPLE_VIEW_RECORD = { plateNo: '苏A88991', brand: '解放', model: 'J6P牵引车', operateStatus: '自营', expireDate: '2026-03-10', province: '江苏省', city: '南京市', executor: '张明辉', executeTime: '2026-03-08 14:20', inspectionForm: { station: '汇通检测站', cost: '320', remark: '车辆已完成上线检测,报告已归档。', }, licenseForm: { inspectionValidUntil: '2026-03-10', photos: [ { uid: 'sample-license-1', name: '行驶证正面.jpg', url: 'https://picsum.photos/seed/ar-view-license-1/240/180', }, { uid: 'sample-license-2', name: '行驶证副页.jpg', url: 'https://picsum.photos/seed/ar-view-license-2/240/180', }, ], }, m2Form: { station: '汇通检测站', cost: '180', remark: '二保已完成,机油机滤已更换。', photos: [ { uid: 'sample-m2-1', name: '二保现场1.jpg', url: 'https://picsum.photos/seed/ar-view-m2-1/240/180', }, ], }, zbForm: null, }; const formatTaskRegion = (task) => { if (!task?.province) return '—'; if (task.city) return `${task.province}-${task.city}`; return task.province; }; const formatDisplayMoney = (cost) => { if (cost === '' || cost == null) return '—'; const n = Number(cost); return Number.isFinite(n) ? `${n.toFixed(2)} 元` : `${cost} 元`; }; const getPhotoUrl = (file) => file?.url || file?.thumbUrl || ''; const hasServiceBlock = (form) => !!(form?.station || form?.cost || form?.remark || (form?.photos || []).length); const PAGE_STYLES = ` .ar-handle{min-height:100vh;background:#f2f3f5;font-family:Inter,Helvetica,PingFang SC,Microsoft YaHei,Arial,sans-serif} .ar-handle-inner{max-width:1200px;margin:0 auto;padding:16px 24px 88px} .ar-handle-top{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-bottom:12px;min-height:32px} .ar-handle-top-extra{margin-right:auto;font-size:13px;color:#4e5969} .ar-form-group{background:#fff;border:1px solid #e5e6eb;border-radius:4px;margin-bottom:16px} .ar-form-group-head{padding:14px 20px;border-bottom:1px solid #f2f3f5} .ar-form-group-title{font-size:14px;font-weight:600;color:#1d2129} .ar-form-group-body{padding:20px 20px 8px} .ar-form-group-body .ant-form-item{margin-bottom:20px} .ar-form-group-body .ant-form-item-label>label{color:#4e5969;font-size:13px} .ar-form-footer{position:fixed;left:0;right:0;bottom:0;z-index:100;background:#fff;border-top:1px solid #e5e6eb;box-shadow:0 -2px 8px rgba(0,0,0,.06)} .ar-form-footer-inner{max-width:1200px;margin:0 auto;padding:12px 24px;display:flex;justify-content:flex-end} .ar-photo-list{display:flex;flex-wrap:wrap;gap:10px} .ar-photo-slot{width:104px;height:104px;border-radius:8px;overflow:hidden;border:none;padding:0;background:#f2f3f5;cursor:pointer} .ar-photo-slot img{width:100%;height:100%;object-fit:cover;display:block} .ar-handle .ant-input[disabled],.ar-handle textarea.ant-input[disabled]{color:#1d2129!important;-webkit-text-fill-color:#1d2129!important;background:#f7f8fa!important;cursor:default!important} .ar-prd-doc{max-height:65vh;overflow-y:auto;font-size:13px;line-height:1.65;color:#4e5969} .ar-prd-highlight{background:#f0f9ff;border:1px solid #bedaff;border-radius:4px;padding:12px;margin:12px 0} `; const FormGroup = ({ title, children }) => (
{title}
{children}
); const ReadonlyInput = ({ value }) => ( ); const ReadonlyTextArea = ({ value }) => (