diff --git a/src/option/business/waybill-manage.js b/src/option/business/waybill-manage.js index 49fa17b..9f617d3 100644 --- a/src/option/business/waybill-manage.js +++ b/src/option/business/waybill-manage.js @@ -98,6 +98,24 @@ const getProcessConfigNodes = row => { const isAcceptProcessNode = node => node.key === 'accept' || node.name === '接单'; +/** + * 过程节点列显示文案。 + * + * 该列在库里存的是「原始值」,且历史上写入了两种格式:司机打卡推进写的是配置的 + * key(unload / dispatch / load …),配载单新建默认值写的是中文名(接单)。 + * 故这里按两种格式都认一次,认不出就原样显示,不把值吞掉。 + * + * 运单创建后、司机首次打卡前该字段为空,属正常——显示「-」,避免留白看不出是没值还是没渲染。 + */ +const formatCurrentProcessNode = row => { + const value = String(getFirstValue(row, ['currentProcessNode', 'currentNode']) || '').trim(); + if (!value) return '-'; + const node = getProcessConfigNodes(row).find( + item => item.key === value || item.name === value + ); + return node?.name || node?.key || value; +}; + const isTruthyFlag = value => { if (value === true || value === 1) return true; if (value === false || value === 0 || value === null || value === undefined || value === '') { @@ -608,6 +626,7 @@ export const option = { { label: '过程节点', prop: 'currentProcessNode', + formatter: row => formatCurrentProcessNode(row), minWidth: 140, addDisplay: false, editDisplay: false, diff --git a/src/option/transit/exception-disposal.js b/src/option/transit/exception-disposal.js index 3d21662..a93c3c0 100644 --- a/src/option/transit/exception-disposal.js +++ b/src/option/transit/exception-disposal.js @@ -81,6 +81,7 @@ export const tableColumns = [ { label: '上报时间', prop: 'reportTime', minWidth: 170 }, { label: '异常类型', prop: 'exceptionTypeName', minWidth: 160 }, { label: '上报说明', prop: 'reportDescription', minWidth: 180 }, + { label: '异常节点', prop: 'nodeName', minWidth: 120 }, { label: '承运商', prop: 'carrierName', minWidth: 160 }, { label: '最新跟进说明', prop: 'latestFollowContent', minWidth: 200 }, { label: '状态', prop: 'disposalStatusName', minWidth: 120 }, @@ -100,6 +101,7 @@ export const detailWaybillFields = [ export const detailExceptionFields = [ { label: '上报人', prop: 'reporterName' }, { label: '上报时间', prop: 'reportTime' }, + { label: '异常节点', prop: 'nodeName' }, { label: '异常类型', prop: 'exceptionTypeName' }, { label: '异常原因', prop: 'exceptionReason' }, { label: '上报说明', prop: 'reportDescription', span: 2 }, diff --git a/src/views/business/components/waybill-manage-page.vue b/src/views/business/components/waybill-manage-page.vue index ab550d3..873787b 100644 --- a/src/views/business/components/waybill-manage-page.vue +++ b/src/views/business/components/waybill-manage-page.vue @@ -2061,6 +2061,11 @@ + + + {{ record.statusName || (record.punched ? '已打卡' : '未打卡') }} - 在途 - 异常 + {{ + waybillPunchRecordExceptions[waybillPunchRecordKey(record, index)] + .unfinished + ? '异常' + : '已处理异常' + }} + {{ + waybillPunchRecordExceptions[waybillPunchRecordKey(record, index)] + .unfinished + ? '跟进' + : '详情' + }} +