packageCard.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <template>
  2. <view class="card" @click="$emit('toInformation', itemInfo)">
  3. <view class="top-detail">
  4. <view class="top-left">
  5. <view class="_label-1" v-if="itemInfo.mall_order_id > 0">
  6. 平台自购
  7. </view>
  8. <view class="_label-2" v-else-if="itemInfo.mall_order_id == 0">
  9. 自寄
  10. </view>
  11. <view class="order-num">
  12. <text>订单编号:</text>
  13. <text style="font-size: 24rpx">{{ itemInfo.order_no }}</text>
  14. </view>
  15. </view>
  16. <view class="top-right">
  17. {{ itemInfo.status_text }}
  18. </view>
  19. </view>
  20. <view class="content-center">
  21. <view class="center-left-right">
  22. <view class="address"> {{ itemInfo.from_province_name || "" }} </view>
  23. <view class="name"> {{ itemInfo.from_name }} </view>
  24. </view>
  25. <image class="arrow" src="../../../static/mine/337.png" mode=""></image>
  26. <view class="center-left-right">
  27. <view class="address"> {{ itemInfo.to_province_name || "" }} </view>
  28. <view class="name"> {{ itemInfo.to_name }} </view>
  29. </view>
  30. </view>
  31. <view class="price" v-if="itemInfo.status == 'unpaid'">
  32. <text style="font-size: 24rpx; color: #333">合计</text>
  33. <view style="color: #f83224; font-weight: 600">
  34. <text style="font-size: 20rpx">¥</text>
  35. <text>{{ itemInfo.gap_price.split(".")[0] }}</text
  36. >.
  37. <text style="font-size: 20rpx">{{
  38. itemInfo.gap_price.split(".")[1]
  39. }}</text>
  40. </view>
  41. </view>
  42. <view class="card-bottom">
  43. <view class="package-weight">
  44. <text>包裹重量:</text>
  45. <text>{{ Number(itemInfo.actual_weight) }}kg</text>
  46. </view>
  47. <view class="btn-list">
  48. <button
  49. class="btn-2"
  50. v-show="
  51. itemInfo.status == 'domestic_delivered' ||
  52. itemInfo.status == 'imperfect' ||
  53. itemInfo.status == 'overseas_undelivered' ||
  54. itemInfo.status == 'unpaid' ||
  55. itemInfo.status == 'group_unpaid' ||
  56. itemInfo.status == 'domestic_received'
  57. "
  58. @click.stop="$emit('freeze', itemInfo)"
  59. >
  60. {{ itemInfo.is_frozen == 0 ? "冻结" : "恢复" }}
  61. </button>
  62. <button
  63. class="btn-2"
  64. v-show="
  65. itemInfo.status == 'domestic_delivered' ||
  66. itemInfo.status == 'overseas_undelivered' ||
  67. itemInfo.status == 'overseas_delivered' ||
  68. itemInfo.status == 'packaging'
  69. "
  70. @click.stop="$emit('toInformation', itemInfo)"
  71. >
  72. 查看详情
  73. </button>
  74. <button
  75. class="btn-1"
  76. v-show="
  77. itemInfo.status == 'unpaid' || itemInfo.status == 'group_unpaid'
  78. "
  79. @click.stop="toPayment"
  80. >
  81. 立即付款
  82. </button>
  83. <button
  84. class="btn-1"
  85. @click.stop="toSending"
  86. v-show="
  87. (itemInfo.type == 'group_package' ||
  88. itemInfo.type == 'express_order') &&
  89. itemInfo.status == 'domestic_undelivered'
  90. "
  91. >
  92. 去寄件
  93. </button>
  94. </view>
  95. </view>
  96. </view>
  97. </template>
  98. <script>
  99. export default {
  100. props: {
  101. itemInfo: {
  102. typeof: Object,
  103. default: {},
  104. },
  105. },
  106. computed: {
  107. orderDetail() {
  108. if (this.itemInfo.orderStatus == 0) {
  109. return "待平台收货";
  110. } else if (this.itemInfo.orderStatus == 1) {
  111. return "待付款";
  112. } else if (this.itemInfo.orderStatus == 2) {
  113. return "待发货";
  114. } else if (this.itemInfo.orderStatus == 3) {
  115. return "拼包中";
  116. } else if (this.itemInfo.orderStatus == 4) {
  117. return "待寄件";
  118. }
  119. },
  120. },
  121. data() {
  122. return {};
  123. },
  124. methods: {
  125. toPayment() {
  126. uni.navigateTo({
  127. url: `/pageD/paymentOrder/paymentOrder?money=${this.itemInfo.gap_price}&weight=${this.itemInfo.actual_weight}&packageType=${this.itemInfo.goods[0].type_text}&num=${this.itemInfo.goods[0].number}&orderid=${this.itemInfo.id}&type=${this.itemInfo.type}`,
  128. });
  129. },
  130. toSending() {
  131. uni.navigateTo({
  132. url: "/pageD/sending/sending?orderId=" + this.itemInfo.id,
  133. });
  134. },
  135. },
  136. };
  137. </script>
  138. <style lang="scss" scoped>
  139. .card {
  140. padding: 28rpx 20rpx 0;
  141. background-color: #fff;
  142. border-radius: 16rpx;
  143. margin-top: 20rpx;
  144. .top-detail {
  145. display: flex;
  146. align-items: center;
  147. justify-content: space-between;
  148. .top-left {
  149. display: flex;
  150. align-items: center;
  151. ._label-1 {
  152. padding: 4rpx 8rpx;
  153. background-color: #ff1515;
  154. border-radius: 4rpx;
  155. color: #fff;
  156. font-size: 20rpx;
  157. margin-right: 10rpx;
  158. }
  159. ._label-2 {
  160. padding: 4rpx 8rpx;
  161. background-color: #ff6700;
  162. border-radius: 4rpx;
  163. color: #fff;
  164. font-size: 20rpx;
  165. margin-right: 10rpx;
  166. }
  167. .order-num {
  168. font-size: 26rpx;
  169. color: #333333;
  170. }
  171. }
  172. .top-right {
  173. color: #f83224;
  174. font-size: 26rpx;
  175. }
  176. }
  177. .content-center {
  178. display: flex;
  179. justify-content: space-around;
  180. align-items: center;
  181. margin-top: 44rpx;
  182. margin-bottom: 40rpx;
  183. .arrow {
  184. width: 130rpx;
  185. height: 10rpx;
  186. }
  187. .center-left-right {
  188. display: flex;
  189. flex-direction: column;
  190. align-items: center;
  191. justify-content: center;
  192. .address {
  193. font-weight: 600;
  194. }
  195. .name {
  196. font-size: 24rpx;
  197. color: rgba(34, 34, 34, 0.7);
  198. margin-top: 10rpx;
  199. }
  200. }
  201. }
  202. .price {
  203. display: flex;
  204. justify-content: flex-end;
  205. align-items: center;
  206. margin-bottom: 28rpx;
  207. }
  208. .card-bottom {
  209. display: flex;
  210. justify-content: space-between;
  211. align-items: center;
  212. padding: 30rpx 0 28rpx;
  213. border-top: 2rpx solid rgba(151, 151, 151, 0.2);
  214. .package-weight {
  215. font-size: 26rpx;
  216. color: #444444;
  217. }
  218. .btn-list {
  219. display: flex;
  220. .btn-1 {
  221. font-size: 28rpx;
  222. color: #fff;
  223. // border: 2rpx solid #f83224;
  224. background-color: #f83224;
  225. margin: 0;
  226. border-radius: 34rpx;
  227. min-width: 132rpx;
  228. margin-left: 20rpx;
  229. height: 68rpx;
  230. line-height: 68rpx;
  231. }
  232. .btn-2 {
  233. font-size: 28rpx;
  234. color: #222;
  235. border: 2rpx solid rgba(151, 151, 151, 0.7);
  236. background-color: #fff;
  237. margin: 0;
  238. border-radius: 34rpx;
  239. padding: 0;
  240. min-width: 132rpx;
  241. margin-left: 20rpx;
  242. padding: 0 20rpx;
  243. height: 68rpx;
  244. line-height: 68rpx;
  245. }
  246. }
  247. }
  248. }
  249. </style>