Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

order-list-item-obu.vue 6.1KB

2 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <!-- 增补OBU订单ITEM
  2. 订单类型 :审核中、审核不通过、待发货、待收货、待激活、已完成、已取消-->
  3. <template>
  4. <view :class="item.orderStatus == OrderStatus.已取消 ? 'item finished' : 'item'" @click.stop="gotoOrderDetails(item)">
  5. <view class="head">
  6. <view class="name">
  7. <image :src="`${$imgUrl}order/icon-star-green.png`" class="icon"></image>
  8. <text class="title">{{item.productName ?? ''}}</text>
  9. </view>
  10. <view class="status text-orange" v-if="item.orderStatus == OrderStatus.已取消">已取消</view>
  11. <view class="status text-green" v-else
  12. :class="{'text-orange':item.orderStep == OrderStatus.已完成 || item.orderStep == OrderStatus.已结束
  13. || item.orderStep == OrderStatus['换货-设备已回收'] || item.orderStep == OrderStatus.退款成功 || item.orderStep == OrderStatus.退货成功}">
  14. {{getOrderStatusName(item.orderStep)}}</view>
  15. </view>
  16. <view class="detail">
  17. <view class="orders">
  18. <view class="order-text">
  19. <text class="type">售后单号:</text>
  20. <text class="value">{{item.orderId}}</text>
  21. </view>
  22. <view class="order-text odd">
  23. <text class="type">业务类型:</text>
  24. <text class="value">{{item.orderType}}</text>
  25. </view>
  26. <view class="order-text">
  27. <text class="type">车牌号:</text>
  28. <text class="value">{{item.vehiclePlate}}</text>
  29. </view>
  30. </view>
  31. <view class="money"><text class="cny">¥</text><text class="amount">{{item.amount / 100 ?? '0.00'}}</text></view>
  32. </view>
  33. <template v-if="item.orderStatus != OrderStatus.已取消">
  34. <!-- 审核中、待发货 -->
  35. <view class="btns" v-if="item.orderStep == OrderStatus.待审核 || item.orderStep == OrderStatus.待发货">
  36. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  37. <view class="btn btn-primary" @click.stop="gotoOrderDetails(item)">修改地址</view>
  38. </view>
  39. <!-- 待收货 -->
  40. <view class="btns" v-else-if="item.orderStep == OrderStatus.待收货">
  41. <view class="btn btn-normal" @click.stop="gotoCheckLogistics(item)">查看物流
  42. </view>
  43. <view class="btn btn-primary" @click.stop="gotoConfirmReceipt(item)">确认收货
  44. </view>
  45. </view>
  46. <!-- 待激活 -->
  47. <view class="btns" v-else-if="item.orderStep == OrderStatus.待激活">
  48. <view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view>
  49. </view>
  50. <!-- 已完成 -->
  51. <view class="btns" v-else-if="item.orderStep == OrderStatus.已完成">
  52. <view class="btn btn-primary" @click.stop="gotoEvaluateOrder(item)">去评价</view>
  53. </view>
  54. </template>
  55. </view>
  56. </template>
  57. <script lang="ts" setup>
  58. import useOrderSkip from "@/composables/order/useOrderSkip";
  59. import {getOrderStatusName} from "@/utils/utils";
  60. import {OrderStatus} from "@/datas/enum";
  61. defineProps({
  62. item: {
  63. type: Object,
  64. default: () => ({}),
  65. },
  66. });
  67. //办理订单按钮跳转业务逻辑
  68. const {gotoEditAddress,gotoCancelOrder,gotoEditUserOrUnitInfo,
  69. gotoConfirmReceipt,gotoCheckLogistics,gotoEvaluateOrder,
  70. gotoActiveOrder,gotoReturnOrder,gotoExchangeOrder,gotoPay,gotoOrderDetails} = useOrderSkip();
  71. </script>
  72. <style lang="scss" scoped>
  73. .item {
  74. background: #ffffff;
  75. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  76. border-radius: 20rpx;
  77. box-sizing: border-box;
  78. display: flex;
  79. flex-direction: column;
  80. margin: 30rpx 30rpx 0rpx;
  81. }
  82. .bg-white .item {
  83. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  84. }
  85. .item .head {
  86. display: flex;
  87. justify-content: space-between;
  88. align-items: center;
  89. padding: 20rpx 28rpx;
  90. border-bottom: 1px solid #dcdcdc;
  91. }
  92. .item .head {
  93. .head-row {
  94. display: flex;
  95. width: 100%;
  96. justify-content: space-between;
  97. align-items: center;
  98. }
  99. .name {}
  100. .name>text {
  101. font-size: 26rpx;
  102. font-family: Noto Sans S Chinese;
  103. font-weight: 400;
  104. color: #999999;
  105. line-height: 36rpx;
  106. }
  107. }
  108. .item .head .icon {
  109. width: 48rpx;
  110. height: 48rpx;
  111. }
  112. .item .head .name {
  113. display: flex;
  114. align-items: center;
  115. }
  116. .text-green {
  117. font-size: 26rpx;
  118. color: #00b38b;
  119. }
  120. .text-orange {
  121. font-size: 26rpx;
  122. color: #ff8000;
  123. }
  124. .text-black {
  125. font-size: 28rpx;
  126. color: #333;
  127. font-weight: 500;
  128. }
  129. .title {
  130. font-size: 30rpx;
  131. color: #333;
  132. }
  133. .tag-green {
  134. font-size: 22rpx;
  135. height: 40rpx;
  136. line-height: 40rpx;
  137. padding: 0 12rpx;
  138. border-radius: 6rpx;
  139. background: #d9f4ee;
  140. color: #00b38b;
  141. }
  142. .tag-grey {
  143. font-size: 22rpx;
  144. height: 40rpx;
  145. line-height: 40rpx;
  146. padding: 0 12rpx;
  147. border-radius: 6rpx;
  148. background: #e8e8e8;
  149. color: #666;
  150. }
  151. .detail {
  152. display: flex;
  153. justify-content: space-between;
  154. align-items: center;
  155. padding: 30rpx 32rpx;
  156. }
  157. .detail .type {
  158. font-size: 26rpx;
  159. color: #999;
  160. }
  161. .detail .value {
  162. font-size: 26rpx;
  163. color: #333;
  164. }
  165. .finished .detail .value {
  166. color: #999;
  167. }
  168. .detail .odd {
  169. margin: 20rpx 0;
  170. }
  171. .cny {
  172. font-size: 26rpx;
  173. color: #333;
  174. }
  175. .finished .cny {
  176. color: #999;
  177. }
  178. .amount {
  179. font-size: 40rpx;
  180. font-weight: bold;
  181. }
  182. .bottom .amount {
  183. color: #ff8000;
  184. }
  185. .finished .amount {
  186. color: #999;
  187. }
  188. .btns {
  189. position: relative;
  190. display: flex;
  191. align-items: center;
  192. justify-content: flex-end;
  193. border-top: 1px solid #dcdcdc;
  194. margin: 0 30rpx;
  195. padding: 20rpx 0;
  196. }
  197. .bottom {
  198. display: flex;
  199. justify-content: space-between;
  200. align-items: center;
  201. border-top: 1px solid #dcdcdc;
  202. margin: 0 30rpx;
  203. padding: 20rpx 0;
  204. }
  205. .btn {
  206. height: 60rpx;
  207. line-height: 58rpx;
  208. border-radius: 30rpx;
  209. padding: 0 24rpx;
  210. font-size: 26rpx;
  211. box-sizing: border-box;
  212. margin-right: 20rpx;
  213. }
  214. .btns .btn:last-child {
  215. margin: 0;
  216. }
  217. .btns .state {
  218. position: absolute;
  219. left: 0;
  220. font-size: 26rpx;
  221. font-family: Noto Sans S Chinese;
  222. font-weight: 400;
  223. color: #999999;
  224. line-height: 58rpx;
  225. text {
  226. font-size: 26rpx;
  227. font-family: Noto Sans S Chinese;
  228. font-weight: 400;
  229. color: #00B38B;
  230. line-height: 58rpx;
  231. }
  232. }
  233. .btn-primary {
  234. border: 1px solid #00b38b;
  235. color: #00b38b;
  236. }
  237. .btn-disable {
  238. border: 1px solid #999;
  239. color: #999;
  240. }
  241. .btn-normal {
  242. border: 1px solid #dcdcdc;
  243. color: #333;
  244. }
  245. </style>