123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676 |
- @use '../../styles/_ios-theme.scss' as *;
- :host {
- display: block;
- height: 100%;
- }
- // 全局 Material Tooltip 样式修复
- ::ng-deep {
- .mat-mdc-tooltip {
- font-size: 12px !important;
- background-color: rgba(97, 97, 97, 0.95) !important;
- color: white !important;
- padding: 6px 12px !important;
- border-radius: 4px !important;
- max-width: 250px !important;
- word-wrap: break-word !important;
- z-index: 9999 !important; // 确保 tooltip 在最上层
- pointer-events: none !important; // tooltip 不影响鼠标事件
- }
- .mat-mdc-tooltip-panel {
- pointer-events: none !important;
- }
- // 确保 Material 按钮内的内容正确显示
- .mat-mdc-button,
- .mat-mdc-raised-button,
- .mat-mdc-outlined-button,
- .mat-mdc-unelevated-button,
- .mat-mdc-icon-button {
- overflow: hidden !important; // 防止按钮内容溢出
-
- .mdc-button__label {
- display: inline-flex !important;
- align-items: center !important;
- gap: 4px !important;
- position: relative !important;
- z-index: 1 !important;
- overflow: hidden !important;
- text-overflow: ellipsis !important;
- white-space: nowrap !important;
- }
-
- // 确保按钮 ripple 效果不会导致内容显示问题
- .mat-mdc-button-persistent-ripple,
- .mat-ripple-element {
- z-index: 0 !important;
- }
- }
-
- // 修复 settlement-card 中的 Material 按钮样式
- .settlement-card {
- .mat-mdc-button,
- .mat-mdc-raised-button,
- .mat-mdc-outlined-button {
- min-width: 70px !important;
- height: 32px !important;
- line-height: 32px !important;
-
- span {
- line-height: normal !important;
- }
- }
- }
- }
- .settlement-card {
- background: white;
- border-radius: 12px;
- padding: 20px;
- box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
- border: 1px solid $ios-border;
- // 统计概览
- .stats-overview {
- margin-bottom: 24px;
- .stats-title {
- display: flex;
- align-items: center;
- gap: 8px;
- margin-bottom: 16px;
- font-size: 18px;
- font-weight: $ios-font-weight-semibold;
- color: $ios-text-primary;
- mat-icon {
- color: $ios-primary;
- font-size: 20px;
- width: 20px;
- height: 20px;
- }
- }
- .stats-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
- gap: 16px;
- .stat-item {
- background: #f8f9fa;
- border-radius: 8px;
- padding: 16px;
- text-align: center;
- border: 1px solid $ios-border;
- &.total {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- color: white;
- border: none;
- }
- &.pending {
- background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
- color: #8b4513;
- border: none;
- }
- &.overdue {
- background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
- color: #d63384;
- border: none;
- }
- &.completed {
- background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
- color: #198754;
- border: none;
- }
- .stat-value {
- font-size: 20px;
- font-weight: $ios-font-weight-bold;
- margin-bottom: 4px;
- }
- .stat-label {
- font-size: 12px;
- opacity: 0.8;
- }
- }
- }
- }
- // 筛选区域
- .filter-section {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20px;
- gap: 16px;
- .search-box {
- display: flex;
- align-items: center;
- background: #f8f9fa;
- border-radius: 20px;
- padding: 8px 16px;
- flex: 1;
- max-width: 300px;
- border: 1px solid $ios-border;
- mat-icon {
- color: $ios-text-secondary;
- margin-right: 8px;
- font-size: 18px;
- width: 18px;
- height: 18px;
- }
- input {
- border: none;
- background: transparent;
- outline: none;
- flex: 1;
- font-size: 14px;
- color: $ios-text-primary;
- &::placeholder {
- color: $ios-text-secondary;
- }
- }
- }
- .filter-buttons {
- display: flex;
- gap: 8px;
- .filter-btn {
- padding: 6px 16px;
- border: 1px solid $ios-border;
- background: white;
- border-radius: 16px;
- font-size: 13px;
- cursor: pointer;
- transition: all 0.2s ease;
- color: $ios-text-secondary;
- &:hover {
- background: #f8f9fa;
- border-color: $ios-primary;
- }
- &.active {
- background: $ios-primary;
- color: white;
- border-color: $ios-primary;
- }
- &.overdue.active {
- background: #dc3545;
- border-color: #dc3545;
- }
- }
- }
- }
- // 结算列表
- .settlement-list {
- .list-header {
- display: grid;
- grid-template-columns: 2fr 1fr 1fr 2fr 1fr;
- gap: 16px;
- padding: 12px 16px;
- background: #f8f9fa;
- border-radius: 8px;
- font-weight: $ios-font-weight-semibold;
- font-size: 13px;
- color: $ios-text-secondary;
- margin-bottom: 8px;
-
- span {
- text-align: left;
-
- &.col-amount,
- &.col-date {
- text-align: center;
- }
-
- &.col-actions {
- text-align: center;
- }
- }
- }
-
- .list-body {
- .settlement-item {
- display: grid;
- grid-template-columns: 2fr 1fr 1fr minmax(200px, 2fr) 1fr;
- gap: 16px;
- padding: 16px;
- border: 1px solid $ios-border;
- border-radius: 8px;
- margin-bottom: 8px;
- background: white;
- transition: all 0.2s ease;
- min-height: 80px;
- align-items: center;
-
- &:hover {
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
- border-color: $ios-primary;
- }
-
- // 项目信息列
- .col-project {
- display: flex;
- flex-direction: column;
- gap: 4px;
- min-width: 0; // 防止文本溢出
-
- .project-name {
- font-weight: $ios-font-weight-semibold;
- color: $ios-text-primary;
- font-size: 14px;
- line-height: 1.4;
- word-break: break-word;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- line-clamp: 2; /* 标准属性,用于兼容性 */
- -webkit-box-orient: vertical;
- }
-
- .stage-name {
- font-size: 12px;
- color: $ios-text-secondary;
- background: rgba($ios-primary, 0.1);
- padding: 2px 6px;
- border-radius: 4px;
- display: inline-block;
- width: fit-content;
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
-
- // 金额列
- .col-amount {
- text-align: center;
- display: flex;
- flex-direction: column;
- gap: 2px;
-
- .amount {
- font-weight: $ios-font-weight-semibold;
- color: $ios-text-primary;
- font-size: 14px;
- }
-
- .percentage {
- font-size: 11px;
- color: $ios-text-secondary;
- background: rgba($ios-primary, 0.1);
- padding: 1px 4px;
- border-radius: 3px;
- display: inline-block;
- }
- }
-
- // 状态列
- .col-status {
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 4px;
-
- .status-badge {
- padding: 4px 8px;
- border-radius: 12px;
- font-size: 11px;
- font-weight: $ios-font-weight-medium;
- text-align: center;
- white-space: nowrap;
- min-width: 60px;
-
- &.pending {
- background: rgba(255, 193, 7, 0.1);
- color: #f57c00;
- border: 1px solid rgba(255, 193, 7, 0.3);
- }
-
- &.completed {
- background: rgba(76, 175, 80, 0.1);
- color: #388e3c;
- border: 1px solid rgba(76, 175, 80, 0.3);
- }
-
- &.overdue {
- background: rgba(244, 67, 54, 0.1);
- color: #d32f2f;
- border: 1px solid rgba(244, 67, 54, 0.3);
- }
- }
-
- .overdue-days {
- font-size: 10px;
- color: #d32f2f;
- background: rgba(244, 67, 54, 0.1);
- padding: 2px 6px;
- border-radius: 8px;
- white-space: nowrap;
- }
-
- .auto-process-btn {
- margin-top: 4px;
- width: 32px;
- height: 32px;
- min-width: 32px;
-
- mat-icon {
- font-size: 16px;
- width: 16px;
- height: 16px;
- }
- }
- }
-
- // 操作列 - 重点修复区域
- .col-actions {
- display: flex;
- justify-content: center;
- align-items: center;
- min-width: 200px;
- max-width: 100%;
- position: relative; // 添加相对定位
- overflow: visible; // 确保 tooltip 可以显示
-
- .action-buttons {
- display: flex;
- flex-wrap: wrap;
- gap: 6px;
- justify-content: center;
- align-items: center;
- width: 100%;
- position: relative; // 添加相对定位
- z-index: 1; // 确保按钮在正确的层级
-
- button {
- font-size: 11px;
- padding: 6px 12px;
- min-width: 70px;
- height: 32px;
- border-radius: 6px;
- transition: all 0.2s ease;
- position: relative;
- overflow: hidden; // 保持 hidden 防止内容溢出
- white-space: nowrap;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- line-height: 1;
-
- // 防止按钮内容溢出
- span {
- display: inline-flex;
- align-items: center;
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- position: relative;
- z-index: 1;
- line-height: 1.2;
- }
- mat-icon {
- font-size: 14px;
- width: 14px;
- height: 14px;
- margin-right: 4px;
- vertical-align: middle;
- flex-shrink: 0; // 防止图标被压缩
- }
- mat-spinner {
- margin-right: 4px;
- vertical-align: middle;
- flex-shrink: 0; // 防止 spinner 被压缩
- }
- // 悬浮效果优化
- &:hover:not(:disabled) {
- transform: translateY(-1px);
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
- z-index: 2; // 提升 z-index 确保悬浮时按钮在最上层
-
- // 确保悬浮时文字清晰可见
- span {
- opacity: 1;
- color: inherit;
- }
- }
- &:disabled {
- opacity: 0.6;
- cursor: not-allowed;
- transform: none;
- box-shadow: none;
- }
- // 特定按钮样式
- &.acceptance-btn {
- background: rgba(33, 150, 243, 0.1);
- border-color: rgba(33, 150, 243, 0.3);
- color: #1976d2;
- &:hover:not(:disabled) {
- background: rgba(33, 150, 243, 0.2);
- border-color: #1976d2;
- }
- }
- &.reminder-btn {
- background: rgba(255, 152, 0, 0.1);
- border-color: rgba(255, 152, 0, 0.3);
- color: #f57c00;
- &:hover:not(:disabled) {
- background: rgba(255, 152, 0, 0.2);
- border-color: #f57c00;
- }
- }
- &.wechat-send-btn {
- background: #1976d2;
- color: white;
- border: none;
- &:hover:not(:disabled) {
- background: #1565c0;
- }
- }
- &.process-btn {
- background: #4caf50;
- color: white;
- border: none;
- &:hover:not(:disabled) {
- background: #45a049;
- }
- }
- }
- }
- }
-
- // 日期列
- .col-date {
- text-align: center;
- display: flex;
- flex-direction: column;
- gap: 2px;
-
- .settled-date,
- .due-date {
- font-size: 12px;
- color: $ios-text-primary;
- font-weight: $ios-font-weight-medium;
- }
-
- .date-label {
- font-size: 10px;
- color: $ios-text-secondary;
- }
- }
-
- // 状态相关的行样式
- &.pending {
- border-left: 4px solid #ff9800;
- }
-
- &.completed {
- border-left: 4px solid #4caf50;
- opacity: 0.8;
- }
-
- &.overdue {
- border-left: 4px solid #f44336;
- background: rgba(244, 67, 54, 0.02);
- }
- }
- }
-
- // 空状态
- .empty-state {
- text-align: center;
- padding: 40px 20px;
- color: $ios-text-secondary;
-
- .empty-icon {
- font-size: 48px;
- margin-bottom: 16px;
- }
-
- .empty-title {
- font-size: 16px;
- font-weight: $ios-font-weight-semibold;
- color: $ios-text-primary;
- margin-bottom: 8px;
- }
-
- .empty-desc {
- font-size: 14px;
- line-height: 1.5;
- }
- }
- }
- }
- // 自动化控制头部样式
- .automation-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16px 20px;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 12px;
- margin-bottom: 20px;
- color: white;
-
- .automation-title {
- display: flex;
- align-items: center;
- gap: 8px;
- font-weight: 600;
- font-size: 16px;
-
- mat-icon {
- font-size: 20px;
- width: 20px;
- height: 20px;
- }
- }
-
- .automation-actions {
- display: flex;
- gap: 12px;
- align-items: center;
-
- button {
- border-radius: 20px;
- font-weight: 500;
- display: flex;
- align-items: center;
- gap: 8px;
-
- background: rgba(255, 255, 255, 0.2);
- backdrop-filter: blur(10px);
- border: 1px solid rgba(255, 255, 255, 0.3);
- color: white;
-
- &:hover:not(:disabled) {
- background: rgba(255, 255, 255, 0.3);
- }
-
- &:disabled {
- opacity: 0.6;
- }
- mat-spinner {
- margin-right: 4px;
- }
- }
- }
- }
- // 响应式设计
- @media (max-width: 768px) {
- .settlement-card {
- .stats-overview .stats-grid {
- grid-template-columns: repeat(2, 1fr);
- }
- .filter-section {
- flex-direction: column;
- align-items: stretch;
- gap: 12px;
- .search-box {
- max-width: none;
- }
- .filter-buttons {
- justify-content: center;
- flex-wrap: wrap;
- }
- }
- .settlement-list {
- .list-header {
- display: none;
- }
- .list-body .settlement-item {
- grid-template-columns: 1fr;
- gap: 12px;
- .col-actions .action-buttons {
- flex-direction: row;
- justify-content: center;
- flex-wrap: wrap;
- button {
- width: auto;
- min-width: 100px;
- }
- }
- }
- }
- }
- }
|