packageCard.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <template>
  2. <view class="card" @click="$emit('toInformation',itemInfo.orderStatus)">
  3. <view class="top-detail">
  4. <view class="top-left">
  5. <view class="_label-1" v-if="itemInfo.labelStatus == 0">
  6. 平台自购
  7. </view>
  8. <view class="_label-2" v-if="itemInfo.labelStatus == 1">
  9. 自寄
  10. </view>
  11. <view class="order-num">
  12. <text>订单编号:</text>
  13. <text>4873221093105892</text>
  14. </view>
  15. </view>
  16. <view class="top-right">
  17. {{orderDetail}}
  18. </view>
  19. </view>
  20. <view class="content-center">
  21. <view class="center-left-right">
  22. <view class="address">
  23. 上海市
  24. </view>
  25. <view class="name">
  26. 陈盼盼
  27. </view>
  28. </view>
  29. <image class="arrow" src="../../../static/mine/337.png" mode=""></image>
  30. <view class="center-left-right">
  31. <view class="address">
  32. 洛杉矶
  33. </view>
  34. <view class="name">
  35. Curtis Morris
  36. </view>
  37. </view>
  38. </view>
  39. <view class="price" v-if="itemInfo.orderStatus == 1">
  40. <text style="font-size: 24rpx;color: #333;">合计</text>
  41. <view style="color: #f83224;font-weight: 600;">
  42. <text style="font-size: 20rpx;">¥</text>
  43. <text>133</text>.
  44. <text style="font-size: 20rpx;">22</text>
  45. </view>
  46. </view>
  47. <view class="card-bottom">
  48. <view class="package-weight">
  49. <text>包裹重量:</text>
  50. <text>45kg</text>
  51. </view>
  52. <view class="btn-list">
  53. <button class="btn-2" v-show="itemInfo.orderStatus!=4&&itemInfo.orderStatus!=3" @click.stop="freeze">冻结</button>
  54. <button class="btn-2" v-show="itemInfo.orderStatus != 1&&itemInfo.orderStatus!=4" @click.stop="$emit('toInformation',itemInfo.orderStatus)">查看详情</button>
  55. <button class="btn-1" v-show="itemInfo.orderStatus == 1" @click.stop="toPayment">立即付款</button>
  56. <button class="btn-1" v-show="itemInfo.orderStatus == 4">去寄件</button>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. props: {
  64. itemInfo: {
  65. typeof: Object,
  66. default: {}
  67. }
  68. },
  69. computed: {
  70. orderDetail() {
  71. if (this.itemInfo.orderStatus == 0) {
  72. return "待平台收货"
  73. } else if (this.itemInfo.orderStatus == 1) {
  74. return "待付款"
  75. } else if (this.itemInfo.orderStatus == 2) {
  76. return "待发货"
  77. } else if (this.itemInfo.orderStatus == 3) {
  78. return "拼包中"
  79. } else if (this.itemInfo.orderStatus == 4) {
  80. return "待寄件"
  81. }
  82. }
  83. },
  84. data() {
  85. return {
  86. }
  87. },
  88. methods:{
  89. freeze(){},
  90. toPayment(){
  91. uni.navigateTo({
  92. url:"/pageD/paymentOrder/paymentOrder"
  93. })
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .card {
  100. padding: 28rpx 20rpx 0;
  101. background-color: #fff;
  102. border-radius: 16rpx;
  103. margin-top: 20rpx;
  104. .top-detail {
  105. display: flex;
  106. align-items: center;
  107. justify-content: space-between;
  108. .top-left {
  109. display: flex;
  110. align-items: center;
  111. ._label-1 {
  112. padding: 4rpx 8rpx;
  113. background-color: #FF1515;
  114. border-radius: 4rpx;
  115. color: #fff;
  116. font-size: 20rpx;
  117. margin-right: 10rpx;
  118. }
  119. ._label-2 {
  120. padding: 4rpx 8rpx;
  121. background-color: #FF6700;
  122. border-radius: 4rpx;
  123. color: #fff;
  124. font-size: 20rpx;
  125. margin-right: 10rpx;
  126. }
  127. .order-num {
  128. font-size: 26rpx;
  129. color: #333333;
  130. }
  131. }
  132. .top-right {
  133. color: #f83224;
  134. font-size: 26rpx;
  135. }
  136. }
  137. .content-center {
  138. display: flex;
  139. justify-content: space-around;
  140. align-items: center;
  141. margin-top: 44rpx;
  142. margin-bottom: 40rpx;
  143. .arrow {
  144. width: 130rpx;
  145. height: 10rpx;
  146. }
  147. .center-left-right {
  148. display: flex;
  149. flex-direction: column;
  150. align-items: center;
  151. justify-content: center;
  152. .address {
  153. font-weight: 600;
  154. }
  155. .name {
  156. font-size: 24rpx;
  157. color: rgba(34, 34, 34, .7);
  158. margin-top: 10rpx;
  159. }
  160. }
  161. }
  162. .price {
  163. display: flex;
  164. justify-content: flex-end;
  165. align-items: center;
  166. margin-bottom: 28rpx;
  167. }
  168. .card-bottom {
  169. display: flex;
  170. justify-content: space-between;
  171. align-items: center;
  172. padding: 30rpx 0 28rpx;
  173. border-top: 2rpx solid rgba(151, 151, 151, .2);
  174. .package-weight {
  175. font-size: 26rpx;
  176. color: #444444;
  177. }
  178. .btn-list {
  179. display: flex;
  180. .btn-1 {
  181. font-size: 28rpx;
  182. color: #fff;
  183. // border: 2rpx solid #f83224;
  184. background-color: #f83224;
  185. margin: 0;
  186. border-radius: 34rpx;
  187. min-width: 132rpx;
  188. margin-left: 20rpx;
  189. height: 68rpx;
  190. line-height: 68rpx;
  191. }
  192. .btn-2 {
  193. font-size: 28rpx;
  194. color: #222;
  195. border: 2rpx solid rgba(151, 151, 151, .7);
  196. background-color: #fff;
  197. margin: 0;
  198. border-radius: 34rpx;
  199. padding: 0;
  200. min-width: 132rpx;
  201. margin-left: 20rpx;
  202. padding: 0 20rpx;
  203. height: 68rpx;
  204. line-height: 68rpx;
  205. }
  206. }
  207. }
  208. }
  209. </style>