You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

order-list-item-obu.vue 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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 ?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">{{getOrderTypeName(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 ?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 v-if="item.orderStep == OrderStatus.待支付" class="btns">
  48. <view class="btn btn-normal" @click="gotoCancelOrder(item)">取消订单</view>
  49. <view class="btn btn-primary" @click="gotoPay(item)">支付</view>
  50. </view>
  51. <!-- 待激活 -->
  52. <view class="btns" v-else-if="item.orderStep == OrderStatus.待激活">
  53. <view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view>
  54. </view>
  55. <!-- 已完成 -->
  56. <view class="btns" v-else-if="item.orderStep == OrderStatus.已完成">
  57. <view class="btn btn-primary" @click.stop="gotoEvaluateOrder(item)">去评价</view>
  58. </view>
  59. </template>
  60. </view>
  61. </template>
  62. <script lang="ts" setup>
  63. import useOrderSkip from "@/composables/order/useOrderSkip";
  64. import {getOrderStatusName,getOrderTypeName} from "@/utils/utils";
  65. import {OrderStatus} from "@/datas/enum";
  66. defineProps({
  67. item: {
  68. type: Object,
  69. default: () => ({}),
  70. },
  71. });
  72. //办理订单按钮跳转业务逻辑
  73. const {gotoEditAddress,gotoCancelOrder,gotoEditUserOrUnitInfo,
  74. gotoConfirmReceipt,gotoCheckLogistics,gotoEvaluateOrder,
  75. gotoActiveOrder,gotoReturnOrder,gotoExchangeOrder,gotoPay,gotoOrderDetails} = useOrderSkip();
  76. </script>
  77. <style lang="scss" scoped>
  78. .item {
  79. background: #ffffff;
  80. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  81. border-radius: 20rpx;
  82. box-sizing: border-box;
  83. display: flex;
  84. flex-direction: column;
  85. margin: 30rpx 30rpx 0rpx;
  86. }
  87. .bg-white .item {
  88. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  89. }
  90. .item .head {
  91. display: flex;
  92. justify-content: space-between;
  93. align-items: center;
  94. padding: 20rpx 28rpx;
  95. border-bottom: 1px solid #dcdcdc;
  96. }
  97. .item .head {
  98. .head-row {
  99. display: flex;
  100. width: 100%;
  101. justify-content: space-between;
  102. align-items: center;
  103. }
  104. .name {}
  105. .name>text {
  106. font-size: 26rpx;
  107. font-family: Noto Sans S Chinese;
  108. font-weight: 400;
  109. color: #999999;
  110. line-height: 36rpx;
  111. }
  112. }
  113. .item .head .icon {
  114. width: 48rpx;
  115. height: 48rpx;
  116. }
  117. .item .head .name {
  118. display: flex;
  119. align-items: center;
  120. }
  121. .text-green {
  122. font-size: 26rpx;
  123. color: #00b38b;
  124. }
  125. .text-orange {
  126. font-size: 26rpx;
  127. color: #ff8000;
  128. }
  129. .text-black {
  130. font-size: 28rpx;
  131. color: #333;
  132. font-weight: 500;
  133. }
  134. .title {
  135. font-size: 30rpx;
  136. color: #333;
  137. }
  138. .tag-green {
  139. font-size: 22rpx;
  140. height: 40rpx;
  141. line-height: 40rpx;
  142. padding: 0 12rpx;
  143. border-radius: 6rpx;
  144. background: #d9f4ee;
  145. color: #00b38b;
  146. }
  147. .tag-grey {
  148. font-size: 22rpx;
  149. height: 40rpx;
  150. line-height: 40rpx;
  151. padding: 0 12rpx;
  152. border-radius: 6rpx;
  153. background: #e8e8e8;
  154. color: #666;
  155. }
  156. .detail {
  157. display: flex;
  158. justify-content: space-between;
  159. align-items: center;
  160. padding: 30rpx 32rpx;
  161. }
  162. .detail .type {
  163. font-size: 26rpx;
  164. color: #999;
  165. }
  166. .detail .value {
  167. font-size: 26rpx;
  168. color: #333;
  169. }
  170. .finished .detail .value {
  171. color: #999;
  172. }
  173. .detail .odd {
  174. margin: 20rpx 0;
  175. }
  176. .cny {
  177. font-size: 26rpx;
  178. color: #333;
  179. }
  180. .finished .cny {
  181. color: #999;
  182. }
  183. .amount {
  184. font-size: 40rpx;
  185. font-weight: bold;
  186. }
  187. .bottom .amount {
  188. color: #ff8000;
  189. }
  190. .finished .amount {
  191. color: #999;
  192. }
  193. .btns {
  194. position: relative;
  195. display: flex;
  196. align-items: center;
  197. justify-content: flex-end;
  198. border-top: 1px solid #dcdcdc;
  199. margin: 0 30rpx;
  200. padding: 20rpx 0;
  201. }
  202. .bottom {
  203. display: flex;
  204. justify-content: space-between;
  205. align-items: center;
  206. border-top: 1px solid #dcdcdc;
  207. margin: 0 30rpx;
  208. padding: 20rpx 0;
  209. }
  210. .btn {
  211. height: 60rpx;
  212. line-height: 58rpx;
  213. border-radius: 30rpx;
  214. padding: 0 24rpx;
  215. font-size: 26rpx;
  216. box-sizing: border-box;
  217. margin-right: 20rpx;
  218. }
  219. .btns .btn:last-child {
  220. margin: 0;
  221. }
  222. .btns .state {
  223. position: absolute;
  224. left: 0;
  225. font-size: 26rpx;
  226. font-family: Noto Sans S Chinese;
  227. font-weight: 400;
  228. color: #999999;
  229. line-height: 58rpx;
  230. text {
  231. font-size: 26rpx;
  232. font-family: Noto Sans S Chinese;
  233. font-weight: 400;
  234. color: #00B38B;
  235. line-height: 58rpx;
  236. }
  237. }
  238. .btn-primary {
  239. border: 1px solid #00b38b;
  240. color: #00b38b;
  241. }
  242. .btn-disable {
  243. border: 1px solid #999;
  244. color: #999;
  245. }
  246. .btn-normal {
  247. border: 1px solid #dcdcdc;
  248. color: #333;
  249. }
  250. </style>