feat(web): 同步 web 端目录更新至 Gitea
包含加氢站站点信息、运维交车/故障、台账与数据分析等页面新增与改动。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
485
web端/车辆管理-查看.jsx
485
web端/车辆管理-查看.jsx
@@ -10,6 +10,8 @@ const Component = function () {
|
||||
var Tabs = antd.Tabs;
|
||||
var Table = antd.Table;
|
||||
var Tag = antd.Tag;
|
||||
var Badge = antd.Badge;
|
||||
var Alert = antd.Alert;
|
||||
var Button = antd.Button;
|
||||
var Tooltip = antd.Tooltip;
|
||||
var Select = antd.Select;
|
||||
@@ -75,31 +77,59 @@ const Component = function () {
|
||||
stackVendor: 'XXXXXXXX企业'
|
||||
};
|
||||
|
||||
// 证照管理 Tab:证件照片占位(可替换为真实 URL,支持 Image 预览)
|
||||
var licensePhotoPlaceholder = 'data:image/svg+xml,' + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="336" height="224"><rect fill="#f5f5f5" width="100%" height="100%"/><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" fill="#8c8c8c" font-size="14" font-family="system-ui,sans-serif">行驶证/证照示意图</text></svg>');
|
||||
function certPhotoPlaceholder(captionText) {
|
||||
return 'data:image/svg+xml,' + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="336" height="224"><rect fill="#f5f5f5" width="100%" height="100%"/><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" fill="#8c8c8c" font-size="13" font-family="system-ui,sans-serif">' + String(captionText || '') + '</text></svg>');
|
||||
}
|
||||
/** 证照管理 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' },
|
||||
passPermit: { img: licensePhotoPlaceholder, code: 'TX-ZJ-2025-0088', area: '浙江省嘉兴市平湖市行政辖区' },
|
||||
registrationCert: { img: licensePhotoPlaceholder },
|
||||
h2Permit: {
|
||||
photos: [
|
||||
{ label: '特种设备使用登记证', src: certPhotoPlaceholder('特种设备使用登记证') },
|
||||
{ label: '特种设备使用标志', src: certPhotoPlaceholder('特种设备使用标志') }
|
||||
],
|
||||
cylinderVendor: '某某高压气瓶制造有限公司',
|
||||
cylinderInspectDate: '2025-04-01',
|
||||
cylinderCycleMonth: '36',
|
||||
cylinderValidUntil: '2028-03-31'
|
||||
/** 证照管理 Tab:八类证照只读展示(字段口径对齐「证照管理-编辑」) */
|
||||
var LICENSE_VIEW_ANCHOR_DATE = '2026-06-01';
|
||||
var licensePhotoPlaceholder = 'data:image/svg+xml,' + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="336" height="224"><rect fill="#f5f5f5" width="100%" height="100%"/><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" fill="#8c8c8c" font-size="14" font-family="system-ui,sans-serif">暂无影像</text></svg>');
|
||||
var licenseViewBundle = {
|
||||
driverLicense: {
|
||||
photos: ['https://picsum.photos/seed/vd-zjf-lic/600/400', 'https://picsum.photos/seed/vd-zjf-lic2/600/400'],
|
||||
regDate: '2025-07-01',
|
||||
issueDate: '2025-07-01',
|
||||
scrapDate: '2038-12-31',
|
||||
expireDate: '2027-07-31',
|
||||
shNextEvaluation: ''
|
||||
},
|
||||
h2Card: { img: licensePhotoPlaceholder, stationName: '嘉兴港区某某加氢站' },
|
||||
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' }
|
||||
transportLicense: {
|
||||
photos: ['https://picsum.photos/seed/vd-zjf-trans/600/400'],
|
||||
licenseNo: '浙字330482001234号',
|
||||
issueDate: '2025-07-15',
|
||||
expireDate: '2026-07-14',
|
||||
inspectValidUntil: '2026-07-20'
|
||||
},
|
||||
registrationCert: { photos: ['https://picsum.photos/seed/vd-zjf-reg/600/400'] },
|
||||
specialEquipCert: { photos: ['https://picsum.photos/seed/vd-zjf-spec/600/400'] },
|
||||
specialEquipDecal: {
|
||||
photos: ['https://picsum.photos/seed/vd-zjf-decal/600/400'],
|
||||
nextInspectDate: '2026-07-20'
|
||||
},
|
||||
hydrogenCard: {
|
||||
cardNo: 'H2-3304-0690-0088',
|
||||
cardType: '中石化加氢卡',
|
||||
balance: 8650.5,
|
||||
issueDate: '2025-03-10 10:15',
|
||||
issueUser: '能源管理部-张晓'
|
||||
},
|
||||
safetyValve: {
|
||||
photos: ['https://picsum.photos/seed/vd-zjf-valve/600/400'],
|
||||
inspectDate: '2025-05-10',
|
||||
nextInspectDate: '2026-05-09'
|
||||
},
|
||||
pressureGauge: {
|
||||
photos: ['https://picsum.photos/seed/vd-zjf-gauge/600/400'],
|
||||
inspectDate: '2025-12-15',
|
||||
nextInspectDate: '2026-06-14'
|
||||
}
|
||||
};
|
||||
var CERT_NAV_ITEMS = [
|
||||
{ key: 'driverLicense', label: '行驶证' },
|
||||
{ key: 'transportLicense', label: '道路运输证' },
|
||||
{ key: 'registrationCert', label: '登记证' },
|
||||
{ key: 'specialEquipCert', label: '特种设备使用登记证' },
|
||||
{ key: 'specialEquipDecal', label: '特种设备使用标识' },
|
||||
{ key: 'hydrogenCard', label: '加氢卡' },
|
||||
{ key: 'safetyValve', label: '安全阀' },
|
||||
{ key: 'pressureGauge', label: '压力表' }
|
||||
];
|
||||
|
||||
var maintenanceList = [
|
||||
{ key: '1', item: '变速器油', kmCycle: '60000', monthCycle: '24', laborCost: '0', materialCost: '571', total: '571', lastKm: '' },
|
||||
@@ -110,6 +140,7 @@ const Component = function () {
|
||||
];
|
||||
|
||||
var activeTab = useState('model');
|
||||
var licenseActiveNav = useState('driverLicense');
|
||||
var rearFilterDraft = useState({ installRange: null, deviceType: undefined });
|
||||
var rearFilterApplied = useState({ installRange: null, deviceType: undefined });
|
||||
var leaseFilterDraft = useState({ contractCode: undefined, projectName: undefined, customerName: undefined });
|
||||
@@ -539,122 +570,334 @@ const Component = function () {
|
||||
);
|
||||
}
|
||||
|
||||
function CertFieldRow(label, value) {
|
||||
var show = value != null && String(value).trim() !== '';
|
||||
function LicViewFieldRow(label, value) {
|
||||
var show = value != null && String(value).trim() !== '' && String(value).trim() !== '—';
|
||||
return React.createElement('div', { style: { display: 'flex', gap: 8, marginBottom: 10, fontSize: 14, lineHeight: '22px' } },
|
||||
React.createElement('span', { style: { color: 'rgba(0,0,0,0.45)', width: 168, flexShrink: 0 } }, label + ':'),
|
||||
React.createElement('span', { style: { color: 'rgba(0,0,0,0.85)' } }, show ? value : '—')
|
||||
);
|
||||
}
|
||||
/** 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: {
|
||||
flex: 1,
|
||||
minWidth: 260,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
alignSelf: 'stretch'
|
||||
}
|
||||
}, React.createElement('div', { style: { width: '100%' } }, fieldNodes))
|
||||
: null;
|
||||
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 } }, cap),
|
||||
React.createElement(Image, {
|
||||
|
||||
function mergeLicViewStatus(a, b) {
|
||||
var rank = { error: 0, warning: 1, default: 2, success: 3, processing: 2 };
|
||||
var ra = rank[a] != null ? rank[a] : 9;
|
||||
var rb = rank[b] != null ? rank[b] : 9;
|
||||
return ra <= rb ? a : b;
|
||||
}
|
||||
|
||||
function diffDaysFromAnchor(dateStr) {
|
||||
if (!dateStr) return null;
|
||||
var exp = new Date(dateStr);
|
||||
var today = new Date(LICENSE_VIEW_ANCHOR_DATE);
|
||||
exp.setHours(0, 0, 0, 0);
|
||||
today.setHours(0, 0, 0, 0);
|
||||
return Math.ceil((exp.getTime() - today.getTime()) / (1000 * 60 * 60 * 24));
|
||||
}
|
||||
|
||||
function getLicViewBadgeStatus(key) {
|
||||
var item = licenseViewBundle[key];
|
||||
if (!item) return 'default';
|
||||
if (key === 'hydrogenCard') {
|
||||
return item.cardNo ? 'success' : 'default';
|
||||
}
|
||||
if (!item.photos || !item.photos.length) return 'default';
|
||||
if (key === 'driverLicense') {
|
||||
var dd = diffDaysFromAnchor(item.expireDate);
|
||||
if (dd == null) return 'success';
|
||||
if (dd <= 0) return 'error';
|
||||
if (dd <= 90) return 'warning';
|
||||
return 'success';
|
||||
}
|
||||
if (key === 'transportLicense') {
|
||||
var fromDate = function (d) {
|
||||
var days = diffDaysFromAnchor(d);
|
||||
if (days == null) return 'success';
|
||||
if (days <= 0) return 'error';
|
||||
if (days <= 60) return 'warning';
|
||||
return 'success';
|
||||
};
|
||||
return mergeLicViewStatus(fromDate(item.expireDate), fromDate(item.inspectValidUntil));
|
||||
}
|
||||
if (key === 'specialEquipDecal' || key === 'safetyValve' || key === 'pressureGauge') {
|
||||
var nd = diffDaysFromAnchor(item.nextInspectDate);
|
||||
if (nd == null) return 'success';
|
||||
if (nd <= 0) return 'error';
|
||||
if (nd <= 60) return 'warning';
|
||||
return 'success';
|
||||
}
|
||||
return 'success';
|
||||
}
|
||||
|
||||
function scrollToLicenseAnchor(key, setActive) {
|
||||
setActive(key);
|
||||
var el = document.getElementById('vd-lic-' + key);
|
||||
if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
}
|
||||
|
||||
function LicViewPhotoGrid(photos, photoLabel) {
|
||||
var list = photos && photos.length ? photos : [];
|
||||
if (!list.length) {
|
||||
return React.createElement('div', { style: { flexShrink: 0 } },
|
||||
React.createElement('div', { style: { marginBottom: 8, color: 'rgba(0,0,0,0.45)', fontSize: 13 } }, photoLabel || '证件照片'),
|
||||
React.createElement(Image, {
|
||||
width: 168,
|
||||
height: 112,
|
||||
style: { objectFit: 'cover', borderRadius: 4, border: '1px solid #f0f0f0', background: '#fafafa' },
|
||||
src: licensePhotoPlaceholder,
|
||||
alt: '暂无影像',
|
||||
preview: false
|
||||
})
|
||||
);
|
||||
}
|
||||
return React.createElement('div', { style: { flexShrink: 0 } },
|
||||
React.createElement('div', { style: { marginBottom: 8, color: 'rgba(0,0,0,0.45)', fontSize: 13 } },
|
||||
(photoLabel || '证件照片') + (list.length > 1 ? '(' + list.length + '张)' : '')
|
||||
),
|
||||
React.createElement('div', { style: { display: 'flex', gap: 12, flexWrap: 'wrap' } },
|
||||
list.map(function (url, idx) {
|
||||
return React.createElement(Image, {
|
||||
key: idx,
|
||||
width: 168,
|
||||
height: 112,
|
||||
style: { objectFit: 'cover', borderRadius: 4, border: '1px solid #f0f0f0', background: '#fafafa' },
|
||||
src: imageSrc,
|
||||
alt: title,
|
||||
src: url,
|
||||
alt: (photoLabel || '证照') + '-' + (idx + 1),
|
||||
preview: true
|
||||
})
|
||||
),
|
||||
right
|
||||
});
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
/** 证照多图:每项 { label, src },如加氢证下登记证 + 使用标志 */
|
||||
function CertSectionCardMulti(title, photoSlots, fieldNodes) {
|
||||
var right = fieldNodes && fieldNodes.length
|
||||
|
||||
function LicViewCertCard(cfg) {
|
||||
var fields = cfg.fields || [];
|
||||
var right = fields.length
|
||||
? React.createElement('div', {
|
||||
style: {
|
||||
flex: 1,
|
||||
minWidth: 260,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
alignSelf: 'stretch'
|
||||
}
|
||||
}, React.createElement('div', { style: { width: '100%' } }, fieldNodes))
|
||||
style: { flex: 1, minWidth: 260, display: 'flex', alignItems: 'center', alignSelf: 'stretch' }
|
||||
}, React.createElement('div', { style: { width: '100%' } },
|
||||
fields.map(function (f, i) { return React.createElement('div', { key: i }, LicViewFieldRow(f.label, f.value)); })
|
||||
))
|
||||
: null;
|
||||
var slots = photoSlots || [];
|
||||
var photosRow = React.createElement('div', { style: { display: 'flex', gap: 16, flexWrap: 'wrap', flexShrink: 0, alignItems: 'flex-start' } },
|
||||
slots.map(function (slot, idx) {
|
||||
return React.createElement('div', { key: idx, style: { display: 'flex', flexDirection: 'column' } },
|
||||
React.createElement('div', { style: { marginBottom: 8, color: 'rgba(0,0,0,0.45)', fontSize: 13 } }, slot.label || '证件照片'),
|
||||
React.createElement(Image, {
|
||||
width: 168,
|
||||
height: 112,
|
||||
style: { objectFit: 'cover', borderRadius: 4, border: '1px solid #f0f0f0', background: '#fafafa' },
|
||||
src: slot.src,
|
||||
alt: (slot.label || title) + '',
|
||||
preview: true
|
||||
})
|
||||
return React.createElement(Card, {
|
||||
id: 'vd-lic-' + cfg.id,
|
||||
size: 'small',
|
||||
style: { marginBottom: 16, scrollMarginTop: 72 },
|
||||
title: cfg.title
|
||||
},
|
||||
cfg.alertTop || null,
|
||||
React.createElement('div', { style: { display: 'flex', gap: 24, flexWrap: 'wrap', alignItems: 'stretch' } },
|
||||
LicViewPhotoGrid(cfg.photos, cfg.photoLabel),
|
||||
right
|
||||
),
|
||||
cfg.extraBottom || null
|
||||
);
|
||||
}
|
||||
|
||||
function fmtH2Balance(n) {
|
||||
var num = Number(n);
|
||||
if (!Number.isFinite(num)) return '—';
|
||||
return '¥ ' + num.toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
||||
}
|
||||
|
||||
var lic = licenseViewBundle;
|
||||
var licNavActive = licenseActiveNav[0];
|
||||
var setLicNavActive = licenseActiveNav[1];
|
||||
var isShPlate = String(overview.plateNo || '').indexOf('沪') === 0;
|
||||
|
||||
var driverDays = diffDaysFromAnchor(lic.driverLicense.expireDate);
|
||||
var transportExpDays = diffDaysFromAnchor(lic.transportLicense.expireDate);
|
||||
var decalDays = diffDaysFromAnchor(lic.specialEquipDecal.nextInspectDate);
|
||||
|
||||
var licenseIndexBar = React.createElement(Card, {
|
||||
size: 'small',
|
||||
style: { marginBottom: 16, borderRadius: 12, border: '1px solid #e2e8f0' },
|
||||
bodyStyle: { padding: '14px 16px' }
|
||||
},
|
||||
React.createElement('div', { style: { display: 'flex', flexWrap: 'wrap', alignItems: 'center', justifyContent: 'space-between', gap: 12, marginBottom: 12 } },
|
||||
React.createElement('span', { style: { fontSize: 14, fontWeight: 700, color: '#0f172a' } }, '证照分类索引'),
|
||||
React.createElement('div', { style: { display: 'flex', flexWrap: 'wrap', alignItems: 'center', gap: 10, fontSize: 11, color: '#64748b' } },
|
||||
React.createElement('span', { style: { display: 'inline-flex', alignItems: 'center', gap: 4 } }, React.createElement(Badge, { status: 'success' }), '正常'),
|
||||
React.createElement(Tooltip, { title: '行驶证≤90天 / 道路运输证≤60天 / 特种设备标识≤60天 / 安全阀≤60天 / 压力表≤60天' },
|
||||
React.createElement('span', { style: { display: 'inline-flex', alignItems: 'center', gap: 4, cursor: 'help' } }, React.createElement(Badge, { status: 'warning' }), '临期')
|
||||
),
|
||||
React.createElement(Tooltip, { title: '对应证件检验/有效期已到期' },
|
||||
React.createElement('span', { style: { display: 'inline-flex', alignItems: 'center', gap: 4, cursor: 'help' } }, React.createElement(Badge, { status: 'error' }), '已到期')
|
||||
),
|
||||
React.createElement('span', { style: { display: 'inline-flex', alignItems: 'center', gap: 4 } }, React.createElement(Badge, { status: 'default' }), '未上传')
|
||||
)
|
||||
),
|
||||
React.createElement('div', {
|
||||
className: 'vd-lic-nav-grid',
|
||||
style: { display: 'grid', gridTemplateColumns: 'repeat(4, minmax(0, 1fr))', gap: 8 },
|
||||
role: 'navigation',
|
||||
'aria-label': '证照索引'
|
||||
},
|
||||
CERT_NAV_ITEMS.map(function (nav) {
|
||||
var active = licNavActive === nav.key;
|
||||
return React.createElement('button', {
|
||||
key: nav.key,
|
||||
type: 'button',
|
||||
onClick: function () { scrollToLicenseAnchor(nav.key, setLicNavActive); },
|
||||
style: {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
gap: 8,
|
||||
padding: '8px 12px',
|
||||
borderRadius: 8,
|
||||
fontSize: 13,
|
||||
fontWeight: active ? 600 : 500,
|
||||
color: active ? '#065f46' : '#475569',
|
||||
background: active ? '#ecfdf5' : '#f8fafc',
|
||||
border: active ? '1px solid #a7f3d0' : '1px solid #f1f5f9',
|
||||
cursor: 'pointer',
|
||||
textAlign: 'left'
|
||||
}
|
||||
},
|
||||
React.createElement('span', { style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, nav.label),
|
||||
React.createElement(Badge, { status: getLicViewBadgeStatus(nav.key) })
|
||||
);
|
||||
})
|
||||
);
|
||||
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' } },
|
||||
photosRow,
|
||||
right
|
||||
)
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
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, [
|
||||
CertFieldRow('注册日期', cd.drivingLicense.regDate),
|
||||
CertFieldRow('强制报废日期', cd.drivingLicense.scrapDate),
|
||||
CertFieldRow('行驶证审验有效期', cd.drivingLicense.inspectExpire)
|
||||
], '行驶证'),
|
||||
CertSectionCard('营运证信息', cd.operationPermit.img, [
|
||||
CertFieldRow('营运证编号', cd.operationPermit.permitNo),
|
||||
CertFieldRow('注册日期', cd.operationPermit.regDate),
|
||||
CertFieldRow('审验有效期', cd.operationPermit.inspectExpire)
|
||||
], '营运证'),
|
||||
CertSectionCard('通行证信息', cd.passPermit.img, [
|
||||
CertFieldRow('通行证编码', cd.passPermit.code),
|
||||
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.h2Card.img, [
|
||||
CertFieldRow('加氢卡对应加氢站', cd.h2Card.stationName)
|
||||
], '加氢卡'),
|
||||
CertSectionCard('安全阀信息', cd.safetyValve.img, [
|
||||
CertFieldRow('检验日期', cd.safetyValve.inspectDate),
|
||||
CertFieldRow('检验周期', fmtCycleMonth(cd.safetyValve.cycleMonth)),
|
||||
CertFieldRow('安全阀检测有效期', cd.safetyValve.validUntil)
|
||||
], '安全阀'),
|
||||
CertSectionCard('压力表信息', cd.pressureGauge.img, [
|
||||
CertFieldRow('检验日期', cd.pressureGauge.inspectDate),
|
||||
CertFieldRow('检验周期', fmtCycleMonth(cd.pressureGauge.cycleMonth)),
|
||||
CertFieldRow('压力阀检测有效期', cd.pressureGauge.valveInspectValidUntil)
|
||||
], '压力表')
|
||||
React.createElement('style', null, '@media (max-width:992px){.vd-lic-nav-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}'),
|
||||
licenseIndexBar,
|
||||
LicViewCertCard({
|
||||
id: 'driverLicense',
|
||||
title: '行驶证',
|
||||
photoLabel: '行驶证照片',
|
||||
photos: lic.driverLicense.photos,
|
||||
alertTop: driverDays != null && driverDays <= 90
|
||||
? React.createElement(Alert, {
|
||||
type: driverDays <= 0 ? 'error' : driverDays <= 30 ? 'error' : 'warning',
|
||||
showIcon: true,
|
||||
style: { marginBottom: 16, borderRadius: 8 },
|
||||
message: '行驶证检验临期提醒',
|
||||
description: driverDays <= 0
|
||||
? '检验有效期已到期,请尽快安排年检。'
|
||||
: ('距离检验有效期至还剩 ' + driverDays + ' 天(系统提前 90 天感知)。')
|
||||
})
|
||||
: null,
|
||||
fields: [
|
||||
{ label: '注册日期', value: lic.driverLicense.regDate },
|
||||
{ label: '发证日期', value: lic.driverLicense.issueDate },
|
||||
{ label: '强制报废日期', value: lic.driverLicense.scrapDate },
|
||||
{ label: '检验有效期至', value: lic.driverLicense.expireDate }
|
||||
],
|
||||
extraBottom: isShPlate && lic.driverLicense.shNextEvaluation
|
||||
? React.createElement('div', { style: { marginTop: 16, padding: 12, background: '#f5f3ff', borderRadius: 8, border: '1px solid #ddd6fe' } },
|
||||
LicViewFieldRow('下次等级评定时间', lic.driverLicense.shNextEvaluation)
|
||||
)
|
||||
: null
|
||||
}),
|
||||
LicViewCertCard({
|
||||
id: 'transportLicense',
|
||||
title: '道路运输证',
|
||||
photoLabel: '道路运输证照片',
|
||||
photos: lic.transportLicense.photos,
|
||||
alertTop: transportExpDays != null && transportExpDays <= 60
|
||||
? React.createElement(Alert, {
|
||||
type: transportExpDays <= 0 ? 'error' : transportExpDays <= 15 ? 'error' : 'warning',
|
||||
showIcon: true,
|
||||
style: { marginBottom: 16, borderRadius: 8 },
|
||||
message: '道路运输证临期提醒',
|
||||
description: '证件有效期距今日 ' + transportExpDays + ' 天(系统提前 60 天列入年审任务)。'
|
||||
})
|
||||
: null,
|
||||
fields: [
|
||||
{ label: '经营许可证号', value: lic.transportLicense.licenseNo },
|
||||
{ label: '核发时间', value: lic.transportLicense.issueDate },
|
||||
{ label: '证件有效期', value: lic.transportLicense.expireDate },
|
||||
{ label: '审验有效期', value: lic.transportLicense.inspectValidUntil }
|
||||
]
|
||||
}),
|
||||
LicViewCertCard({
|
||||
id: 'registrationCert',
|
||||
title: '登记证',
|
||||
photoLabel: '登记证照片',
|
||||
photos: lic.registrationCert.photos,
|
||||
fields: []
|
||||
}),
|
||||
LicViewCertCard({
|
||||
id: 'specialEquipCert',
|
||||
title: '特种设备使用登记证',
|
||||
photoLabel: '使用登记证照片',
|
||||
photos: lic.specialEquipCert.photos,
|
||||
fields: []
|
||||
}),
|
||||
LicViewCertCard({
|
||||
id: 'specialEquipDecal',
|
||||
title: '特种设备使用标识',
|
||||
photoLabel: '使用安全标识照片',
|
||||
photos: lic.specialEquipDecal.photos,
|
||||
alertTop: decalDays != null && decalDays <= 60
|
||||
? React.createElement(Alert, {
|
||||
type: decalDays <= 0 || decalDays <= 15 ? 'error' : 'warning',
|
||||
showIcon: true,
|
||||
style: { marginBottom: 16, borderRadius: 8 },
|
||||
message: '特种设备使用标识检验提醒',
|
||||
description: decalDays <= 0
|
||||
? ('下次检验日期已逾期 ' + Math.abs(decalDays) + ' 天。')
|
||||
: ('距离下次检验日期还剩 ' + decalDays + ' 天(提前 60 天感知)。')
|
||||
})
|
||||
: null,
|
||||
fields: [{ label: '下次检验日期', value: lic.specialEquipDecal.nextInspectDate }]
|
||||
}),
|
||||
React.createElement(Card, {
|
||||
id: 'vd-lic-hydrogenCard',
|
||||
size: 'small',
|
||||
style: { marginBottom: 16, scrollMarginTop: 72 },
|
||||
title: '加氢卡'
|
||||
},
|
||||
React.createElement('div', { style: { display: 'flex', gap: 24, flexWrap: 'wrap' } },
|
||||
React.createElement('div', {
|
||||
style: {
|
||||
flex: '0 0 280px',
|
||||
maxWidth: 320,
|
||||
padding: 20,
|
||||
borderRadius: 12,
|
||||
background: 'linear-gradient(135deg, #0f172a 0%, #1e293b 100%)',
|
||||
color: '#e2e8f0',
|
||||
boxShadow: '0 8px 24px rgba(15,23,42,0.15)'
|
||||
}
|
||||
},
|
||||
React.createElement('div', { style: { fontSize: 11, color: '#94a3b8', marginBottom: 8 } }, lic.hydrogenCard.cardType || '加氢卡'),
|
||||
React.createElement('div', { style: { fontSize: 18, fontWeight: 700, letterSpacing: 2, marginBottom: 16, fontFamily: 'monospace' } },
|
||||
lic.hydrogenCard.cardNo || '—'
|
||||
),
|
||||
React.createElement('div', { style: { fontSize: 22, fontWeight: 800, color: '#34d399' } }, fmtH2Balance(lic.hydrogenCard.balance))
|
||||
),
|
||||
React.createElement('div', { style: { flex: 1, minWidth: 240 } },
|
||||
LicViewFieldRow('加氢卡号', lic.hydrogenCard.cardNo),
|
||||
LicViewFieldRow('卡类型', lic.hydrogenCard.cardType),
|
||||
LicViewFieldRow('实时余额', fmtH2Balance(lic.hydrogenCard.balance)),
|
||||
LicViewFieldRow('配发时间', lic.hydrogenCard.issueDate),
|
||||
LicViewFieldRow('配发经办人', lic.hydrogenCard.issueUser)
|
||||
)
|
||||
)
|
||||
),
|
||||
LicViewCertCard({
|
||||
id: 'safetyValve',
|
||||
title: '安全阀',
|
||||
photoLabel: '安全阀校验报告照片',
|
||||
photos: lic.safetyValve.photos,
|
||||
fields: [
|
||||
{ label: '检验日期', value: lic.safetyValve.inspectDate },
|
||||
{ label: '下次检验日期', value: lic.safetyValve.nextInspectDate }
|
||||
]
|
||||
}),
|
||||
LicViewCertCard({
|
||||
id: 'pressureGauge',
|
||||
title: '压力表',
|
||||
photoLabel: '压力表校验报告照片',
|
||||
photos: lic.pressureGauge.photos,
|
||||
fields: [
|
||||
{ label: '检验日期', value: lic.pressureGauge.inspectDate },
|
||||
{ label: '下次检验日期', value: lic.pressureGauge.nextInspectDate }
|
||||
]
|
||||
})
|
||||
);
|
||||
|
||||
var tabItems = [
|
||||
|
||||
Reference in New Issue
Block a user