Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

order-list-item-card-sign.vue 6.5KB

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