Files
hfb_sys/frontend/src/features/orders/views/OrdersView.css
T
yml2213andCursor e5cd7b5c34 feat(orders): 号主可从自己的列表隐藏已结束订单
只写入隐藏时间,订单和款项仍保留给租客与后台。详情按钮固定对齐,删除跟在后面。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 16:22:55 +08:00

662 lines
11 KiB
CSS

/* ==========================================================================
我的订单页面全新设计规范 (对齐首页 / 详情页视觉标准)
========================================================================== */
.orders-page-redesign {
display: flex;
flex-direction: column;
gap: 16px;
width: 100%;
max-width: 1720px;
min-width: 0;
margin: 0 auto;
padding: 8px 0 32px;
}
/* ---------- 头部横幅区 ---------- */
.orders-hero-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
padding: 24px 28px;
border-radius: 16px;
background: #ffffff;
border: 1px solid #e2e8f0;
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.hero-header-left {
display: flex;
flex-direction: column;
gap: 6px;
min-width: 0;
}
.site-order-tag {
display: inline-flex;
align-items: center;
padding: 4px 12px;
border-radius: 999px;
background: linear-gradient(135deg, rgba(20, 119, 255, 0.08), rgba(0, 198, 251, 0.12));
border: 1px solid rgba(20, 119, 255, 0.25);
color: #1477ff;
font-size: 13px;
font-weight: 600;
letter-spacing: 0.2px;
}
.hero-title-row {
display: flex;
align-items: center;
gap: 12px;
}
.hero-title {
margin: 0;
font-size: 22px;
font-weight: 900;
letter-spacing: -0.02em;
color: #0f172a;
line-height: 1.2;
}
.orders-total-badge {
display: inline-flex;
align-items: center;
padding: 2px 10px;
border-radius: 999px;
background: #fff7ed;
border: 1px solid #fed7aa;
color: #ea580c;
font-size: 12px;
font-weight: 700;
}
.hero-subtitle {
margin: 0;
color: #64748b;
font-size: 13px;
font-weight: 500;
}
.orders-search-box {
width: 320px;
flex-shrink: 0;
}
.orders-search-input :deep(.el-input__wrapper) {
border-radius: 999px;
padding: 4px 16px;
background: #f8fafc;
box-shadow: 0 0 0 1px #e2e8f0 inset;
transition: all 0.2s ease;
}
.orders-search-input :deep(.el-input__wrapper.is-focus) {
background: #ffffff;
box-shadow:
0 0 0 1.5px #ff8533 inset,
0 0 0 4px rgba(255, 106, 0, 0.1) !important;
}
.orders-search-input :deep(.el-input__inner) {
font-size: 13px;
font-weight: 500;
}
/* ---------- 状态筛选胶囊条 ---------- */
.orders-filter-strip {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 8px;
border-radius: 14px;
background: #ffffff;
border: 1px solid #e2e8f0;
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.orders-pill-tabs {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.orders-pill-tab {
display: inline-flex;
align-items: center;
gap: 6px;
height: 34px;
padding: 0 14px;
border: 1px solid transparent;
border-radius: 999px;
background: transparent;
color: #64748b;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all 0.16s ease;
user-select: none;
}
.orders-pill-tab:hover {
background: #f8fafc;
color: #0f172a;
}
.orders-pill-tab.active {
background: #fff7ed;
border-color: #ffd4b0;
color: #ea580c;
font-weight: 800;
box-shadow: 0 2px 8px rgba(255, 106, 0, 0.1);
}
.tab-badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 18px;
height: 18px;
padding: 0 5px;
border-radius: 999px;
background: #f1f5f9;
color: #64748b;
font-size: 11px;
font-weight: 700;
transition: all 0.16s ease;
}
.tab-badge.is-active {
background: #ff6a00;
color: #ffffff;
}
/* ---------- 订单列表容器 ---------- */
.orders-container {
border-radius: 16px;
background: #ffffff;
border: 1px solid #e2e8f0;
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
overflow: hidden;
}
.empty-state {
padding: 80px 20px;
border-radius: 16px;
background: #ffffff;
border: 1px solid #e2e8f0;
text-align: center;
}
/* ---------- PC 表格重构 ---------- */
.orders-table {
display: block;
width: 100%;
}
.orders-table :deep(.el-table__header-wrapper th) {
background: #f8fafc;
color: #475569;
font-weight: 700;
font-size: 13px;
padding: 14px 12px;
border-bottom: 1px solid #e2e8f0;
white-space: nowrap;
}
.orders-table :deep(.el-table__header-wrapper th .cell) {
white-space: nowrap !important;
word-break: keep-all !important;
}
.orders-table :deep(.el-table__body-wrapper td) {
padding: 16px 12px;
border-bottom: 1px solid #f1f5f9;
transition: background 0.15s ease;
}
.orders-table :deep(.el-table__row:hover td) {
background: #fafcff !important;
}
.orders-table :deep(.el-table__cell) {
overflow: visible !important;
}
.orders-table :deep(.el-table__cell .cell) {
overflow: visible !important;
text-overflow: clip !important;
word-break: break-word;
}
.orders-table :deep(td.is-center .cell) {
padding: 0 4px !important;
display: flex;
align-items: center;
justify-content: center;
}
/* 业务类型标签 */
.biz-tag {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 44px;
height: 24px;
padding: 0 8px;
border-radius: 6px;
font-size: 12px;
font-weight: 700;
}
.biz-tag.rental {
color: #2563eb;
background: #eff6ff;
border: 1px solid #dbeafe;
}
.biz-tag.crash {
color: #ea580c;
background: #fff7ed;
border: 1px solid #fed7aa;
}
/* 身份角色标签 */
.role-tag {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 44px;
height: 22px;
padding: 0 8px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
line-height: 1;
white-space: nowrap;
flex-shrink: 0;
}
.role-tag.renter {
color: #2563eb;
background: #eff6ff;
border: 1px solid #dbeafe;
}
.role-tag.owner {
color: #16a34a;
background: #f0fdf4;
border: 1px solid #bbf7d0;
}
.role-tag.buyer {
color: #64748b;
background: #f1f5f9;
border: 1px solid #e2e8f0;
}
/* 订单号单元格 */
.order-no-cell {
display: flex;
align-items: center;
gap: 6px;
}
.order-no-text {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 13px;
font-weight: 600;
color: #334155;
}
.copy-icon {
cursor: pointer;
color: #94a3b8;
font-size: 14px;
transition: color 0.15s;
}
.copy-icon:hover {
color: #ff6a00;
}
/* 商品/账号单元格 */
.rental-product-cell,
.crash-product-cell {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
}
.listing-code-line {
display: inline-flex;
width: fit-content;
align-items: center;
gap: 4px;
padding: 2px 8px;
border: 1px solid #bfdbfe;
border-radius: 6px;
background: #eff6ff;
color: #2563eb;
font-size: 12px;
font-weight: 700;
cursor: pointer;
transition: all 0.15s ease;
}
.listing-code-line:hover {
background: #dbeafe;
border-color: #93c5fd;
}
.listing-code-line.compact {
margin-top: 0;
margin-bottom: 2px;
}
.rental-title,
.crash-product-info strong {
font-size: 14px;
font-weight: 600;
color: #0f172a;
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.crash-product-cell {
flex-direction: row;
align-items: center;
gap: 12px;
}
.crash-cover {
width: 44px;
height: 44px;
border-radius: 8px;
overflow: hidden;
background: #f1f5f9;
display: flex;
align-items: center;
justify-content: center;
color: #94a3b8;
font-size: 12px;
flex-shrink: 0;
border: 1px solid #e2e8f0;
}
.crash-cover.lg {
width: 60px;
height: 60px;
}
.crash-cover img {
width: 100%;
height: 100%;
object-fit: cover;
}
.crash-product-info {
display: flex;
flex-direction: column;
gap: 3px;
min-width: 0;
}
.crash-product-info span {
font-size: 12px;
color: #64748b;
font-weight: 500;
}
/* 金额与押金单元格 */
.amount-cell {
display: flex;
flex-direction: column;
gap: 2px;
}
.amount-value {
font-size: 15px;
font-weight: 800;
color: #0f172a;
font-feature-settings: 'tnum';
}
.amount-label {
font-size: 11px;
color: #94a3b8;
font-weight: 500;
}
.amount-sub {
font-size: 11px;
color: #10b981;
font-weight: 600;
}
/* 状态单元格 */
.status-cell {
display: flex;
flex-direction: column;
gap: 4px;
align-items: flex-start;
}
.status-cell > span:first-child {
font-size: 13px;
font-weight: 700;
color: #334155;
}
.countdown-badge {
display: inline-flex;
align-items: center;
padding: 1px 6px;
border-radius: 4px;
background: #fef3c7;
color: #b45309;
font-size: 11px;
font-weight: 600;
}
/* 操作区:详情固定在左侧对齐,删除或去支付跟在后面 */
.action-buttons {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 10px;
}
.action-buttons :deep(.el-button:not(.is-link)) {
font-weight: 700;
padding: 7px 16px;
}
.action-buttons :deep(.el-button:first-child:not(.is-link)) {
flex: 0 0 72px;
padding: 7px 0;
}
.action-buttons :deep(.el-button.is-link) {
flex: 0 0 auto;
height: auto;
padding: 0;
font-weight: 600;
}
.muted {
color: #94a3b8;
font-size: 13px;
}
/* ---------- 移动端适配卡片 ---------- */
.mobile-cards {
display: none;
padding: 12px;
}
.order-card {
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 16px;
background: #ffffff;
cursor: pointer;
transition: all 0.2s ease;
margin-bottom: 12px;
}
.order-card:hover {
border-color: #ffd4b0;
box-shadow: 0 4px 14px rgba(255, 106, 0, 0.08);
}
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
}
.order-no-row {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.card-title {
font-size: 15px;
font-weight: 700;
color: #0f172a;
margin-bottom: 12px;
line-height: 1.4;
}
.card-meta {
display: grid;
gap: 8px;
margin-bottom: 12px;
padding-bottom: 12px;
border-bottom: 1px solid #f1f5f9;
}
.meta-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.meta-label {
font-size: 13px;
color: #64748b;
}
.meta-value {
display: flex;
flex-direction: column;
align-items: flex-end;
font-size: 13px;
color: #334155;
font-weight: 600;
}
.meta-value em {
font-style: normal;
font-size: 11px;
color: #2563eb;
}
.meta-value.amount {
color: #ea580c;
font-weight: 800;
font-size: 15px;
}
.card-footer {
display: flex;
align-items: center;
justify-content: space-between;
}
.status-info {
display: flex;
flex-direction: column;
gap: 4px;
}
.status-label {
font-size: 13px;
font-weight: 700;
color: #0f172a;
}
.crash-status {
display: inline-flex;
padding: 2px 8px;
border-radius: 999px;
font-size: 12px;
font-weight: 700;
background: #f1f5f9;
color: #64748b;
}
.crash-status.pending_payment {
background: #fff7ed;
color: #ea580c;
}
.crash-status.paid {
background: #ecfdf5;
color: #059669;
}
.crash-status.receiving {
background: #fff7ed;
color: #d97706;
}
.crash-status.completed {
background: #eff6ff;
color: #2563eb;
}
.crash-status.cancelled,
.crash-status.refunded {
background: #f8fafc;
color: #94a3b8;
}
.crash-card-body {
display: grid;
grid-template-columns: 60px 1fr;
gap: 12px;
}
@media (max-width: 960px) {
.orders-hero-header {
flex-direction: column;
align-items: flex-start;
gap: 14px;
}
.orders-search-box {
width: 100%;
}
.orders-table {
display: none;
}
.mobile-cards {
display: block;
}
}