settlement-card.scss 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. @use '../../styles/_ios-theme.scss' as *;
  2. :host {
  3. display: block;
  4. height: 100%;
  5. }
  6. .settlement-card {
  7. background: white;
  8. border-radius: 12px;
  9. padding: 20px;
  10. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  11. border: 1px solid $ios-border;
  12. // 统计数据概览
  13. .stats-overview {
  14. margin-bottom: 24px;
  15. h4 {
  16. margin: 0 0 16px 0;
  17. font-size: 18px;
  18. font-weight: $ios-font-weight-semibold;
  19. color: $ios-text-primary;
  20. }
  21. .stats-grid {
  22. display: grid;
  23. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  24. gap: 16px;
  25. .stat-item {
  26. background: #f8f9fa;
  27. border-radius: 8px;
  28. padding: 16px;
  29. text-align: center;
  30. border: 1px solid $ios-border;
  31. &.total {
  32. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  33. color: white;
  34. border: none;
  35. }
  36. &.pending {
  37. background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  38. color: #8b4513;
  39. }
  40. &.overdue {
  41. background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  42. color: #dc3545;
  43. }
  44. &.completed {
  45. background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  46. color: #28a745;
  47. }
  48. .stat-value {
  49. font-size: 24px;
  50. font-weight: $ios-font-weight-bold;
  51. margin-bottom: 4px;
  52. }
  53. .stat-label {
  54. font-size: 12px;
  55. opacity: 0.8;
  56. }
  57. }
  58. }
  59. }
  60. // 筛选和搜索区域
  61. .filter-section {
  62. margin-bottom: 20px;
  63. display: flex;
  64. flex-direction: column;
  65. gap: 16px;
  66. .search-bar {
  67. width: 100%;
  68. .search-input {
  69. width: 100%;
  70. padding: 10px 16px;
  71. border: 1px solid $ios-border;
  72. border-radius: 8px;
  73. font-size: 14px;
  74. background: white;
  75. transition: border-color 0.2s ease;
  76. box-sizing: border-box;
  77. &:focus {
  78. outline: none;
  79. border-color: $ios-primary;
  80. box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
  81. }
  82. &::placeholder {
  83. color: $ios-text-secondary;
  84. }
  85. }
  86. }
  87. .filter-buttons {
  88. display: flex;
  89. gap: 8px;
  90. flex-wrap: wrap;
  91. width: 100%;
  92. justify-content: flex-start;
  93. .filter-btn {
  94. padding: 8px 16px;
  95. border: 1px solid $ios-border;
  96. border-radius: 20px;
  97. background: white;
  98. color: $ios-text-secondary;
  99. font-size: 14px;
  100. cursor: pointer;
  101. transition: all 0.2s ease;
  102. white-space: nowrap; // 防止按钮文字换行
  103. &:hover {
  104. background: #f8f9fa;
  105. }
  106. &.active {
  107. background: $ios-primary;
  108. color: white;
  109. border-color: $ios-primary;
  110. }
  111. &.pending.active {
  112. background: #ff9500;
  113. border-color: #ff9500;
  114. }
  115. &.overdue.active {
  116. background: #dc3545;
  117. border-color: #dc3545;
  118. }
  119. &.completed.active {
  120. background: #28a745;
  121. border-color: #28a745;
  122. }
  123. }
  124. }
  125. }
  126. // 结算列表
  127. .settlements-list {
  128. .list-header {
  129. display: grid;
  130. grid-template-columns: 2fr 1fr 1fr 1fr;
  131. gap: 16px;
  132. padding: 12px 16px;
  133. background: #f8f9fa;
  134. border-radius: 8px;
  135. font-weight: $ios-font-weight-semibold;
  136. color: $ios-text-secondary;
  137. font-size: 12px;
  138. text-transform: uppercase;
  139. letter-spacing: 0.5px;
  140. margin-bottom: 8px;
  141. }
  142. .list-body {
  143. .settlement-item {
  144. display: grid;
  145. grid-template-columns: 2fr 1fr 1fr 1fr;
  146. gap: 16px;
  147. padding: 16px;
  148. border: 1px solid $ios-border;
  149. border-radius: 8px;
  150. margin-bottom: 8px;
  151. background: white;
  152. transition: all 0.2s ease;
  153. &:hover {
  154. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  155. transform: translateY(-1px);
  156. }
  157. &.overdue {
  158. border-left: 4px solid #dc3545;
  159. background: #fff5f5;
  160. }
  161. &.pending {
  162. border-left: 4px solid #ff9500;
  163. }
  164. &.completed {
  165. border-left: 4px solid #28a745;
  166. background: #f8fff9;
  167. }
  168. .col-project {
  169. .project-name {
  170. font-weight: $ios-font-weight-semibold;
  171. color: $ios-text-primary;
  172. margin-bottom: 4px;
  173. }
  174. .stage-name {
  175. font-size: 12px;
  176. color: $ios-text-secondary;
  177. }
  178. }
  179. .col-amount {
  180. .amount {
  181. font-weight: $ios-font-weight-bold;
  182. color: $ios-primary;
  183. font-size: 16px;
  184. }
  185. .percentage {
  186. font-size: 12px;
  187. color: $ios-text-secondary;
  188. margin-top: 2px;
  189. }
  190. }
  191. .col-status {
  192. .status-badge {
  193. display: inline-block;
  194. padding: 4px 8px;
  195. border-radius: 12px;
  196. font-size: 12px;
  197. font-weight: $ios-font-weight-medium;
  198. &.pending {
  199. background: rgba(255, 149, 0, 0.1);
  200. color: #ff9500;
  201. }
  202. &.overdue {
  203. background: rgba(220, 53, 69, 0.1);
  204. color: #dc3545;
  205. }
  206. &.completed {
  207. background: rgba(40, 167, 69, 0.1);
  208. color: #28a745;
  209. }
  210. }
  211. .overdue-days {
  212. font-size: 11px;
  213. color: #dc3545;
  214. margin-top: 4px;
  215. font-weight: $ios-font-weight-medium;
  216. }
  217. }
  218. .col-date {
  219. text-align: right;
  220. .settled-date,
  221. .due-date {
  222. font-weight: $ios-font-weight-medium;
  223. color: $ios-text-primary;
  224. }
  225. .date-label {
  226. font-size: 11px;
  227. color: $ios-text-secondary;
  228. margin-top: 2px;
  229. }
  230. }
  231. }
  232. }
  233. }
  234. // 空状态
  235. .empty-state {
  236. text-align: center;
  237. padding: 40px 20px;
  238. color: $ios-text-secondary;
  239. .empty-icon {
  240. font-size: 48px;
  241. margin-bottom: 16px;
  242. opacity: 0.5;
  243. }
  244. .empty-title {
  245. font-size: 16px;
  246. font-weight: $ios-font-weight-semibold;
  247. color: $ios-text-primary;
  248. margin-bottom: 8px;
  249. }
  250. .empty-desc {
  251. font-size: 14px;
  252. line-height: 1.4;
  253. }
  254. }
  255. }
  256. // 响应式设计
  257. @media (max-width: 768px) {
  258. .settlement-card {
  259. .stats-overview .stats-grid {
  260. grid-template-columns: repeat(2, 1fr);
  261. }
  262. .filter-section {
  263. .filter-buttons {
  264. justify-content: center;
  265. }
  266. }
  267. .settlements-list {
  268. .list-header {
  269. display: none;
  270. }
  271. .list-body .settlement-item {
  272. grid-template-columns: 1fr;
  273. gap: 8px;
  274. .col-project,
  275. .col-amount,
  276. .col-status,
  277. .col-date {
  278. display: flex;
  279. justify-content: space-between;
  280. align-items: center;
  281. }
  282. }
  283. }
  284. }
  285. }