✨ 打卡详情展示异常状态并新增异常节点展示
运单详情「打卡详情」时间轴按节点关联异常处置:存在未了结异常时显示「异常」标签 与「跟进」链接,全部处理完成时显示「已处理异常」与「详情」链接。异常跟节点走, 节点未打卡也可能有异常。 异常来源改用异常处置表而非打卡行的 exception_flag —— 后者由打卡接口写入且未随 异常上报维护,实测有异常的节点该值仍为 0,原「异常」标签从未显示过。 「已处理」的口径与后端打卡门禁一致(已完成、已撤销都放行),故「处理中」仍算 未处理。 异常节点字段补入各处异常信息:运单详情「异常上报」表格、编辑弹窗、跟进/详情 弹窗,统一放在异常类型之前;表格内空节点显示「-」而不是留白(存量异常无节点)。 过程节点列显示配置中的中文名而非原始 key(库里混存 key 与中文名两种格式)。 删除打卡详情中在途节点的「在途」标签 —— 节点名已表明是在途。
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user