index.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <template>
  2. <view class="page">
  3. <!-- 搜索和筛选区域 -->
  4. <view class="search-section">
  5. <view class="search-box">
  6. <uni-icons type="search" size="18" color="#999999"></uni-icons>
  7. <input class="search-input" placeholder="搜客户姓名" placeholder-style="color: #999999" />
  8. <text class="search-box-text">搜索</text>
  9. </view>
  10. <view class="filter-btn">
  11. <uni-icons type="settings" size="18" color="#323232"></uni-icons>
  12. <text class="filter-text">筛选</text>
  13. </view>
  14. </view>
  15. <!-- 订单标签页 -->
  16. <view class="order-tabs">
  17. <view
  18. class="tab-item"
  19. :class="{ 'active': activeTab === 'all' }"
  20. @click="switchTab('all')"
  21. >
  22. <text class="tab-text">全部订单(2)</text>
  23. </view>
  24. <view
  25. class="tab-item"
  26. :class="{ 'active': activeTab === 'progress' }"
  27. @click="switchTab('progress')"
  28. >
  29. <text class="tab-text">进行中(0)</text>
  30. </view>
  31. <view
  32. class="tab-item"
  33. :class="{ 'active': activeTab === 'completed' }"
  34. @click="switchTab('completed')"
  35. >
  36. <text class="tab-text">已完成(0)</text>
  37. </view>
  38. </view>
  39. <!-- 订单列表 -->
  40. <scroll-view class="order-list" scroll-y>
  41. <!-- 订单卡片1 - 进行中 -->
  42. <view class="order-card">
  43. <view class="order-header">
  44. <view class="user-info">
  45. <image class="avatar" src="/static/images/profile.jpg" mode="aspectFill"></image>
  46. <view class="user-details">
  47. <text class="user-name">张明明</text>
  48. <text class="valid-date">有效期至: 2025-11-07</text>
  49. </view>
  50. </view>
  51. <view class="status-tag status-tag--progress">进行中</view>
  52. </view>
  53. <view class="order-content">
  54. <view class="order-row">
  55. <text class="order-label">订单编号</text>
  56. <text class="order-value">LAW2023071500123</text>
  57. </view>
  58. <view class="order-row">
  59. <text class="order-label">联系电话</text>
  60. <text class="order-value">13877092066</text>
  61. </view>
  62. <view class="order-row">
  63. <text class="order-label">服务费用</text>
  64. <text class="order-value">¥200/次</text>
  65. </view>
  66. <view class="order-row">
  67. <text class="order-label">下单时间</text>
  68. <text class="order-value">2025-11-11 11:11:11</text>
  69. </view>
  70. <view class="order-row">
  71. <text class="order-label">支付时间</text>
  72. <text class="order-value">2025-11-11 11:11:11</text>
  73. </view>
  74. <view class="order-row">
  75. <text class="order-label">佣金比例</text>
  76. <text class="order-value">3%</text>
  77. </view>
  78. </view>
  79. <view class="order-footer">
  80. <text class="revenue">收益: ¥280</text>
  81. <view class="action-buttons">
  82. <view class="action-btn action-btn--message">
  83. <uni-icons type="chat" size="16" color="#1976D2"></uni-icons>
  84. <text class="btn-text">发消息</text>
  85. </view>
  86. <view class="action-btn action-btn--call">
  87. <uni-icons type="phone" size="16" color="#4CAF50"></uni-icons>
  88. <text class="btn-text">联系客户</text>
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. <!-- 订单卡片2 - 已完成 -->
  94. <view class="order-card">
  95. <view class="order-header">
  96. <view class="user-info">
  97. <image class="avatar" src="/static/images/profile.jpg" mode="aspectFill"></image>
  98. <view class="user-details">
  99. <text class="user-name">张明明</text>
  100. <text class="valid-date">有效期至: 2025-11-07</text>
  101. </view>
  102. </view>
  103. <view class="status-tag status-tag--completed">已完成</view>
  104. </view>
  105. <view class="order-content">
  106. <view class="order-row">
  107. <text class="order-label">订单编号</text>
  108. <text class="order-value">LAW2023071500123</text>
  109. </view>
  110. <view class="order-row">
  111. <text class="order-label">联系电话</text>
  112. <text class="order-value">13877092066</text>
  113. </view>
  114. <view class="order-row">
  115. <text class="order-label">服务费用</text>
  116. <text class="order-value">¥200/次</text>
  117. </view>
  118. <view class="order-row">
  119. <text class="order-label">下单时间</text>
  120. <text class="order-value">2025-11-11 11:11:11</text>
  121. </view>
  122. <view class="order-row">
  123. <text class="order-label">支付时间</text>
  124. <text class="order-value">2025-11-11 11:11:11</text>
  125. </view>
  126. <view class="order-row">
  127. <text class="order-label">佣金比例</text>
  128. <text class="order-value">3%</text>
  129. </view>
  130. </view>
  131. <view class="order-footer">
  132. <text class="revenue">收益: ¥280</text>
  133. <view class="action-buttons">
  134. <view class="action-btn action-btn--delete">
  135. <uni-icons type="trash" size="16" color="#F44336"></uni-icons>
  136. <text class="btn-text">删除</text>
  137. </view>
  138. <view class="action-btn action-btn--message">
  139. <uni-icons type="chat" size="16" color="#1976D2"></uni-icons>
  140. <text class="btn-text">查看消息</text>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </scroll-view>
  146. <!-- 底部导航栏 -->
  147. <bar-navigasi-handap></bar-navigasi-handap>
  148. </view>
  149. </template>
  150. <script>
  151. import BarNavigasiHandap from "@/components/barNavigasiHandap.vue"
  152. export default {
  153. components: {
  154. BarNavigasiHandap
  155. },
  156. data() {
  157. return {
  158. activeTab: 'all' // 当前选中的标签页
  159. }
  160. },
  161. methods: {
  162. switchTab(tab) {
  163. this.activeTab = tab
  164. // 这里可以根据tab筛选订单列表
  165. }
  166. }
  167. }
  168. </script>
  169. <style scoped>
  170. .page {
  171. padding-top: calc(var(--status-bar-height) + 20rpx);
  172. padding-bottom: calc(16rpx + env(safe-area-inset-bottom)); /* 为底部导航栏留出空间 */
  173. background: linear-gradient( 180deg, rgba(40,86,199,0.3) 0%, rgba(255,255,255,0) 100%);
  174. height: 100vh;
  175. }
  176. .search-box-text{
  177. font-weight: 400;
  178. font-size: 27rpx;
  179. color: #151515;
  180. }
  181. /* 搜索区域 */
  182. .search-section {
  183. display: flex;
  184. align-items: center;
  185. padding: 24rpx 30rpx;
  186. padding-top: 0rpx;
  187. gap: 20rpx;
  188. }
  189. .search-box {
  190. flex: 1;
  191. display: flex;
  192. align-items: center;
  193. background-color: #F5F5F5;
  194. border-radius: 38rpx;
  195. padding: 20rpx 24rpx;
  196. gap: 12rpx;
  197. }
  198. .search-input {
  199. flex: 1;
  200. font-size: 28rpx;
  201. color: #323232;
  202. }
  203. .search-btn {
  204. padding: 20rpx 32rpx;
  205. background-color: #007AFF;
  206. color: #FFFFFF;
  207. border-radius: 8rpx;
  208. font-size: 28rpx;
  209. }
  210. .filter-btn {
  211. display: flex;
  212. align-items: center;
  213. gap: 8rpx;
  214. padding: 20rpx 24rpx;
  215. }
  216. .filter-text {
  217. font-size: 28rpx;
  218. color: #323232;
  219. }
  220. /* 订单标签页 */
  221. .order-tabs {
  222. display: flex;
  223. justify-content: space-around;
  224. width: 100vw;
  225. margin: auto;
  226. }
  227. .tab-item {
  228. padding: 24rpx 0;
  229. position: relative;
  230. }
  231. .tab-item.active {
  232. font-weight: 600;
  233. color: #323232;
  234. }
  235. .tab-text {
  236. font-size: 28rpx;
  237. color: #8D8D8D;
  238. }
  239. .tab-item.active .tab-text {
  240. color: #323232;
  241. }
  242. /* 订单列表 */
  243. .order-list {
  244. flex: 1;
  245. padding: 24rpx 30rpx;
  246. height: calc(100vh - calc(16rpx + env(safe-area-inset-bottom)));
  247. }
  248. /* 订单卡片 */
  249. .order-card {
  250. background-color: #FFFFFF;
  251. border-radius: 16rpx;
  252. padding: 32rpx;
  253. margin-bottom: 24rpx;
  254. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  255. }
  256. .order-header {
  257. display: flex;
  258. justify-content: space-between;
  259. align-items: flex-start;
  260. margin-bottom: 32rpx;
  261. padding-bottom: 24rpx;
  262. border-bottom: 1px solid #EEEEEE;
  263. }
  264. .user-info {
  265. display: flex;
  266. align-items: center;
  267. gap: 24rpx;
  268. }
  269. .avatar {
  270. width: 96rpx;
  271. height: 96rpx;
  272. border-radius: 50%;
  273. background-color: #F5F5F5;
  274. }
  275. .user-details {
  276. display: flex;
  277. flex-direction: column;
  278. gap: 12rpx;
  279. }
  280. .user-name {
  281. font-size: 32rpx;
  282. font-weight: 500;
  283. color: #323232;
  284. }
  285. .valid-date {
  286. font-size: 24rpx;
  287. color: #999999;
  288. }
  289. .status-tag {
  290. padding: 8rpx 20rpx;
  291. border-radius: 20rpx;
  292. font-size: 24rpx;
  293. }
  294. .status-tag--progress {
  295. background-color: #E8F5E9;
  296. color: #4CAF50;
  297. }
  298. .status-tag--completed {
  299. background-color: #FFF3E0;
  300. color: #FF9800;
  301. }
  302. /* 订单内容 */
  303. .order-content {
  304. margin-bottom: 32rpx;
  305. }
  306. .order-row {
  307. display: flex;
  308. justify-content: space-between;
  309. margin-bottom: 20rpx;
  310. }
  311. .order-label {
  312. font-size: 28rpx;
  313. color: #999999;
  314. }
  315. .order-value {
  316. font-size: 28rpx;
  317. color: #323232;
  318. font-weight: 500;
  319. }
  320. /* 订单底部 */
  321. .order-footer {
  322. display: flex;
  323. justify-content: space-between;
  324. align-items: center;
  325. padding-top: 24rpx;
  326. border-top: 1px solid #EEEEEE;
  327. }
  328. .revenue {
  329. font-size: 32rpx;
  330. color: #FF9800;
  331. font-weight: 600;
  332. }
  333. .action-buttons {
  334. display: flex;
  335. gap: 16rpx;
  336. }
  337. .action-btn {
  338. display: flex;
  339. align-items: center;
  340. gap: 8rpx;
  341. padding: 12rpx 24rpx;
  342. border-radius: 8rpx;
  343. font-size: 24rpx;
  344. }
  345. .action-btn--message {
  346. background-color: #E3F2FD;
  347. color: #1976D2;
  348. }
  349. .action-btn--call {
  350. background-color: #E8F5E9;
  351. color: #4CAF50;
  352. }
  353. .action-btn--delete {
  354. background-color: #FFEBEE;
  355. color: #F44336;
  356. }
  357. .btn-text {
  358. font-size: 24rpx;
  359. margin-left: 4rpx;
  360. }
  361. </style>