consultation-order-panel.component.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. // iOS风格变量定义
  2. $ios-primary: #007AFF;
  3. $ios-primary-dark: #0062CC;
  4. $ios-secondary: #34C759;
  5. $ios-success: #34C759;
  6. $ios-warning: #FF9500;
  7. $ios-danger: #FF3B30;
  8. $ios-text-primary: #000000;
  9. $ios-text-secondary: #3C3C43;
  10. $ios-text-tertiary: #8E8E93;
  11. $ios-border: #D1D1D6;
  12. $ios-background: #FFFFFF;
  13. $ios-background-secondary: #F2F2F7;
  14. $ios-background-tertiary: #E5E5EA;
  15. $ios-shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  16. $ios-shadow-md: 0 4px 10px rgba(0,0,0,0.1);
  17. $ios-shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  18. $ios-radius: 10px;
  19. $ios-radius-lg: 16px;
  20. $ios-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  21. $ios-font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  22. $ios-spacing-xs: 4px;
  23. $ios-spacing-sm: 8px;
  24. $ios-spacing-md: 16px;
  25. $ios-spacing-lg: 24px;
  26. $ios-spacing-xl: 32px;
  27. // 咨询订单面板样式 - 适配固定区域
  28. .consultation-order-panel {
  29. background: $ios-background;
  30. border-radius: $ios-radius-lg;
  31. box-shadow: $ios-shadow-md;
  32. height: 100%;
  33. max-height: 600px;
  34. display: flex;
  35. flex-direction: column;
  36. font-family: $ios-font-family;
  37. border: 1px solid $ios-border;
  38. overflow: hidden;
  39. // 面板头部
  40. .panel-header {
  41. padding: $ios-spacing-md $ios-spacing-lg;
  42. background: linear-gradient(135deg, $ios-background 0%, $ios-background-secondary 100%);
  43. border-bottom: 1px solid $ios-border;
  44. flex-shrink: 0;
  45. .panel-title {
  46. font-size: 18px;
  47. font-weight: 600;
  48. color: $ios-text-primary;
  49. margin: 0;
  50. }
  51. .panel-subtitle {
  52. font-size: 14px;
  53. color: $ios-text-secondary;
  54. margin: 4px 0 0 0;
  55. }
  56. }
  57. // 可滚动内容区域
  58. .panel-content {
  59. flex: 1;
  60. overflow-y: auto;
  61. padding: $ios-spacing-md $ios-spacing-lg;
  62. // iOS风格滚动条
  63. &::-webkit-scrollbar {
  64. width: 6px;
  65. }
  66. &::-webkit-scrollbar-track {
  67. background: $ios-background-secondary;
  68. border-radius: 3px;
  69. }
  70. &::-webkit-scrollbar-thumb {
  71. background: $ios-text-tertiary;
  72. border-radius: 3px;
  73. &:hover {
  74. background: $ios-text-secondary;
  75. }
  76. }
  77. }
  78. // 客户信息栏
  79. .customer-info-section {
  80. margin-bottom: $ios-spacing-lg;
  81. padding: $ios-spacing-md;
  82. background: $ios-background-secondary;
  83. border-radius: $ios-radius;
  84. border: 1px solid $ios-border;
  85. .section-title {
  86. font-size: 16px;
  87. font-weight: 600;
  88. color: $ios-text-primary;
  89. margin-bottom: $ios-spacing-md;
  90. }
  91. .search-container {
  92. display: flex;
  93. align-items: center;
  94. gap: $ios-spacing-sm;
  95. margin-bottom: $ios-spacing-sm;
  96. .search-input {
  97. flex: 1;
  98. padding: 12px $ios-spacing-md;
  99. border: 2px solid $ios-border;
  100. border-radius: $ios-radius;
  101. font-size: 16px;
  102. background: $ios-background;
  103. transition: $ios-transition;
  104. &:focus {
  105. outline: none;
  106. border-color: $ios-primary;
  107. box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
  108. }
  109. &::placeholder {
  110. color: $ios-text-tertiary;
  111. }
  112. }
  113. .search-btn {
  114. padding: 12px $ios-spacing-md;
  115. background: $ios-primary;
  116. color: $ios-background;
  117. border: none;
  118. border-radius: $ios-radius;
  119. cursor: pointer;
  120. font-size: 16px;
  121. font-weight: 500;
  122. transition: $ios-transition;
  123. &:hover {
  124. background: $ios-primary-dark;
  125. transform: translateY(-1px);
  126. }
  127. &:active {
  128. transform: translateY(0);
  129. }
  130. }
  131. }
  132. .search-results {
  133. max-height: 200px;
  134. overflow-y: auto;
  135. border: 1px solid $ios-border;
  136. border-radius: $ios-radius;
  137. background: $ios-background;
  138. margin-top: $ios-spacing-sm;
  139. .result-item {
  140. padding: $ios-spacing-md;
  141. cursor: pointer;
  142. border-bottom: 1px solid $ios-border;
  143. transition: $ios-transition;
  144. &:hover {
  145. background: $ios-background-secondary;
  146. }
  147. &:last-child {
  148. border-bottom: none;
  149. }
  150. .customer-name {
  151. font-weight: 500;
  152. color: $ios-text-primary;
  153. }
  154. .customer-info {
  155. font-size: 14px;
  156. color: $ios-text-secondary;
  157. margin-top: 2px;
  158. }
  159. }
  160. }
  161. .selected-customer {
  162. padding: $ios-spacing-md;
  163. background: rgba($ios-primary, 0.1);
  164. border-radius: $ios-radius;
  165. border: 1px solid rgba($ios-primary, 0.2);
  166. display: flex;
  167. justify-content: space-between;
  168. align-items: center;
  169. margin-top: $ios-spacing-sm;
  170. .customer-details {
  171. .customer-name {
  172. font-weight: 600;
  173. color: $ios-text-primary;
  174. }
  175. .customer-phone {
  176. font-size: 14px;
  177. color: $ios-text-secondary;
  178. margin-top: 2px;
  179. }
  180. }
  181. .clear-btn {
  182. background: $ios-danger;
  183. color: $ios-background;
  184. border: none;
  185. border-radius: 6px;
  186. padding: 6px 12px;
  187. cursor: pointer;
  188. font-size: 14px;
  189. font-weight: 500;
  190. transition: $ios-transition;
  191. &:hover {
  192. background: darken($ios-danger, 10%);
  193. transform: translateY(-1px);
  194. }
  195. }
  196. }
  197. }
  198. // 新客户表单
  199. .new-customer-form {
  200. margin-bottom: $ios-spacing-lg;
  201. padding: $ios-spacing-md;
  202. background: $ios-background-secondary;
  203. border-radius: $ios-radius;
  204. border: 1px solid $ios-border;
  205. .form-title {
  206. font-size: 16px;
  207. font-weight: 600;
  208. margin-bottom: $ios-spacing-md;
  209. color: $ios-text-primary;
  210. }
  211. .form-row {
  212. display: flex;
  213. gap: $ios-spacing-md;
  214. margin-bottom: $ios-spacing-md;
  215. @media (max-width: 768px) {
  216. flex-direction: column;
  217. gap: $ios-spacing-sm;
  218. }
  219. .form-group {
  220. flex: 1;
  221. label {
  222. display: block;
  223. margin-bottom: $ios-spacing-xs;
  224. font-size: 14px;
  225. font-weight: 500;
  226. color: $ios-text-primary;
  227. }
  228. input, select, textarea {
  229. width: 100%;
  230. padding: 12px $ios-spacing-md;
  231. border: 2px solid $ios-border;
  232. border-radius: $ios-radius;
  233. font-size: 16px;
  234. background: $ios-background;
  235. transition: $ios-transition;
  236. box-sizing: border-box;
  237. &:focus {
  238. outline: none;
  239. border-color: $ios-primary;
  240. box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
  241. }
  242. &::placeholder {
  243. color: $ios-text-tertiary;
  244. }
  245. }
  246. textarea {
  247. resize: vertical;
  248. min-height: 80px;
  249. font-family: $ios-font-family;
  250. }
  251. select {
  252. cursor: pointer;
  253. }
  254. }
  255. }
  256. }
  257. // 项目需求卡片
  258. .requirements-card {
  259. background: $ios-background;
  260. border: 1px solid $ios-border;
  261. border-radius: $ios-radius;
  262. margin-bottom: $ios-spacing-md;
  263. overflow: hidden;
  264. .card-header {
  265. padding: $ios-spacing-md;
  266. background: linear-gradient(135deg, $ios-background-secondary 0%, $ios-background-tertiary 100%);
  267. border-bottom: 1px solid $ios-border;
  268. display: flex;
  269. justify-content: space-between;
  270. align-items: center;
  271. cursor: pointer;
  272. transition: $ios-transition;
  273. &:hover {
  274. background: linear-gradient(135deg, $ios-background-tertiary 0%, $ios-border 100%);
  275. }
  276. .card-title {
  277. font-size: 16px;
  278. font-weight: 600;
  279. color: $ios-text-primary;
  280. }
  281. .toggle-icon {
  282. color: $ios-text-secondary;
  283. transition: transform 0.3s ease;
  284. font-size: 18px;
  285. &.expanded {
  286. transform: rotate(180deg);
  287. }
  288. }
  289. }
  290. .card-content {
  291. padding: $ios-spacing-md;
  292. max-height: 500px;
  293. overflow-y: auto;
  294. // iOS风格滚动条
  295. &::-webkit-scrollbar {
  296. width: 6px;
  297. }
  298. &::-webkit-scrollbar-track {
  299. background: $ios-background-secondary;
  300. border-radius: 3px;
  301. }
  302. &::-webkit-scrollbar-thumb {
  303. background: $ios-text-tertiary;
  304. border-radius: 3px;
  305. &:hover {
  306. background: $ios-text-secondary;
  307. }
  308. }
  309. .form-row {
  310. display: flex;
  311. gap: $ios-spacing-md;
  312. margin-bottom: $ios-spacing-md;
  313. @media (max-width: 768px) {
  314. flex-direction: column;
  315. gap: $ios-spacing-sm;
  316. }
  317. .form-group {
  318. flex: 1;
  319. label {
  320. display: block;
  321. margin-bottom: $ios-spacing-xs;
  322. font-size: 14px;
  323. font-weight: 500;
  324. color: $ios-text-primary;
  325. }
  326. input, select, textarea {
  327. width: 100%;
  328. padding: 12px $ios-spacing-md;
  329. border: 2px solid $ios-border;
  330. border-radius: $ios-radius;
  331. font-size: 16px;
  332. background: $ios-background;
  333. transition: $ios-transition;
  334. box-sizing: border-box;
  335. &:focus {
  336. outline: none;
  337. border-color: $ios-primary;
  338. box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
  339. }
  340. &::placeholder {
  341. color: $ios-text-tertiary;
  342. }
  343. }
  344. select {
  345. cursor: pointer;
  346. }
  347. }
  348. }
  349. .tags-section {
  350. margin-top: $ios-spacing-md;
  351. .tags-title {
  352. font-size: 14px;
  353. font-weight: 600;
  354. margin-bottom: $ios-spacing-sm;
  355. color: $ios-text-primary;
  356. }
  357. .tags-container {
  358. display: flex;
  359. flex-wrap: wrap;
  360. gap: $ios-spacing-sm;
  361. margin-bottom: $ios-spacing-md;
  362. .tag {
  363. padding: 6px 12px;
  364. background: rgba($ios-primary, 0.1);
  365. border: 1px solid rgba($ios-primary, 0.2);
  366. border-radius: 20px;
  367. font-size: 14px;
  368. color: $ios-primary;
  369. display: flex;
  370. align-items: center;
  371. gap: $ios-spacing-xs;
  372. transition: $ios-transition;
  373. &:hover {
  374. background: rgba($ios-primary, 0.15);
  375. }
  376. .remove-tag {
  377. background: none;
  378. border: none;
  379. color: $ios-primary;
  380. cursor: pointer;
  381. font-size: 16px;
  382. padding: 0;
  383. width: 18px;
  384. height: 18px;
  385. display: flex;
  386. align-items: center;
  387. justify-content: center;
  388. border-radius: 50%;
  389. transition: $ios-transition;
  390. &:hover {
  391. background: rgba($ios-danger, 0.1);
  392. color: $ios-danger;
  393. }
  394. }
  395. }
  396. }
  397. .tag-input-container {
  398. display: flex;
  399. gap: $ios-spacing-sm;
  400. .tag-input {
  401. flex: 1;
  402. padding: 10px $ios-spacing-md;
  403. border: 2px solid $ios-border;
  404. border-radius: $ios-radius;
  405. font-size: 14px;
  406. background: $ios-background;
  407. transition: $ios-transition;
  408. &:focus {
  409. outline: none;
  410. border-color: $ios-primary;
  411. box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
  412. }
  413. &::placeholder {
  414. color: $ios-text-tertiary;
  415. }
  416. }
  417. .add-tag-btn {
  418. padding: 10px $ios-spacing-md;
  419. background: $ios-secondary;
  420. color: $ios-background;
  421. border: none;
  422. border-radius: $ios-radius;
  423. cursor: pointer;
  424. font-size: 14px;
  425. font-weight: 500;
  426. transition: $ios-transition;
  427. &:hover {
  428. background: darken($ios-secondary, 10%);
  429. transform: translateY(-1px);
  430. }
  431. &:active {
  432. transform: translateY(0);
  433. }
  434. }
  435. }
  436. }
  437. }
  438. }
  439. // 底部提交区域
  440. .panel-footer {
  441. padding: $ios-spacing-md $ios-spacing-lg;
  442. background: $ios-background-secondary;
  443. border-top: 1px solid $ios-border;
  444. flex-shrink: 0;
  445. .submit-btn {
  446. width: 100%;
  447. padding: $ios-spacing-md;
  448. background: linear-gradient(135deg, $ios-primary 0%, $ios-primary-dark 100%);
  449. color: $ios-background;
  450. border: none;
  451. border-radius: $ios-radius;
  452. font-size: 16px;
  453. font-weight: 600;
  454. cursor: pointer;
  455. transition: $ios-transition;
  456. box-shadow: $ios-shadow-sm;
  457. &:hover {
  458. transform: translateY(-2px);
  459. box-shadow: $ios-shadow-md;
  460. }
  461. &:active {
  462. transform: translateY(0);
  463. box-shadow: $ios-shadow-sm;
  464. }
  465. &:disabled {
  466. background: $ios-text-tertiary;
  467. cursor: not-allowed;
  468. transform: none;
  469. box-shadow: none;
  470. }
  471. }
  472. }
  473. // 响应式设计
  474. @media (max-width: 768px) {
  475. .panel-header {
  476. padding: $ios-spacing-md;
  477. }
  478. .panel-content {
  479. padding: $ios-spacing-md;
  480. }
  481. .panel-footer {
  482. padding: $ios-spacing-md;
  483. }
  484. }
  485. }