consultation-order-panel.component.scss 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. @use 'sass:color';
  2. // iOS风格变量定义
  3. $ios-primary: #007AFF;
  4. $ios-primary-dark: #0062CC;
  5. $ios-secondary: #34C759;
  6. $ios-success: #34C759;
  7. $ios-warning: #FF9500;
  8. $ios-danger: #FF3B30;
  9. $ios-text-primary: #000000;
  10. $ios-text-secondary: #3C3C43;
  11. $ios-text-tertiary: #8E8E93;
  12. $ios-border: #D1D1D6;
  13. $ios-background: #FFFFFF;
  14. $ios-background-secondary: #F2F2F7;
  15. $ios-background-tertiary: #E5E5EA;
  16. $ios-shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  17. $ios-shadow-md: 0 4px 10px rgba(0,0,0,0.1);
  18. $ios-shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  19. $ios-radius: 10px;
  20. $ios-radius-lg: 16px;
  21. $ios-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  22. $ios-font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  23. $ios-spacing-xs: 4px;
  24. $ios-spacing-sm: 8px;
  25. $ios-spacing-md: 16px;
  26. $ios-spacing-lg: 24px;
  27. $ios-spacing-xl: 32px;
  28. // 咨询订单面板样式 - 适配固定区域
  29. .consultation-order-panel {
  30. background: $ios-background;
  31. border-radius: $ios-radius-lg;
  32. box-shadow: $ios-shadow-md;
  33. height: 100%;
  34. max-height: 600px;
  35. display: flex;
  36. flex-direction: column;
  37. font-family: $ios-font-family;
  38. border: 1px solid $ios-border;
  39. overflow: hidden;
  40. // 面板头部
  41. .panel-header {
  42. padding: $ios-spacing-md $ios-spacing-lg;
  43. background: linear-gradient(135deg, $ios-background 0%, $ios-background-secondary 100%);
  44. border-bottom: 1px solid $ios-border;
  45. flex-shrink: 0;
  46. .panel-title {
  47. font-size: 18px;
  48. font-weight: 600;
  49. color: $ios-text-primary;
  50. margin: 0;
  51. }
  52. .panel-subtitle {
  53. font-size: 14px;
  54. color: $ios-text-secondary;
  55. margin: 4px 0 0 0;
  56. }
  57. }
  58. // 可滚动内容区域
  59. .panel-content {
  60. flex: 1;
  61. overflow-y: auto;
  62. padding: $ios-spacing-md $ios-spacing-lg;
  63. // iOS风格滚动条
  64. &::-webkit-scrollbar {
  65. width: 6px;
  66. }
  67. &::-webkit-scrollbar-track {
  68. background: $ios-background-secondary;
  69. border-radius: 3px;
  70. }
  71. &::-webkit-scrollbar-thumb {
  72. background: $ios-text-tertiary;
  73. border-radius: 3px;
  74. &:hover {
  75. background: $ios-text-secondary;
  76. }
  77. }
  78. }
  79. // 客户信息栏
  80. .customer-info-section {
  81. margin-bottom: $ios-spacing-lg;
  82. padding: $ios-spacing-md;
  83. background: $ios-background-secondary;
  84. border-radius: $ios-radius;
  85. border: 1px solid $ios-border;
  86. .section-title {
  87. font-size: 16px;
  88. font-weight: 600;
  89. color: $ios-text-primary;
  90. margin-bottom: $ios-spacing-md;
  91. }
  92. .search-container {
  93. display: flex;
  94. align-items: center;
  95. gap: $ios-spacing-sm;
  96. margin-bottom: $ios-spacing-sm;
  97. .search-input {
  98. flex: 1;
  99. padding: 12px $ios-spacing-md;
  100. border: 2px solid $ios-border;
  101. border-radius: $ios-radius;
  102. font-size: 16px;
  103. background: $ios-background;
  104. transition: $ios-transition;
  105. &:focus {
  106. outline: none;
  107. border-color: $ios-primary;
  108. box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
  109. }
  110. &::placeholder {
  111. color: $ios-text-tertiary;
  112. }
  113. }
  114. .search-btn {
  115. padding: 12px $ios-spacing-md;
  116. background: $ios-primary;
  117. color: $ios-background;
  118. border: none;
  119. border-radius: $ios-radius;
  120. cursor: pointer;
  121. font-size: 16px;
  122. font-weight: 500;
  123. transition: $ios-transition;
  124. &:hover {
  125. background: $ios-primary-dark;
  126. transform: translateY(-1px);
  127. }
  128. &:active {
  129. transform: translateY(0);
  130. }
  131. }
  132. }
  133. .search-results {
  134. max-height: 200px;
  135. overflow-y: auto;
  136. border: 1px solid $ios-border;
  137. border-radius: $ios-radius;
  138. background: $ios-background;
  139. margin-top: $ios-spacing-sm;
  140. .result-item {
  141. padding: $ios-spacing-md;
  142. cursor: pointer;
  143. border-bottom: 1px solid $ios-border;
  144. transition: $ios-transition;
  145. &:hover {
  146. background: $ios-background-secondary;
  147. }
  148. &:last-child {
  149. border-bottom: none;
  150. }
  151. .customer-name {
  152. font-weight: 500;
  153. color: $ios-text-primary;
  154. }
  155. .customer-info {
  156. font-size: 14px;
  157. color: $ios-text-secondary;
  158. margin-top: 2px;
  159. }
  160. }
  161. }
  162. .selected-customer {
  163. padding: $ios-spacing-md;
  164. background: rgba($ios-primary, 0.1);
  165. border-radius: $ios-radius;
  166. border: 1px solid rgba($ios-primary, 0.2);
  167. display: flex;
  168. justify-content: space-between;
  169. align-items: center;
  170. margin-top: $ios-spacing-sm;
  171. .customer-details {
  172. .customer-name {
  173. font-weight: 600;
  174. color: $ios-text-primary;
  175. }
  176. .customer-phone {
  177. font-size: 14px;
  178. color: $ios-text-secondary;
  179. margin-top: 2px;
  180. }
  181. }
  182. .clear-btn {
  183. background: $ios-danger;
  184. color: $ios-background;
  185. border: none;
  186. border-radius: 6px;
  187. padding: 6px 12px;
  188. cursor: pointer;
  189. font-size: 14px;
  190. font-weight: 500;
  191. transition: $ios-transition;
  192. &:hover {
  193. background: color.adjust($ios-danger, $lightness: -10%);
  194. transform: translateY(-1px);
  195. }
  196. }
  197. }
  198. }
  199. // 新客户表单
  200. .new-customer-form {
  201. margin-bottom: $ios-spacing-lg;
  202. padding: $ios-spacing-md;
  203. background: $ios-background-secondary;
  204. border-radius: $ios-radius;
  205. border: 1px solid $ios-border;
  206. .form-title {
  207. font-size: 16px;
  208. font-weight: 600;
  209. margin-bottom: $ios-spacing-md;
  210. color: $ios-text-primary;
  211. }
  212. .form-row {
  213. display: flex;
  214. gap: $ios-spacing-md;
  215. margin-bottom: $ios-spacing-md;
  216. @media (max-width: 768px) {
  217. flex-direction: column;
  218. gap: $ios-spacing-sm;
  219. }
  220. .form-group {
  221. flex: 1;
  222. label {
  223. display: block;
  224. margin-bottom: $ios-spacing-xs;
  225. font-size: 14px;
  226. font-weight: 500;
  227. color: $ios-text-primary;
  228. }
  229. input, select, textarea {
  230. width: 100%;
  231. padding: 12px $ios-spacing-md;
  232. border: 2px solid $ios-border;
  233. border-radius: $ios-radius;
  234. font-size: 16px;
  235. background: $ios-background;
  236. transition: $ios-transition;
  237. box-sizing: border-box;
  238. &:focus {
  239. outline: none;
  240. border-color: $ios-primary;
  241. box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
  242. }
  243. &::placeholder {
  244. color: $ios-text-tertiary;
  245. }
  246. }
  247. textarea {
  248. resize: vertical;
  249. min-height: 80px;
  250. font-family: $ios-font-family;
  251. }
  252. select {
  253. cursor: pointer;
  254. }
  255. }
  256. }
  257. }
  258. // 项目需求卡片
  259. .requirements-card {
  260. background: $ios-background;
  261. border: 1px solid $ios-border;
  262. border-radius: $ios-radius;
  263. margin-bottom: $ios-spacing-md;
  264. overflow: hidden;
  265. .card-header {
  266. padding: $ios-spacing-md;
  267. background: linear-gradient(135deg, $ios-background-secondary 0%, $ios-background-tertiary 100%);
  268. border-bottom: 1px solid $ios-border;
  269. display: flex;
  270. justify-content: space-between;
  271. align-items: center;
  272. cursor: pointer;
  273. transition: $ios-transition;
  274. &:hover {
  275. background: linear-gradient(135deg, $ios-background-tertiary 0%, $ios-border 100%);
  276. }
  277. .card-title {
  278. font-size: 16px;
  279. font-weight: 600;
  280. color: $ios-text-primary;
  281. }
  282. .toggle-icon {
  283. color: $ios-text-secondary;
  284. transition: transform 0.3s ease;
  285. font-size: 18px;
  286. &.expanded {
  287. transform: rotate(180deg);
  288. }
  289. }
  290. }
  291. .card-content {
  292. padding: $ios-spacing-md;
  293. max-height: 500px;
  294. overflow-y: auto;
  295. // iOS风格滚动条
  296. &::-webkit-scrollbar {
  297. width: 6px;
  298. }
  299. &::-webkit-scrollbar-track {
  300. background: $ios-background-secondary;
  301. border-radius: 3px;
  302. }
  303. &::-webkit-scrollbar-thumb {
  304. background: $ios-text-tertiary;
  305. border-radius: 3px;
  306. &:hover {
  307. background: $ios-text-secondary;
  308. }
  309. }
  310. .form-row {
  311. display: flex;
  312. gap: $ios-spacing-md;
  313. margin-bottom: $ios-spacing-md;
  314. // 优化布局:移除字段后调整间距和对齐
  315. &:last-child {
  316. margin-bottom: 0;
  317. }
  318. @media (max-width: 768px) {
  319. flex-direction: column;
  320. gap: $ios-spacing-sm;
  321. }
  322. // 针对不同行数的表单组进行优化
  323. &.two-columns {
  324. .form-group {
  325. flex: 1;
  326. min-width: calc(50% - #{$ios-spacing-md / 2});
  327. }
  328. }
  329. &.three-columns {
  330. .form-group {
  331. flex: 1;
  332. min-width: calc(33.333% - #{$ios-spacing-md * 2 / 3});
  333. }
  334. }
  335. &.single-column {
  336. .form-group {
  337. flex: 1;
  338. width: 100%;
  339. }
  340. }
  341. .form-group {
  342. flex: 1;
  343. label {
  344. display: block;
  345. margin-bottom: $ios-spacing-xs;
  346. font-size: 14px;
  347. font-weight: 500;
  348. color: $ios-text-primary;
  349. }
  350. .required {
  351. color: #ff4444;
  352. font-weight: bold;
  353. }
  354. input, select, textarea {
  355. width: 100%;
  356. padding: 12px $ios-spacing-md;
  357. border: 2px solid $ios-border;
  358. border-radius: $ios-radius;
  359. font-size: 16px;
  360. background: $ios-background;
  361. transition: $ios-transition;
  362. box-sizing: border-box;
  363. &:focus {
  364. outline: none;
  365. border-color: $ios-primary;
  366. box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
  367. }
  368. &::placeholder {
  369. color: $ios-text-tertiary;
  370. }
  371. }
  372. select {
  373. cursor: pointer;
  374. }
  375. }
  376. }
  377. .tags-section {
  378. margin-top: $ios-spacing-md;
  379. .tags-title {
  380. font-size: 14px;
  381. font-weight: 600;
  382. margin-bottom: $ios-spacing-sm;
  383. color: $ios-text-primary;
  384. }
  385. .tags-container {
  386. display: flex;
  387. flex-wrap: wrap;
  388. gap: $ios-spacing-sm;
  389. margin-bottom: $ios-spacing-md;
  390. .tag {
  391. padding: 6px 12px;
  392. background: rgba($ios-primary, 0.1);
  393. border: 1px solid rgba($ios-primary, 0.2);
  394. border-radius: 20px;
  395. font-size: 14px;
  396. color: $ios-primary;
  397. display: flex;
  398. align-items: center;
  399. gap: $ios-spacing-xs;
  400. transition: $ios-transition;
  401. &:hover {
  402. background: rgba($ios-primary, 0.15);
  403. }
  404. .remove-tag {
  405. background: none;
  406. border: none;
  407. color: $ios-primary;
  408. cursor: pointer;
  409. font-size: 16px;
  410. padding: 0;
  411. width: 18px;
  412. height: 18px;
  413. display: flex;
  414. align-items: center;
  415. justify-content: center;
  416. border-radius: 50%;
  417. transition: $ios-transition;
  418. &:hover {
  419. background: rgba($ios-danger, 0.1);
  420. color: $ios-danger;
  421. }
  422. }
  423. }
  424. }
  425. .tag-input-container {
  426. display: flex;
  427. gap: $ios-spacing-sm;
  428. .tag-input {
  429. flex: 1;
  430. padding: 10px $ios-spacing-md;
  431. border: 2px solid $ios-border;
  432. border-radius: $ios-radius;
  433. font-size: 14px;
  434. background: $ios-background;
  435. transition: $ios-transition;
  436. &:focus {
  437. outline: none;
  438. border-color: $ios-primary;
  439. box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
  440. }
  441. &::placeholder {
  442. color: $ios-text-tertiary;
  443. }
  444. }
  445. .add-tag-btn {
  446. padding: 10px $ios-spacing-md;
  447. background: $ios-secondary;
  448. color: $ios-background;
  449. border: none;
  450. border-radius: $ios-radius;
  451. cursor: pointer;
  452. font-size: 14px;
  453. font-weight: 500;
  454. transition: $ios-transition;
  455. &:hover {
  456. background: color.adjust($ios-secondary, $lightness: -10%);
  457. transform: translateY(-1px);
  458. }
  459. &:active {
  460. transform: translateY(0);
  461. }
  462. }
  463. }
  464. }
  465. }
  466. }
  467. // 紧凑型流程进度指示器
  468. .compact-stage-indicators {
  469. margin: $ios-spacing-md 0;
  470. .stage-chain {
  471. display: flex;
  472. align-items: center;
  473. justify-content: center;
  474. gap: $ios-spacing-xs;
  475. }
  476. .stage-dot {
  477. width: 32px;
  478. height: 32px;
  479. border-radius: 50%;
  480. display: flex;
  481. align-items: center;
  482. justify-content: center;
  483. font-size: 14px;
  484. font-weight: 600;
  485. transition: all 0.3s ease;
  486. position: relative;
  487. .stage-number {
  488. color: white;
  489. font-size: 12px;
  490. }
  491. &.stage-pending {
  492. background: #D1D1D6;
  493. border: 2px solid #8E8E93;
  494. .stage-number {
  495. color: $ios-text-secondary;
  496. }
  497. }
  498. &.stage-in-progress {
  499. background: $ios-primary;
  500. border: 2px solid $ios-primary-dark;
  501. box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.2);
  502. .stage-number {
  503. color: white;
  504. }
  505. }
  506. &.stage-completed {
  507. background: $ios-success;
  508. border: 2px solid color.adjust($ios-success, $lightness: -10%);
  509. .stage-number {
  510. color: white;
  511. }
  512. }
  513. }
  514. .stage-connector {
  515. width: 24px;
  516. height: 2px;
  517. transition: all 0.3s ease;
  518. &.pending {
  519. background: #D1D1D6;
  520. }
  521. &.completed {
  522. background: $ios-success;
  523. }
  524. }
  525. }
  526. // 进度指示器
  527. .progress-indicator {
  528. display: flex;
  529. align-items: center;
  530. gap: $ios-spacing-sm;
  531. margin-top: $ios-spacing-sm;
  532. .progress-bar {
  533. flex: 1;
  534. height: 6px;
  535. background: $ios-background-secondary;
  536. border-radius: 3px;
  537. overflow: hidden;
  538. .progress-fill {
  539. height: 100%;
  540. background: linear-gradient(90deg, $ios-primary, color.adjust($ios-primary, $lightness: 10%));
  541. border-radius: 3px;
  542. transition: width 0.3s ease;
  543. }
  544. }
  545. .progress-text {
  546. font-size: 14px;
  547. color: $ios-text-secondary;
  548. font-weight: 500;
  549. min-width: 60px;
  550. text-align: right;
  551. }
  552. }
  553. // 底部提交区域
  554. .panel-footer {
  555. padding: $ios-spacing-md $ios-spacing-lg;
  556. background: $ios-background-secondary;
  557. border-top: 1px solid $ios-border;
  558. flex-shrink: 0;
  559. .submit-btn {
  560. width: 100%;
  561. padding: 12px 24px;
  562. background: #007bff;
  563. color: white;
  564. border: none;
  565. border-radius: 6px;
  566. font-size: 16px;
  567. font-weight: 500;
  568. cursor: pointer;
  569. transition: all 0.3s ease;
  570. &:hover:not(:disabled) {
  571. transform: translateY(-2px);
  572. box-shadow: $ios-shadow-md;
  573. background: linear-gradient(135deg, #0056CC 0%, #004499 100%);
  574. }
  575. &:active:not(:disabled) {
  576. transform: translateY(0);
  577. }
  578. &:disabled {
  579. background: linear-gradient(135deg, $ios-text-tertiary 0%, #B0B0B0 100%);
  580. color: #FFFFFF;
  581. cursor: not-allowed;
  582. transform: none;
  583. box-shadow: none;
  584. opacity: 0.6;
  585. }
  586. // 表单有效时的强调样式
  587. &:not(:disabled) {
  588. background: linear-gradient(135deg, $ios-success 0%, #28A745 100%);
  589. box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
  590. &:hover {
  591. background: linear-gradient(135deg, #28A745 0%, #1E7E34 100%);
  592. box-shadow: 0 6px 20px rgba(52, 199, 89, 0.4);
  593. }
  594. }
  595. }
  596. }
  597. // 表单验证提示
  598. .validation-hint {
  599. display: flex;
  600. align-items: center;
  601. gap: $ios-spacing-sm;
  602. margin-top: $ios-spacing-sm;
  603. padding: $ios-spacing-sm $ios-spacing-md;
  604. background: rgba($ios-warning, 0.1);
  605. border: 1px solid rgba($ios-warning, 0.3);
  606. border-radius: $ios-radius;
  607. color: $ios-warning;
  608. font-size: 14px;
  609. font-weight: 500;
  610. svg {
  611. flex-shrink: 0;
  612. }
  613. }
  614. // 响应式设计
  615. @media (max-width: 768px) {
  616. .panel-header {
  617. padding: $ios-spacing-md;
  618. }
  619. .panel-content {
  620. padding: $ios-spacing-md;
  621. }
  622. .panel-footer {
  623. padding: $ios-spacing-md;
  624. }
  625. }
  626. }