order-card.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <view class="slot">
  3. <!-- 商品卡片 -->
  4. <OrderGoodsCard :data="data" showBorderBottom>
  5. <view class="status-slot">
  6. <text v-if="data.status == 10">待付款</text>
  7. <text v-if="data.status == 11">待发货</text>
  8. <text v-if="data.status == 12">待收货</text>
  9. <text v-if="data.status == 13">已完成</text>
  10. <text v-if="data.status == 14">交易关闭</text>
  11. <text v-if="data.status == 15">售后订单</text>
  12. </view>
  13. </OrderGoodsCard>
  14. <!-- 待付款 -->
  15. <view class="operate" v-if="data.status == 10">
  16. <view class="paystyle">
  17. 需付款:{{data.actual_total_amount}}
  18. </view>
  19. <u-button type="default" style="margin-right: 24rpx;" size="small" shape="circle" @click.stop="cancelOrder(data.id,'orderList')">取消订单</u-button>
  20. <u-button type="primary" size="small" shape="circle" @click.stop="goPay(data)">去付款</u-button>
  21. </view>
  22. <!-- 待发货 -->
  23. <view class="operate" v-if="data.status == 11">
  24. <view class="paystyle">
  25. 实付款:{{data.actual_total_amount}}
  26. </view>
  27. <u-button type="default" style="margin-right: 24rpx;" size="small" shape="circle" @click="applyAfterSales(data.id)">申请售后</u-button>
  28. </view>
  29. <!-- 待收货 -->
  30. <view class="operate" v-if="data.status == 12">
  31. <u-button type="default" style="margin-right: 24rpx;" size="small" shape="circle" @click="applyAfterSales(data.id)">申请售后</u-button>
  32. <u-button type="primary" size="small" shape="circle" @click.stop="confirmReceipt(data)">确认收货</u-button>
  33. </view>
  34. <!-- 已完成 -->
  35. <view class="operate" v-if="data.status == 13">
  36. <view class="paystyle">
  37. 实付款:{{data.actual_total_amount}}
  38. </view>
  39. <u-button type="primary" size="small" shape="circle" @click.stop="goOrderInfo(data.id)">订单详情</u-button>
  40. </view>
  41. <view class="operate" v-if="data.status == 15">
  42. <view class="paystyle">
  43. 实付款:{{data.actual_total_amount}}
  44. </view>
  45. <u-button type="primary" size="small" shape="circle" @click.stop="goOrderInfo(data.id)">订单详情</u-button>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import { orderOperate } from '@/pages-mall/mixins/order-operate.js';
  51. import OrderGoodsCard from '@/pages-mall/components/order/order-goods-card.vue';
  52. export default {
  53. name: 'order-card',
  54. // 工单操作方法混入
  55. mixins: [orderOperate],
  56. components: {
  57. OrderGoodsCard
  58. },
  59. props: {
  60. // 数据源
  61. data: {
  62. type: Object,
  63. default: () => {
  64. return {};
  65. }
  66. }
  67. },
  68. data() {
  69. return {};
  70. },
  71. methods: {
  72. // 付款
  73. goPayResult(e) {
  74. },
  75. }
  76. };
  77. </script>
  78. <style lang="scss" scoped>
  79. .slot {
  80. background-color: $app-theme-bg-color;
  81. border-radius: 16rpx;
  82. box-shadow: $app-theme-shadow;
  83. // padding: 30rpx;
  84. margin-top: 20rpx;
  85. .goods {
  86. display: flex;
  87. align-items: center;
  88. align-content: space-between;
  89. padding-bottom: 26rpx;
  90. border-bottom: 1rpx solid $app-theme-border-color;
  91. margin-bottom: 32rpx;
  92. .pic {
  93. margin-right: 24rpx;
  94. }
  95. .info {
  96. width: 280rpx;
  97. margin-right: 20rpx;
  98. .title {
  99. width: 100%;
  100. display: -webkit-box;
  101. overflow: hidden;
  102. -webkit-line-clamp: 2;
  103. -webkit-box-orient: vertical;
  104. font-size: 28rpx;
  105. font-weight: 400;
  106. color: $app-theme-text-black-color;
  107. margin-bottom: 14rpx;
  108. }
  109. .desc {
  110. display: flex;
  111. justify-content: flex-start;
  112. align-items: flex-end;
  113. margin-bottom: 18rpx;
  114. .item {
  115. margin-right: 24rpx;
  116. text:nth-child(1) {
  117. font-size: 24rpx;
  118. color: $app-theme-card-gray-color;
  119. margin-right: 8rpx;
  120. }
  121. text:nth-child(2) {
  122. font-size: 24rpx;
  123. color: $app-theme-card-gray-deep-color;
  124. }
  125. }
  126. }
  127. .price {
  128. text:nth-child(1) {
  129. font-size: 16rpx;
  130. color: $app-theme-text-black-color;
  131. }
  132. text:nth-child(2) {
  133. font-size: 28rpx;
  134. color: $app-theme-text-black-color;
  135. }
  136. }
  137. }
  138. .status {
  139. width: 120rpx;
  140. .status-label {
  141. width: 100%;
  142. text-align: right;
  143. font-size: 28rpx;
  144. color: $app-theme-color;
  145. margin-bottom: 100rpx;
  146. }
  147. .num {
  148. width: 100%;
  149. text-align: right;
  150. text:nth-child(1) {
  151. font-size: 24rpx;
  152. color: $app-theme-text-gray-white-color;
  153. vertical-align: bottom;
  154. }
  155. text:nth-child(2) {
  156. font-size: 28rpx;
  157. color: $app-theme-text-gray-white-color;
  158. vertical-align: bottom;
  159. }
  160. }
  161. }
  162. }
  163. }
  164. .operate {
  165. display: flex;
  166. justify-content: flex-end;
  167. align-items: center;
  168. min-height: 90rpx;
  169. border-top: 1rpx solid $app-theme-border-color;
  170. }
  171. .paystyle{
  172. // font-weight: bold;
  173. margin-right: 20rpx;
  174. color: $app-theme-text-money-color;
  175. }
  176. </style>