| | |
| | | > |
| | | <view class="card-header"> |
| | | <text class="order-no">单号:{{ item.appointmentNo }}</text> |
| | | <text class="status" :class="`status-${item.status}`"> |
| | | <text class="status" :class="statusClass(item.status)"> |
| | | {{ item.status }} |
| | | </text> |
| | | </view> |
| | |
| | | ] as const; |
| | | |
| | | type TabValue = (typeof tabs)[number]["value"]; |
| | | |
| | | const statusClassMap: Record<string, string> = { |
| | | 待审核: "is-review", |
| | | 待接单: "is-wait", |
| | | 已接单: "is-accepted", |
| | | 上门中: "is-visiting", |
| | | 已完成: "is-done", |
| | | 已取消: "is-cancel", |
| | | 已预约: "is-booked", |
| | | }; |
| | | |
| | | function statusClass(status?: string) { |
| | | return statusClassMap[status || ""] || ""; |
| | | } |
| | | |
| | | const activeTab = ref<TabValue>("booked"); |
| | | const list = ref<Eps.RecycleAppointmentEntity[]>([]); |
| | |
| | | background: #f5f5f5; |
| | | color: #999; |
| | | |
| | | &.status-待审核, |
| | | &.status-待接单 { |
| | | &.is-review, |
| | | &.is-wait { |
| | | background: #fef5e7; |
| | | color: #e67e22; |
| | | } |
| | | &.status-已接单, |
| | | &.status-上门中 { |
| | | &.is-accepted, |
| | | &.is-visiting { |
| | | background: #eaf4fc; |
| | | color: #2980b9; |
| | | } |
| | | &.status-已完成 { |
| | | &.is-done { |
| | | background: #e8f8f0; |
| | | color: #27ae60; |
| | | } |
| | | &.status-已取消 { |
| | | &.is-cancel { |
| | | background: #fef0f0; |
| | | color: #e74c3c; |
| | | } |