express-list.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <app-layout>
  3. <view v-if="is_show" class='express-list-box dir-top-nowrap'>
  4. <view class="top-box cross-center">
  5. <view class="title">{{order.detailExpress.length}}个包裹已发出</view>
  6. </view>
  7. <view class="express-box" v-for="deItem in order.detailExpress" :key="item.id">
  8. <app-jump-button :url="getPageUrl(deItem, deItem.expressRelation[0].orderDetail.goods_info.goods_attr.cover_pic)">
  9. <view style="width: 100%">
  10. <view class="dir-left-nowrap express-item">
  11. <!-- 同城配送 -->
  12. <template v-if="order.send_type == 2">
  13. <view class="dir-left-nowrap cross-center city-service">
  14. <image class="head" src="/static/image/icon/deliveryman.png"></image>
  15. <template v-if="deItem.city_name && deItem.city_mobile">
  16. <view class="info-box dir-top-nowrap box-grow-1">
  17. <view class="info-label">配送员</view>
  18. <view class="info">{{deItem.city_name}} {{deItem.city_mobile}}</view>
  19. </view>
  20. <view class="icon-box">
  21. <app-jump-button open_type="tel" :number="deItem.city_mobile">
  22. <image class="icon" src="/static/image/icon/store-tel.png"></image>
  23. </app-jump-button>
  24. </view>
  25. <!-- 第三方配送才有地图信息 -->
  26. <view v-if="deItem.send_type == 1" class="icon-box">
  27. <app-jump-button open_type="navigate" :url="'/pages/order/city-map/city-map?express_id=' + deItem.id">
  28. <image class="icon" src="/static/image/icon/see-location.png"></image>
  29. </app-jump-button>
  30. </view>
  31. </template>
  32. <template v-else>
  33. <view class="await-man">等待分配骑手</view>
  34. </template>
  35. </view>
  36. </template>
  37. <!-- 快递配送 -->
  38. <template v-else>
  39. <view v-if="deItem.send_type == 1" class="dir-top-nowrap box-grow-1 express-info">
  40. <view class="dir-left-nowrap item">
  41. <view class="box-grow-0">快递公司:</view>
  42. <view class="box-grow-1">{{deItem.express}}</view>
  43. </view>
  44. <view class="dir-left-nowrap item">
  45. <view class="box-grow-0">物流单号:</view>
  46. <view class="box-grow-1">{{deItem.express_no}}</view>
  47. </view>
  48. <view class="dir-left-nowrap item">
  49. <view class="box-grow-0">商家留言:</view>
  50. <view class="box-grow-1">{{deItem.merchant_remark}}</view>
  51. </view>
  52. </view>
  53. <view class="box-grow-1 express-info" v-else>物流信息:{{deItem.express_content}}</view>
  54. <view v-if="deItem.send_type == 1" class="cross-center box-grow-0">
  55. <app-image width="12rpx" height="22rpx" imgSrc="/static/image/icon/arrow-right.png"></app-image>
  56. </view>
  57. </template>
  58. </view>
  59. <view class="dir-left-wrap">
  60. <view class="image" v-for="erItem in deItem.expressRelation" :key="erItem.id">
  61. <app-image width="124rpx" height="124rpx" :imgSrc="erItem.orderDetail.goods_info.goods_attr.cover_pic"></app-image>
  62. </view>
  63. </view>
  64. <view class="goods-num">共{{deItem.goods_num}}件商品</view>
  65. </view>
  66. </app-jump-button>
  67. </view>
  68. </view>
  69. </app-layout>
  70. </template>
  71. <script>
  72. export default {
  73. data() {
  74. return {
  75. is_show: false,
  76. orderId: null,
  77. order: [],
  78. }
  79. },
  80. methods: {
  81. getOrderDetail() {
  82. this.$showLoading();
  83. this.$request({
  84. url: this.$api.order.order_express_list,
  85. data: {
  86. order_id: this.orderId,
  87. }
  88. }).then(response => {
  89. this.$hideLoading();
  90. this.is_show = true;
  91. if (response.code === 0) {
  92. this.order = response.data.order;
  93. } else {
  94. uni.showModal({
  95. title: '',
  96. content: response.msg,
  97. showCancel: false,
  98. });
  99. }
  100. }).catch(() => {
  101. this.$hideLoading();
  102. });
  103. },
  104. getPageUrl(expressInfo, coverPic) {
  105. if (expressInfo && expressInfo.send_type == 1 && this.order.send_type != 2) {
  106. return `/pages/order/express-detail/express-detail?express=${expressInfo.express}&customer_name=${expressInfo.customer_name}&express_no=${expressInfo.express_no}&cover_pic=${coverPic}`
  107. } else {
  108. return '';
  109. }
  110. },
  111. },
  112. onLoad(options) {
  113. this.orderId = options.order_id
  114. this.getOrderDetail();
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .top-box {
  120. width: 100%;
  121. height: #{100rpx};
  122. background: #feeeee;
  123. margin-bottom: #{20rpx};
  124. .title {
  125. margin-left: #{24rpx};
  126. color: #ff4544;
  127. font-size: #{28rpx};
  128. }
  129. }
  130. .express-box {
  131. padding: #{32rpx} #{24rpx} #{20rpx};
  132. background: #ffffff;
  133. .express-info {
  134. font-size: #{28rpx};
  135. margin-bottom: #{20rpx};
  136. color: #353535;
  137. .item {
  138. margin-bottom: #{24rpx};
  139. }
  140. }
  141. .goods-num {
  142. font-size: #{24rpx};
  143. color: #999999;
  144. margin: #{20rpx} 0;
  145. }
  146. .image {
  147. margin-right: #{20rpx};
  148. margin-top: #{20rpx};
  149. }
  150. }
  151. .city-service {
  152. width: 100%;
  153. margin-bottom: 10#{rpx};
  154. .await-man {
  155. margin-left: #{12rpx};
  156. font-size: #{28rpx};
  157. color:#666666;
  158. }
  159. .info-box {
  160. margin-left: #{12rpx};
  161. .info-label {
  162. margin-bottom: #{10rpx};
  163. color: #999999;
  164. font-size: #{28rpx};
  165. }
  166. .info {
  167. color: #666666;
  168. }
  169. }
  170. .head {
  171. width: #{75rpx};
  172. height: #{75rpx};
  173. }
  174. .icon-box {
  175. padding: 0 #{40rpx};
  176. border-left: #{2rpx} solid #e2e2e2;
  177. .icon {
  178. width: #{45rpx};
  179. height: #{45rpx};
  180. }
  181. }
  182. }
  183. </style>