diff --git a/web端/车辆管理-查看.jsx b/web端/车辆管理-查看.jsx index a97cd6b..893fde3 100644 --- a/web端/车辆管理-查看.jsx +++ b/web端/车辆管理-查看.jsx @@ -80,24 +80,25 @@ const Component = function () { function certPhotoPlaceholder(captionText) { return 'data:image/svg+xml,' + encodeURIComponent('' + String(captionText || '') + ''); } + /** 证照管理 Tab mock:字段与录入页设计稿一致(本页仅查看) */ var certificateDetail = { drivingLicense: { img: licensePhotoPlaceholder, regDate: '2025-07-01', scrapDate: '2038-12-31', inspectExpire: '2027-07-31' }, - operationPermit: { img: licensePhotoPlaceholder, permitNo: '营330482001234', regDate: '2025-07-15', inspectExpire: '2026-07-14', certExpire: '2030-07-14' }, - passPermit: { img: licensePhotoPlaceholder, code: 'TX-ZJ-2025-0088', area: '浙江省嘉兴市平湖市行政辖区', expire: '2026-12-31' }, + operationPermit: { img: licensePhotoPlaceholder, permitNo: '营330482001234', regDate: '2025-07-15', inspectExpire: '2026-07-14' }, + passPermit: { img: licensePhotoPlaceholder, code: 'TX-ZJ-2025-0088', area: '浙江省嘉兴市平湖市行政辖区' }, registrationCert: { img: licensePhotoPlaceholder }, h2Permit: { photos: [ { label: '特种设备使用登记证', src: certPhotoPlaceholder('特种设备使用登记证') }, { label: '特种设备使用标志', src: certPhotoPlaceholder('特种设备使用标志') } ], - permitCode: 'JQZ-2025-F069001', - cardCode: 'JK-88A901256', - inspectDate: '2025-06-15' + cylinderVendor: '某某高压气瓶制造有限公司', + cylinderInspectDate: '2025-04-01', + cylinderCycleMonth: '36', + cylinderValidUntil: '2028-03-31' }, h2Card: { img: licensePhotoPlaceholder, stationName: '嘉兴港区某某加氢站' }, - safetyValve: { img: licensePhotoPlaceholder, inspectDate: '2025-05-10', cycle: '12个月', validUntil: '2026-05-09' }, - pressureGauge: { img: licensePhotoPlaceholder, inspectDate: '2025-05-10', cycle: '12个月', gaugeValidUntil: '2026-05-09' }, - h2Cylinder: { img: licensePhotoPlaceholder, vendor: '某某高压气瓶制造有限公司', inspectDate: '2025-04-01', cycle: '36个月', cylinderValidUntil: '2028-03-31' } + safetyValve: { img: licensePhotoPlaceholder, inspectDate: '2025-05-10', cycleMonth: '12', validUntil: '2026-05-09' }, + pressureGauge: { img: licensePhotoPlaceholder, inspectDate: '2025-05-10', cycleMonth: '12', valveInspectValidUntil: '2026-05-09' } }; var maintenanceList = [ @@ -545,7 +546,9 @@ const Component = function () { React.createElement('span', { style: { color: 'rgba(0,0,0,0.85)' } }, show ? value : '—') ); } - function CertSectionCard(title, imageSrc, fieldNodes) { + /** photoCaption:左侧附图说明,与设计稿上「行驶证」「营运证」等一致 */ + function CertSectionCard(title, imageSrc, fieldNodes, photoCaption) { + var cap = photoCaption != null && String(photoCaption).trim() !== '' ? String(photoCaption) : '证件照片'; var right = fieldNodes && fieldNodes.length ? React.createElement('div', { style: { @@ -560,7 +563,7 @@ const Component = function () { return React.createElement(Card, { key: title, size: 'small', style: { marginBottom: 16 }, title: title }, React.createElement('div', { style: { display: 'flex', gap: 24, flexWrap: 'wrap', alignItems: 'stretch' } }, React.createElement('div', { style: { flexShrink: 0, display: 'flex', flexDirection: 'column' } }, - React.createElement('div', { style: { marginBottom: 8, color: 'rgba(0,0,0,0.45)', fontSize: 13 } }, '证件照片'), + React.createElement('div', { style: { marginBottom: 8, color: 'rgba(0,0,0,0.45)', fontSize: 13 } }, cap), React.createElement(Image, { width: 168, height: 112, @@ -611,49 +614,47 @@ const Component = function () { ); } + function fmtCycleMonth(m) { + var s = m == null ? '' : String(m).trim(); + return s ? s + ' 月' : '—'; + } + var cd = certificateDetail; var licenseManagementTabContent = React.createElement('div', { style: { padding: '0 4px' } }, - CertSectionCard('行驶证', cd.drivingLicense.img, [ + CertSectionCard('行驶证信息', cd.drivingLicense.img, [ CertFieldRow('注册日期', cd.drivingLicense.regDate), CertFieldRow('强制报废日期', cd.drivingLicense.scrapDate), - CertFieldRow('审验有效期', cd.drivingLicense.inspectExpire) - ]), - CertSectionCard('营运证', cd.operationPermit.img, [ + CertFieldRow('行驶证审验有效期', cd.drivingLicense.inspectExpire) + ], '行驶证'), + CertSectionCard('营运证信息', cd.operationPermit.img, [ CertFieldRow('营运证编号', cd.operationPermit.permitNo), CertFieldRow('注册日期', cd.operationPermit.regDate), - CertFieldRow('审验有效期', cd.operationPermit.inspectExpire), - CertFieldRow('证件有效期', cd.operationPermit.certExpire) - ]), - CertSectionCard('通行证', cd.passPermit.img, [ + CertFieldRow('审验有效期', cd.operationPermit.inspectExpire) + ], '营运证'), + CertSectionCard('通行证信息', cd.passPermit.img, [ CertFieldRow('通行证编码', cd.passPermit.code), - CertFieldRow('通行区域', cd.passPermit.area), - CertFieldRow('有效期', cd.passPermit.expire) + CertFieldRow('通行区域', cd.passPermit.area) + ], '通行证'), + CertSectionCard('登记证信息', cd.registrationCert.img, null, '登记证'), + CertSectionCardMulti('加氢证信息', cd.h2Permit.photos, [ + CertFieldRow('氢气瓶厂家', cd.h2Permit.cylinderVendor), + CertFieldRow('氢气瓶检验日期', cd.h2Permit.cylinderInspectDate), + CertFieldRow('氢气瓶检验周期', fmtCycleMonth(cd.h2Permit.cylinderCycleMonth)), + CertFieldRow('氢气瓶检测有效期', cd.h2Permit.cylinderValidUntil) ]), - CertSectionCard('登记证', cd.registrationCert.img, null), - CertSectionCardMulti('加氢证', cd.h2Permit.photos, [ - CertFieldRow('加氢证编码', cd.h2Permit.permitCode), - CertFieldRow('加氢卡编码', cd.h2Permit.cardCode), - CertFieldRow('检验日期', cd.h2Permit.inspectDate) - ]), - CertSectionCard('加氢卡', cd.h2Card.img, [ + CertSectionCard('加氢卡信息', cd.h2Card.img, [ CertFieldRow('加氢卡对应加氢站', cd.h2Card.stationName) - ]), - CertSectionCard('安全阀', cd.safetyValve.img, [ + ], '加氢卡'), + CertSectionCard('安全阀信息', cd.safetyValve.img, [ CertFieldRow('检验日期', cd.safetyValve.inspectDate), - CertFieldRow('检验周期', cd.safetyValve.cycle), + CertFieldRow('检验周期', fmtCycleMonth(cd.safetyValve.cycleMonth)), CertFieldRow('安全阀检测有效期', cd.safetyValve.validUntil) - ]), - CertSectionCard('压力表', cd.pressureGauge.img, [ + ], '安全阀'), + CertSectionCard('压力表信息', cd.pressureGauge.img, [ CertFieldRow('检验日期', cd.pressureGauge.inspectDate), - CertFieldRow('检验周期', cd.pressureGauge.cycle), - CertFieldRow('压力表检测有效期', cd.pressureGauge.gaugeValidUntil) - ]), - CertSectionCard('氢气瓶', cd.h2Cylinder.img, [ - CertFieldRow('气瓶厂家', cd.h2Cylinder.vendor), - CertFieldRow('检验日期', cd.h2Cylinder.inspectDate), - CertFieldRow('检验周期', cd.h2Cylinder.cycle), - CertFieldRow('氢瓶检测有效期', cd.h2Cylinder.cylinderValidUntil) - ]) + CertFieldRow('检验周期', fmtCycleMonth(cd.pressureGauge.cycleMonth)), + CertFieldRow('压力阀检测有效期', cd.pressureGauge.valveInspectValidUntil) + ], '压力表') ); var tabItems = [