新增暂停时长

This commit is contained in:
2026-04-08 18:01:56 +08:00
parent 9ca377907b
commit 09be26e2aa
9 changed files with 451 additions and 110 deletions
+12 -1
View File
@@ -134,9 +134,19 @@
}
});
const hasPauseTime = computed(() => {
const pt = props.order.pauseTime
return pt !== undefined && pt !== null && String(pt).trim() !== ''
})
const isBillingPaused = computed(() => normalizedStatus.value === 'in_used' && hasPauseTime.value)
const statusDef = computed(() => props.orderStatusMap?.[rawStatus.value] || props.orderStatusMap?.[normalizedStatus.value] || {});
const statusText = computed(() => statusDef.value.text || '');
const statusText = computed(() => {
if (isBillingPaused.value) return t('order.orderStatusBillingPaused')
return statusDef.value.text || ''
});
const statusChipClass = computed(() => {
if (isBillingPaused.value) return 'chip-paused'
const cls = statusDef.value.class || '';
if (cls.includes('status-using')) return 'chip-using';
if (cls.includes('status-waiting')) return 'chip-waiting';
@@ -212,6 +222,7 @@
overflow: hidden;
.chip-text { display: inline-block; transform: skewX(15deg); }
&.chip-using { background: rgba(7,193,96,0.12); color: #07c160; }
&.chip-paused { background: rgba(255,152,0,0.16); color: #e65100; }
&.chip-waiting { background: rgba(255,152,0,0.12); color: #FF9800; }
&.chip-finished { background: rgba(76,175,80,0.12); color: #4CAF50; }
&.chip-cancelled { background: rgba(158,158,158,0.12); color: #9E9E9E; }