|
|
|
@ -486,6 +486,11 @@ export default { |
|
|
|
this.$message.error(message) |
|
|
|
} |
|
|
|
|
|
|
|
// 显示详细结果对话框 |
|
|
|
if (result.details && result.details.length > 0) { |
|
|
|
this.showRetryResultDialog(result.details) |
|
|
|
} |
|
|
|
|
|
|
|
// 刷新列表 |
|
|
|
this.getDataList() |
|
|
|
} else { |
|
|
|
@ -496,6 +501,46 @@ export default { |
|
|
|
this.$message.error('重试失败:' + (error.message || '网络错误')) |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 显示重试结果详情对话框 |
|
|
|
showRetryResultDialog(details) { |
|
|
|
const successList = details.filter(d => d.status === 'success') |
|
|
|
const failureList = details.filter(d => d.status === 'failure') |
|
|
|
const errorList = details.filter(d => d.status === 'error') |
|
|
|
|
|
|
|
let messageHtml = '<div style="max-height: 400px; overflow-y: auto;">' |
|
|
|
|
|
|
|
if (successList.length > 0) { |
|
|
|
messageHtml += '<div style="margin-bottom: 15px;"><strong style="color: #67C23A;">成功 (' + successList.length + '):</strong><ul style="margin: 5px 0; padding-left: 20px;">' |
|
|
|
successList.forEach(item => { |
|
|
|
messageHtml += '<li>事务ID:' + item.transactionId + (item.u8CCode ? ' - U8单号:' + item.u8CCode : '') + '</li>' |
|
|
|
}) |
|
|
|
messageHtml += '</ul></div>' |
|
|
|
} |
|
|
|
|
|
|
|
if (failureList.length > 0) { |
|
|
|
messageHtml += '<div style="margin-bottom: 15px;"><strong style="color: #E6A23C;">失败 (' + failureList.length + '):</strong><ul style="margin: 5px 0; padding-left: 20px;">' |
|
|
|
failureList.forEach(item => { |
|
|
|
messageHtml += '<li>事务ID:' + item.transactionId + ':' + (item.message || '未知错误') + '</li>' |
|
|
|
}) |
|
|
|
messageHtml += '</ul></div>' |
|
|
|
} |
|
|
|
|
|
|
|
if (errorList.length > 0) { |
|
|
|
messageHtml += '<div><strong style="color: #F56C6C;">异常 (' + errorList.length + '):</strong><ul style="margin: 5px 0; padding-left: 20px;">' |
|
|
|
errorList.forEach(item => { |
|
|
|
messageHtml += '<li>事务ID:' + item.transactionId + ':' + (item.message || '未知异常') + '</li>' |
|
|
|
}) |
|
|
|
messageHtml += '</ul></div>' |
|
|
|
} |
|
|
|
|
|
|
|
messageHtml += '</div>' |
|
|
|
|
|
|
|
this.$alert(messageHtml, '批量重试结果详情', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
dangerouslyUseHTMLString: true |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|