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.7KB

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