| | |
| | | > |
| | | <view class="card-header"> |
| | | <text class="order-no">单号:{{ item.orderNo }}</text> |
| | | <text class="status" :class="`status-${item.status}`"> |
| | | <text class="status" :class="statusClass(item.status)"> |
| | | {{ item.status }} |
| | | </text> |
| | | </view> |
| | |
| | | } |
| | | } |
| | | |
| | | const statusClassMap: Record<string, string> = { |
| | | 待处理: "is-pending", |
| | | 进行中: "is-doing", |
| | | 已完成: "is-done", |
| | | 已取消: "is-cancel", |
| | | }; |
| | | |
| | | function statusClass(status?: string) { |
| | | return statusClassMap[status || ""] || ""; |
| | | } |
| | | |
| | | function isExpanded(item: Eps.RecycleOrderEntity) { |
| | | return !!item.orderNo && expandedOrderNo.value === item.orderNo; |
| | | } |
| | |
| | | background: #f5f5f5; |
| | | color: #999; |
| | | |
| | | &.status-待处理 { |
| | | &.is-pending { |
| | | background: #fef5e7; |
| | | color: #e67e22; |
| | | } |
| | | &.status-进行中 { |
| | | &.is-doing { |
| | | background: #eaf4fc; |
| | | color: #2980b9; |
| | | } |
| | | &.status-已完成 { |
| | | &.is-done { |
| | | background: #e8f8f0; |
| | | color: #27ae60; |
| | | } |
| | | &.status-已取消 { |
| | | &.is-cancel { |
| | | background: #fef0f0; |
| | | color: #e74c3c; |
| | | } |