listItem.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="item">
  3. <view class="item-img">
  4. <!-- <img :src="data.avatar" alt="" style="width: 112rpx; height: 112rpx;"> -->
  5. <up-image :show-loading="true" :src="data.avatar" width="112rpx" height="112rpx"></up-image>
  6. </view>
  7. <view class="item-info">
  8. <view class="item-title-box">
  9. <view class="item-title">
  10. <view class="item-name">
  11. {{ data.name }}
  12. </view>
  13. <view v-if="data.score || ['0', '1','3'].includes(String(data.orderStatus))">
  14. <dict-tag :options="order_status" :value="String(data.orderStatus)" />
  15. </view>
  16. <text v-else class="color-blue ">
  17. 待评价
  18. </text>
  19. </view>
  20. <view class="item-de">
  21. <view >
  22. <img src="/static/serverImg/list/ad2.png" alt="" style="width: 28rpx;height: 28rpx;">
  23. </view>
  24. <view style="flex: 1;">
  25. {{ data.address }}
  26. </view>
  27. </view>
  28. <view class="item-time">
  29. 服务时间:{{ data.workDate }} {{ data.workStartTime }}(<text class="item-time-text">{{ data.serviceDuration }}分钟</text>)
  30. </view>
  31. <view class="item-price"><span class="item-price-yuan">¥</span> {{ data.serviceOnePrice || 0 }}</view>
  32. </view>
  33. <view class="item-box">
  34. <view class="item-btns">
  35. <view class="btn-m" @click="onClick(1)" v-if="['2','4'].includes(data.orderStatus)">查看</view>
  36. <view class="btn-m" @click="onClick(2)">
  37. <text style="margin-left: 8rpx;">沟通</text>
  38. </view>
  39. <view class="btn-m" @click="onClick(3)" v-if="['3', '1'].includes(data.orderStatus)">
  40. <!-- <up-icon name="chat" color="#ffffff" size="20"></up-icon> -->
  41. {{ data.orderStatus === '1' ? '开始' : '完成' }}服务
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script setup>
  49. import { inject } from 'vue';
  50. import DictTag from '@/components/DictTag/index.vue'
  51. const props = defineProps({
  52. data: {
  53. type: Object,
  54. default: () => {
  55. return {}
  56. }
  57. },
  58. });
  59. const inject_click = inject('onClick');
  60. const order_status = inject('order_status');
  61. /**
  62. * 1: 查看
  63. * 2:沟通
  64. */
  65. function onClick(type) {
  66. inject_click(props.data, type);
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .item {
  71. border-radius: 24rpx;
  72. background: rgba(255, 255, 255, 1);
  73. margin-bottom: 24rpx;
  74. padding: 32rpx;
  75. display: flex;
  76. align-items: flex-start;
  77. .item-img {
  78. margin-right: 32rpx;
  79. }
  80. .item-info {
  81. display: flex;
  82. flex-direction: column;
  83. flex: 1;
  84. justify-content: space-between;
  85. height: 100%;
  86. .item-title-box {
  87. .item-title {
  88. font-size: 30rpx;
  89. font-weight: 400;
  90. line-height: 45rpx;
  91. color: rgba(26, 26, 26, 1);
  92. display: flex;
  93. align-items: center;
  94. justify-content: space-between;
  95. margin-bottom: 15rpx;
  96. }
  97. }
  98. .item-de {
  99. display: flex;
  100. font-size: 26rpx;
  101. font-weight: 400;
  102. line-height: 39rpx;
  103. color: rgba(153, 153, 153, 1);
  104. display: flex;
  105. align-items: flex-start;
  106. justify-content: flex-start;
  107. }
  108. .item-time {
  109. font-size: 26rpx;
  110. font-weight: 400;
  111. letter-spacing: 0rpx;
  112. line-height: 39rpx;
  113. color: rgba(153, 153, 153, 1);
  114. margin-bottom: 20rpx;
  115. }
  116. .item-price {
  117. font-size: 30rpx;
  118. font-weight: 400;
  119. letter-spacing: 0rpx;
  120. line-height: 45rpx;
  121. color: rgba(203, 26, 28, 1);
  122. margin-bottom: 16rpx;
  123. }
  124. .item-box {
  125. display: flex;
  126. align-items: center;
  127. justify-content: flex-end;
  128. .item-btns {
  129. display: flex;
  130. align-items: center;
  131. justify-content: center;
  132. .btn-s {
  133. font-size: 26rpx;
  134. font-weight: 400;
  135. color: rgba(221, 94, 69, 1);
  136. text-align: center;
  137. padding: 16rpx 0;
  138. width: 156.03rpx;
  139. border-radius: 8rpx;
  140. background: rgba(0, 0, 0, 0);
  141. display: flex;
  142. justify-content: center;
  143. border: 0rpx solid rgba(221, 94, 69, 1);
  144. }
  145. .btn-m {
  146. border-radius: 59rpx;
  147. font-size: 26rpx;
  148. text-align: left;
  149. margin-left: 24rpx;
  150. display: flex;
  151. justify-content: center;
  152. color: #dd5e45;
  153. padding: 12rpx 32rpx;
  154. border: 1px solid;
  155. border-radius: 59rpx;
  156. }
  157. }
  158. }
  159. }
  160. }
  161. .item-time-text {
  162. color: #dd5e45;
  163. }
  164. </style>