settlement-card.scss 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. @use '../../styles/_ios-theme.scss' as *;
  2. :host {
  3. display: block;
  4. height: 100%;
  5. }
  6. // 全局 Material Tooltip 样式修复
  7. ::ng-deep {
  8. .mat-mdc-tooltip {
  9. font-size: 12px !important;
  10. background-color: rgba(97, 97, 97, 0.95) !important;
  11. color: white !important;
  12. padding: 6px 12px !important;
  13. border-radius: 4px !important;
  14. max-width: 250px !important;
  15. word-wrap: break-word !important;
  16. z-index: 9999 !important; // 确保 tooltip 在最上层
  17. pointer-events: none !important; // tooltip 不影响鼠标事件
  18. }
  19. .mat-mdc-tooltip-panel {
  20. pointer-events: none !important;
  21. }
  22. // 确保 Material 按钮内的内容正确显示
  23. .mat-mdc-button,
  24. .mat-mdc-raised-button,
  25. .mat-mdc-outlined-button,
  26. .mat-mdc-unelevated-button,
  27. .mat-mdc-icon-button {
  28. overflow: hidden !important; // 防止按钮内容溢出
  29. .mdc-button__label {
  30. display: inline-flex !important;
  31. align-items: center !important;
  32. gap: 4px !important;
  33. position: relative !important;
  34. z-index: 1 !important;
  35. overflow: hidden !important;
  36. text-overflow: ellipsis !important;
  37. white-space: nowrap !important;
  38. }
  39. // 确保按钮 ripple 效果不会导致内容显示问题
  40. .mat-mdc-button-persistent-ripple,
  41. .mat-ripple-element {
  42. z-index: 0 !important;
  43. }
  44. }
  45. // 修复 settlement-card 中的 Material 按钮样式
  46. .settlement-card {
  47. .mat-mdc-button,
  48. .mat-mdc-raised-button,
  49. .mat-mdc-outlined-button {
  50. min-width: 70px !important;
  51. height: 32px !important;
  52. line-height: 32px !important;
  53. span {
  54. line-height: normal !important;
  55. }
  56. }
  57. }
  58. }
  59. .settlement-card {
  60. background: white;
  61. border-radius: 12px;
  62. padding: 20px;
  63. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  64. border: 1px solid $ios-border;
  65. // 统计概览
  66. .stats-overview {
  67. margin-bottom: 24px;
  68. .stats-title {
  69. display: flex;
  70. align-items: center;
  71. gap: 8px;
  72. margin-bottom: 16px;
  73. font-size: 18px;
  74. font-weight: $ios-font-weight-semibold;
  75. color: $ios-text-primary;
  76. mat-icon {
  77. color: $ios-primary;
  78. font-size: 20px;
  79. width: 20px;
  80. height: 20px;
  81. }
  82. }
  83. .stats-grid {
  84. display: grid;
  85. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  86. gap: 16px;
  87. .stat-item {
  88. background: #f8f9fa;
  89. border-radius: 8px;
  90. padding: 16px;
  91. text-align: center;
  92. border: 1px solid $ios-border;
  93. &.total {
  94. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  95. color: white;
  96. border: none;
  97. }
  98. &.pending {
  99. background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  100. color: #8b4513;
  101. border: none;
  102. }
  103. &.overdue {
  104. background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  105. color: #d63384;
  106. border: none;
  107. }
  108. &.completed {
  109. background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  110. color: #198754;
  111. border: none;
  112. }
  113. .stat-value {
  114. font-size: 20px;
  115. font-weight: $ios-font-weight-bold;
  116. margin-bottom: 4px;
  117. }
  118. .stat-label {
  119. font-size: 12px;
  120. opacity: 0.8;
  121. }
  122. }
  123. }
  124. }
  125. // 筛选区域
  126. .filter-section {
  127. display: flex;
  128. justify-content: space-between;
  129. align-items: center;
  130. margin-bottom: 20px;
  131. gap: 16px;
  132. .search-box {
  133. display: flex;
  134. align-items: center;
  135. background: #f8f9fa;
  136. border-radius: 20px;
  137. padding: 8px 16px;
  138. flex: 1;
  139. max-width: 300px;
  140. border: 1px solid $ios-border;
  141. mat-icon {
  142. color: $ios-text-secondary;
  143. margin-right: 8px;
  144. font-size: 18px;
  145. width: 18px;
  146. height: 18px;
  147. }
  148. input {
  149. border: none;
  150. background: transparent;
  151. outline: none;
  152. flex: 1;
  153. font-size: 14px;
  154. color: $ios-text-primary;
  155. &::placeholder {
  156. color: $ios-text-secondary;
  157. }
  158. }
  159. }
  160. .filter-buttons {
  161. display: flex;
  162. gap: 8px;
  163. .filter-btn {
  164. padding: 6px 16px;
  165. border: 1px solid $ios-border;
  166. background: white;
  167. border-radius: 16px;
  168. font-size: 13px;
  169. cursor: pointer;
  170. transition: all 0.2s ease;
  171. color: $ios-text-secondary;
  172. &:hover {
  173. background: #f8f9fa;
  174. border-color: $ios-primary;
  175. }
  176. &.active {
  177. background: $ios-primary;
  178. color: white;
  179. border-color: $ios-primary;
  180. }
  181. &.overdue.active {
  182. background: #dc3545;
  183. border-color: #dc3545;
  184. }
  185. }
  186. }
  187. }
  188. // 结算列表
  189. .settlement-list {
  190. .list-header {
  191. display: grid;
  192. grid-template-columns: 2fr 1fr 1fr 2fr 1fr;
  193. gap: 16px;
  194. padding: 12px 16px;
  195. background: #f8f9fa;
  196. border-radius: 8px;
  197. font-weight: $ios-font-weight-semibold;
  198. font-size: 13px;
  199. color: $ios-text-secondary;
  200. margin-bottom: 8px;
  201. span {
  202. text-align: left;
  203. &.col-amount,
  204. &.col-date {
  205. text-align: center;
  206. }
  207. &.col-actions {
  208. text-align: center;
  209. }
  210. }
  211. }
  212. .list-body {
  213. .settlement-item {
  214. display: grid;
  215. grid-template-columns: 2fr 1fr 1fr minmax(200px, 2fr) 1fr;
  216. gap: 16px;
  217. padding: 16px;
  218. border: 1px solid $ios-border;
  219. border-radius: 8px;
  220. margin-bottom: 8px;
  221. background: white;
  222. transition: all 0.2s ease;
  223. min-height: 80px;
  224. align-items: center;
  225. &:hover {
  226. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  227. border-color: $ios-primary;
  228. }
  229. // 项目信息列
  230. .col-project {
  231. display: flex;
  232. flex-direction: column;
  233. gap: 4px;
  234. min-width: 0; // 防止文本溢出
  235. .project-name {
  236. font-weight: $ios-font-weight-semibold;
  237. color: $ios-text-primary;
  238. font-size: 14px;
  239. line-height: 1.4;
  240. word-break: break-word;
  241. overflow: hidden;
  242. text-overflow: ellipsis;
  243. display: -webkit-box;
  244. -webkit-line-clamp: 2;
  245. line-clamp: 2; /* 标准属性,用于兼容性 */
  246. -webkit-box-orient: vertical;
  247. }
  248. .stage-name {
  249. font-size: 12px;
  250. color: $ios-text-secondary;
  251. background: rgba($ios-primary, 0.1);
  252. padding: 2px 6px;
  253. border-radius: 4px;
  254. display: inline-block;
  255. width: fit-content;
  256. max-width: 100%;
  257. overflow: hidden;
  258. text-overflow: ellipsis;
  259. white-space: nowrap;
  260. }
  261. }
  262. // 金额列
  263. .col-amount {
  264. text-align: center;
  265. display: flex;
  266. flex-direction: column;
  267. gap: 2px;
  268. .amount {
  269. font-weight: $ios-font-weight-semibold;
  270. color: $ios-text-primary;
  271. font-size: 14px;
  272. }
  273. .percentage {
  274. font-size: 11px;
  275. color: $ios-text-secondary;
  276. background: rgba($ios-primary, 0.1);
  277. padding: 1px 4px;
  278. border-radius: 3px;
  279. display: inline-block;
  280. }
  281. }
  282. // 状态列
  283. .col-status {
  284. display: flex;
  285. flex-direction: column;
  286. align-items: center;
  287. gap: 4px;
  288. .status-badge {
  289. padding: 4px 8px;
  290. border-radius: 12px;
  291. font-size: 11px;
  292. font-weight: $ios-font-weight-medium;
  293. text-align: center;
  294. white-space: nowrap;
  295. min-width: 60px;
  296. &.pending {
  297. background: rgba(255, 193, 7, 0.1);
  298. color: #f57c00;
  299. border: 1px solid rgba(255, 193, 7, 0.3);
  300. }
  301. &.completed {
  302. background: rgba(76, 175, 80, 0.1);
  303. color: #388e3c;
  304. border: 1px solid rgba(76, 175, 80, 0.3);
  305. }
  306. &.overdue {
  307. background: rgba(244, 67, 54, 0.1);
  308. color: #d32f2f;
  309. border: 1px solid rgba(244, 67, 54, 0.3);
  310. }
  311. }
  312. .overdue-days {
  313. font-size: 10px;
  314. color: #d32f2f;
  315. background: rgba(244, 67, 54, 0.1);
  316. padding: 2px 6px;
  317. border-radius: 8px;
  318. white-space: nowrap;
  319. }
  320. .auto-process-btn {
  321. margin-top: 4px;
  322. width: 32px;
  323. height: 32px;
  324. min-width: 32px;
  325. mat-icon {
  326. font-size: 16px;
  327. width: 16px;
  328. height: 16px;
  329. }
  330. }
  331. }
  332. // 操作列 - 重点修复区域
  333. .col-actions {
  334. display: flex;
  335. justify-content: center;
  336. align-items: center;
  337. min-width: 200px;
  338. max-width: 100%;
  339. position: relative; // 添加相对定位
  340. overflow: visible; // 确保 tooltip 可以显示
  341. .action-buttons {
  342. display: flex;
  343. flex-wrap: wrap;
  344. gap: 6px;
  345. justify-content: center;
  346. align-items: center;
  347. width: 100%;
  348. position: relative; // 添加相对定位
  349. z-index: 1; // 确保按钮在正确的层级
  350. button {
  351. font-size: 11px;
  352. padding: 6px 12px;
  353. min-width: 70px;
  354. height: 32px;
  355. border-radius: 6px;
  356. transition: all 0.2s ease;
  357. position: relative;
  358. overflow: hidden; // 保持 hidden 防止内容溢出
  359. white-space: nowrap;
  360. display: inline-flex;
  361. align-items: center;
  362. justify-content: center;
  363. line-height: 1;
  364. // 防止按钮内容溢出
  365. span {
  366. display: inline-flex;
  367. align-items: center;
  368. max-width: 100%;
  369. overflow: hidden;
  370. text-overflow: ellipsis;
  371. white-space: nowrap;
  372. position: relative;
  373. z-index: 1;
  374. line-height: 1.2;
  375. }
  376. mat-icon {
  377. font-size: 14px;
  378. width: 14px;
  379. height: 14px;
  380. margin-right: 4px;
  381. vertical-align: middle;
  382. flex-shrink: 0; // 防止图标被压缩
  383. }
  384. mat-spinner {
  385. margin-right: 4px;
  386. vertical-align: middle;
  387. flex-shrink: 0; // 防止 spinner 被压缩
  388. }
  389. // 悬浮效果优化
  390. &:hover:not(:disabled) {
  391. transform: translateY(-1px);
  392. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  393. z-index: 2; // 提升 z-index 确保悬浮时按钮在最上层
  394. // 确保悬浮时文字清晰可见
  395. span {
  396. opacity: 1;
  397. color: inherit;
  398. }
  399. }
  400. &:disabled {
  401. opacity: 0.6;
  402. cursor: not-allowed;
  403. transform: none;
  404. box-shadow: none;
  405. }
  406. // 特定按钮样式
  407. &.acceptance-btn {
  408. background: rgba(33, 150, 243, 0.1);
  409. border-color: rgba(33, 150, 243, 0.3);
  410. color: #1976d2;
  411. &:hover:not(:disabled) {
  412. background: rgba(33, 150, 243, 0.2);
  413. border-color: #1976d2;
  414. }
  415. }
  416. &.reminder-btn {
  417. background: rgba(255, 152, 0, 0.1);
  418. border-color: rgba(255, 152, 0, 0.3);
  419. color: #f57c00;
  420. &:hover:not(:disabled) {
  421. background: rgba(255, 152, 0, 0.2);
  422. border-color: #f57c00;
  423. }
  424. }
  425. &.wechat-send-btn {
  426. background: #1976d2;
  427. color: white;
  428. border: none;
  429. &:hover:not(:disabled) {
  430. background: #1565c0;
  431. }
  432. }
  433. &.process-btn {
  434. background: #4caf50;
  435. color: white;
  436. border: none;
  437. &:hover:not(:disabled) {
  438. background: #45a049;
  439. }
  440. }
  441. }
  442. }
  443. }
  444. // 日期列
  445. .col-date {
  446. text-align: center;
  447. display: flex;
  448. flex-direction: column;
  449. gap: 2px;
  450. .settled-date,
  451. .due-date {
  452. font-size: 12px;
  453. color: $ios-text-primary;
  454. font-weight: $ios-font-weight-medium;
  455. }
  456. .date-label {
  457. font-size: 10px;
  458. color: $ios-text-secondary;
  459. }
  460. }
  461. // 状态相关的行样式
  462. &.pending {
  463. border-left: 4px solid #ff9800;
  464. }
  465. &.completed {
  466. border-left: 4px solid #4caf50;
  467. opacity: 0.8;
  468. }
  469. &.overdue {
  470. border-left: 4px solid #f44336;
  471. background: rgba(244, 67, 54, 0.02);
  472. }
  473. }
  474. }
  475. // 空状态
  476. .empty-state {
  477. text-align: center;
  478. padding: 40px 20px;
  479. color: $ios-text-secondary;
  480. .empty-icon {
  481. font-size: 48px;
  482. margin-bottom: 16px;
  483. }
  484. .empty-title {
  485. font-size: 16px;
  486. font-weight: $ios-font-weight-semibold;
  487. color: $ios-text-primary;
  488. margin-bottom: 8px;
  489. }
  490. .empty-desc {
  491. font-size: 14px;
  492. line-height: 1.5;
  493. }
  494. }
  495. }
  496. }
  497. // 自动化控制头部样式
  498. .automation-header {
  499. display: flex;
  500. justify-content: space-between;
  501. align-items: center;
  502. padding: 16px 20px;
  503. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  504. border-radius: 12px;
  505. margin-bottom: 20px;
  506. color: white;
  507. .automation-title {
  508. display: flex;
  509. align-items: center;
  510. gap: 8px;
  511. font-weight: 600;
  512. font-size: 16px;
  513. mat-icon {
  514. font-size: 20px;
  515. width: 20px;
  516. height: 20px;
  517. }
  518. }
  519. .automation-actions {
  520. display: flex;
  521. gap: 12px;
  522. align-items: center;
  523. button {
  524. border-radius: 20px;
  525. font-weight: 500;
  526. display: flex;
  527. align-items: center;
  528. gap: 8px;
  529. background: rgba(255, 255, 255, 0.2);
  530. backdrop-filter: blur(10px);
  531. border: 1px solid rgba(255, 255, 255, 0.3);
  532. color: white;
  533. &:hover:not(:disabled) {
  534. background: rgba(255, 255, 255, 0.3);
  535. }
  536. &:disabled {
  537. opacity: 0.6;
  538. }
  539. mat-spinner {
  540. margin-right: 4px;
  541. }
  542. }
  543. }
  544. }
  545. // 响应式设计
  546. @media (max-width: 768px) {
  547. .settlement-card {
  548. .stats-overview .stats-grid {
  549. grid-template-columns: repeat(2, 1fr);
  550. }
  551. .filter-section {
  552. flex-direction: column;
  553. align-items: stretch;
  554. gap: 12px;
  555. .search-box {
  556. max-width: none;
  557. }
  558. .filter-buttons {
  559. justify-content: center;
  560. flex-wrap: wrap;
  561. }
  562. }
  563. .settlement-list {
  564. .list-header {
  565. display: none;
  566. }
  567. .list-body .settlement-item {
  568. grid-template-columns: 1fr;
  569. gap: 12px;
  570. .col-actions .action-buttons {
  571. flex-direction: row;
  572. justify-content: center;
  573. flex-wrap: wrap;
  574. button {
  575. width: auto;
  576. min-width: 100px;
  577. }
  578. }
  579. }
  580. }
  581. }
  582. }