|
|
@ -327,17 +327,21 @@ export default { |
|
|
}, |
|
|
}, |
|
|
normalizeOrderRow(row) { |
|
|
normalizeOrderRow(row) { |
|
|
const nodeList = row.nodeList || [] |
|
|
const nodeList = row.nodeList || [] |
|
|
const nodeDoneCount = nodeList.filter(item => item.status === '已完成').length |
|
|
|
|
|
const currentNode = (nodeList.find(item => item.status !== '已完成') || {}).nodeName || '全部完成' |
|
|
|
|
|
|
|
|
const fallbackNodeDoneCount = nodeList.filter(item => item.status === '已完成').length |
|
|
|
|
|
const fallbackCurrentNodeObj = nodeList.find(item => item.status !== '已完成') || {} |
|
|
|
|
|
const nodeDoneCount = typeof row.nodeDoneCount === 'number' ? row.nodeDoneCount : fallbackNodeDoneCount |
|
|
|
|
|
const nodeTotalCount = typeof row.nodeTotalCount === 'number' ? row.nodeTotalCount : nodeList.length |
|
|
|
|
|
const currentNode = row.currentNode || fallbackCurrentNodeObj.nodeName || '全部完成' |
|
|
return { |
|
|
return { |
|
|
...row, |
|
|
...row, |
|
|
nodeReportMode: row.nodeReportMode || 'PARALLEL', |
|
|
nodeReportMode: row.nodeReportMode || 'PARALLEL', |
|
|
|
|
|
currentNodeCode: row.currentNodeCode || fallbackCurrentNodeObj.nodeCode || '', |
|
|
orderTypeName: this.getOrderTypeName(row.orderType), |
|
|
orderTypeName: this.getOrderTypeName(row.orderType), |
|
|
productName: row.taskNo || row.projectNo || '-', |
|
|
productName: row.taskNo || row.projectNo || '-', |
|
|
planDate: row.planFinishDate || row.planDeliveryDate || '-', |
|
|
planDate: row.planFinishDate || row.planDeliveryDate || '-', |
|
|
owner: this.$store.state.user.userDisplay || this.$store.state.user.name || '-', |
|
|
owner: this.$store.state.user.userDisplay || this.$store.state.user.name || '-', |
|
|
nodeDoneCount: nodeDoneCount, |
|
|
nodeDoneCount: nodeDoneCount, |
|
|
nodeTotalCount: nodeList.length, |
|
|
|
|
|
|
|
|
nodeTotalCount: nodeTotalCount, |
|
|
currentNode: currentNode, |
|
|
currentNode: currentNode, |
|
|
visibleNodeList: nodeList |
|
|
visibleNodeList: nodeList |
|
|
} |
|
|
} |
|
|
@ -402,9 +406,7 @@ export default { |
|
|
if ((order.nodeReportMode || 'PARALLEL') !== 'SEQUENTIAL') { |
|
|
if ((order.nodeReportMode || 'PARALLEL') !== 'SEQUENTIAL') { |
|
|
return true |
|
|
return true |
|
|
} |
|
|
} |
|
|
const nodeList = order.visibleNodeList || [] |
|
|
|
|
|
const firstUnDoneNode = nodeList.find(item => item.status !== '已完成') |
|
|
|
|
|
return !!firstUnDoneNode && firstUnDoneNode.nodeCode === node.nodeCode |
|
|
|
|
|
|
|
|
return !!order.currentNodeCode && order.currentNodeCode === node.nodeCode |
|
|
}, |
|
|
}, |
|
|
directReportNode(order, node) { |
|
|
directReportNode(order, node) { |
|
|
this.reportData = { |
|
|
this.reportData = { |
|
|
|