feat(batch): 批次页增加失败占比可点击入口
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
$fallbackMatched = (int) (data_get($fallbackCounts, 'matched') ?? 0);
|
||||
$fallbackFailed = (int) (data_get($fallbackCounts, 'failed') ?? 0);
|
||||
|
||||
$matchedForRatio = $hasSummary ? $matched : $fallbackMatched;
|
||||
$failedForRatio = $hasSummary ? $failed : $fallbackFailed;
|
||||
$failedRatioPct = $matchedForRatio > 0 ? round(($failedForRatio / $matchedForRatio) * 100, 1) : 0.0;
|
||||
|
||||
$SYNC_ERROR_KEYWORD_LINK_MAX_LEN = (int) config('saasshop.platform_orders.sync_error_keyword_link_max_len', 200);
|
||||
$SYNC_ERROR_KEYWORD_LINK_MAX_LEN = max(50, min(1000, $SYNC_ERROR_KEYWORD_LINK_MAX_LEN));
|
||||
$SYNC_FAILED_REASON_TRUNCATE_LEN = (int) config('saasshop.platform_orders.sync_failed_reason_display_truncate_len', 60);
|
||||
@@ -69,6 +73,12 @@
|
||||
<div class="card">
|
||||
<h3>成功 / 失败</h3>
|
||||
<div class="metric-number">{{ $hasSummary ? ($success . ' / ' . $failed) : ('- / ' . $fallbackFailed) }}</div>
|
||||
@if(($governanceLinks['failed'] ?? '') !== '' && $matchedForRatio > 0)
|
||||
<div class="muted muted-xs">失败占比:
|
||||
<a class="link" data-role="batch-failed-ratio-link" href="{{ $governanceLinks['failed'] }}">{{ $failedRatioPct }}%</a>
|
||||
<span class="muted">({{ $failedForRatio }}/{{ $matchedForRatio }})</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user