packageCard.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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 == 'mall_order' &&
  88. itemInfo.status == 'domestic_undelivered'
  89. "
  90. >
  91. 去寄件
  92. </button>
  93. </view>
  94. </view>
  95. </view>
  96. </template>
  97. <script>
  98. export default {
  99. props: {
  100. itemInfo: {
  101. typeof: Object,
  102. default: {},
  103. },
  104. },
  105. computed: {
  106. orderDetail() {
  107. if (this.itemInfo.orderStatus == 0) {
  108. return "待平台收货";
  109. } else if (this.itemInfo.orderStatus == 1) {
  110. return "待付款";
  111. } else if (this.itemInfo.orderStatus == 2) {
  112. return "待发货";
  113. } else if (this.itemInfo.orderStatus == 3) {
  114. return "拼包中";
  115. } else if (this.itemInfo.orderStatus == 4) {
  116. return "待寄件";
  117. }
  118. },
  119. },
  120. data() {
  121. return {};
  122. },
  123. methods: {
  124. toPayment() {
  125. uni.navigateTo({
  126. 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}`,
  127. });
  128. },
  129. toSending() {
  130. uni.navigateTo({
  131. url: "/pageD/sending/sending?orderId=" + this.itemInfo.id,
  132. });
  133. },
  134. },
  135. };
  136. </script>
  137. <style lang="scss" scoped>
  138. .card {
  139. padding: 28rpx 20rpx 0;
  140. background-color: #fff;
  141. border-radius: 16rpx;
  142. margin-top: 20rpx;
  143. .top-detail {
  144. display: flex;
  145. align-items: center;
  146. justify-content: space-between;
  147. .top-left {
  148. display: flex;
  149. align-items: center;
  150. ._label-1 {
  151. padding: 4rpx 8rpx;
  152. background-color: #ff1515;
  153. border-radius: 4rpx;
  154. color: #fff;
  155. font-size: 20rpx;
  156. margin-right: 10rpx;
  157. }
  158. ._label-2 {
  159. padding: 4rpx 8rpx;
  160. background-color: #ff6700;
  161. border-radius: 4rpx;
  162. color: #fff;
  163. font-size: 20rpx;
  164. margin-right: 10rpx;
  165. }
  166. .order-num {
  167. font-size: 26rpx;
  168. color: #333333;
  169. }
  170. }
  171. .top-right {
  172. color: #f83224;
  173. font-size: 26rpx;
  174. }
  175. }
  176. .content-center {
  177. display: flex;
  178. justify-content: space-around;
  179. align-items: center;
  180. margin-top: 44rpx;
  181. margin-bottom: 40rpx;
  182. .arrow {
  183. width: 130rpx;
  184. height: 10rpx;
  185. }
  186. .center-left-right {
  187. display: flex;
  188. flex-direction: column;
  189. align-items: center;
  190. justify-content: center;
  191. .address {
  192. font-weight: 600;
  193. }
  194. .name {
  195. font-size: 24rpx;
  196. color: rgba(34, 34, 34, 0.7);
  197. margin-top: 10rpx;
  198. }
  199. }
  200. }
  201. .price {
  202. display: flex;
  203. justify-content: flex-end;
  204. align-items: center;
  205. margin-bottom: 28rpx;
  206. }
  207. .card-bottom {
  208. display: flex;
  209. justify-content: space-between;
  210. align-items: center;
  211. padding: 30rpx 0 28rpx;
  212. border-top: 2rpx solid rgba(151, 151, 151, 0.2);
  213. .package-weight {
  214. font-size: 26rpx;
  215. color: #444444;
  216. }
  217. .btn-list {
  218. display: flex;
  219. .btn-1 {
  220. font-size: 28rpx;
  221. color: #fff;
  222. // border: 2rpx solid #f83224;
  223. background-color: #f83224;
  224. margin: 0;
  225. border-radius: 34rpx;
  226. min-width: 132rpx;
  227. margin-left: 20rpx;
  228. height: 68rpx;
  229. line-height: 68rpx;
  230. }
  231. .btn-2 {
  232. font-size: 28rpx;
  233. color: #222;
  234. border: 2rpx solid rgba(151, 151, 151, 0.7);
  235. background-color: #fff;
  236. margin: 0;
  237. border-radius: 34rpx;
  238. padding: 0;
  239. min-width: 132rpx;
  240. margin-left: 20rpx;
  241. padding: 0 20rpx;
  242. height: 68rpx;
  243. line-height: 68rpx;
  244. }
  245. }
  246. }
  247. }
  248. </style>