✨ 维修记录列表展示关联运单与关联异常

This commit is contained in:
2026-10-29 08:58:21 +08:00
parent 114c2fd2af
commit 415e1fd58d
+25
View File
@@ -179,6 +179,14 @@ const createTimeRangeMap = {
createTimeRange: ['createTimeStart', 'createTimeEnd'],
};
/** 关联异常列:一级 / 二级(如「车辆异常 / 车辆故障维修」),无关联显示 — */
function formatExceptionSource(row) {
const parts = [row?.exceptionType, row?.exceptionReason].filter(
item => item !== undefined && item !== null && String(item).trim() !== ''
);
return parts.length ? parts.join(' / ') : '—';
}
const exportColumns = [
{ prop: 'vehicleType', label: '车船类型' },
{ prop: 'vehicleNo', label: '车牌号/船号' },
@@ -284,6 +292,23 @@ export default {
{ max: 30, message: '最多 30 个字符', trigger: 'change' },
],
},
// 关联信息只读展示:由异常处置录入的记录带出运单与异常类型,PC 新增/编辑不产生关联
{
label: '关联运单',
prop: 'waybillNo',
minWidth: 150,
addDisplay: false,
editDisplay: false,
formatter: row => row.waybillNo || '—',
},
{
label: '关联异常',
prop: 'exceptionReason',
minWidth: 180,
addDisplay: false,
editDisplay: false,
formatter: formatExceptionSource,
},
{
label: '维修人',
prop: 'maintainer',