express-list.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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">
  47. <view v-for="express_no in deItem.expressNumList" :key="index">{{express_no}}</view>
  48. </view>
  49. </view>
  50. <view class="dir-left-nowrap item">
  51. <view class="box-grow-0">商家留言:</view>
  52. <view class="box-grow-1">{{deItem.merchant_remark}}</view>
  53. </view>
  54. </view>
  55. <view class="box-grow-1 express-info" v-else>物流信息:{{deItem.express_content}}</view>
  56. <view v-if="deItem.send_type == 1" class="cross-center box-grow-0">
  57. <app-image width="12rpx" height="22rpx" imgSrc="/static/image/icon/arrow-right.png"></app-image>
  58. </view>
  59. </template>
  60. </view>
  61. <view class="dir-left-wrap">
  62. <view class="image" v-for="erItem in deItem.expressRelation" :key="erItem.id">
  63. <app-image width="124rpx" height="124rpx" :imgSrc="erItem.orderDetail.goods_info.goods_attr.cover_pic"></app-image>
  64. </view>
  65. </view>
  66. <view class="goods-num">共{{deItem.goods_num}}件商品</view>
  67. </view>
  68. </app-jump-button>
  69. </view>
  70. </view>
  71. </app-layout>
  72. </template>
  73. <script>
  74. export default {
  75. data() {
  76. return {
  77. is_show: false,
  78. orderId: null,
  79. order: [],
  80. }
  81. },
  82. methods: {
  83. getOrderDetail() {
  84. this.$showLoading();
  85. this.$request({
  86. url: this.$api.order.order_express_list,
  87. data: {
  88. order_id: this.orderId,
  89. }
  90. }).then(response => {
  91. this.$hideLoading();
  92. this.is_show = true;
  93. if (response.code === 0) {
  94. this.order = response.data.order;
  95. } else {
  96. uni.showModal({
  97. title: '',
  98. content: response.msg,
  99. showCancel: false,
  100. });
  101. }
  102. }).catch(() => {
  103. this.$hideLoading();
  104. });
  105. },
  106. getPageUrl(expressInfo, coverPic) {
  107. if (expressInfo && expressInfo.send_type == 1 && this.order.send_type != 2) {
  108. let express_no = expressInfo.expressNumList.join(",");
  109. return `/pages/order/express-detail/express-detail?express=${expressInfo.express}&customer_name=${expressInfo.customer_name}&express_no=${express_no}&cover_pic=${coverPic}`
  110. } else {
  111. return '';
  112. }
  113. },
  114. },
  115. onLoad(options) {
  116. this.orderId = options.order_id
  117. this.getOrderDetail();
  118. }
  119. }
  120. </script>
  121. <style lang="scss" scoped>
  122. .top-box {
  123. width: 100%;
  124. height: #{100rpx};
  125. background: #feeeee;
  126. margin-bottom: #{20rpx};
  127. .title {
  128. margin-left: #{24rpx};
  129. color: #ff4544;
  130. font-size: #{28rpx};
  131. }
  132. }
  133. .express-box {
  134. padding: #{32rpx} #{24rpx} #{20rpx};
  135. background: #ffffff;
  136. .express-info {
  137. font-size: #{28rpx};
  138. margin-bottom: #{20rpx};
  139. color: #353535;
  140. .item {
  141. margin-bottom: #{24rpx};
  142. }
  143. }
  144. .goods-num {
  145. font-size: #{24rpx};
  146. color: #999999;
  147. margin: #{20rpx} 0;
  148. }
  149. .image {
  150. margin-right: #{20rpx};
  151. margin-top: #{20rpx};
  152. }
  153. }
  154. .city-service {
  155. width: 100%;
  156. margin-bottom: 10#{rpx};
  157. .await-man {
  158. margin-left: #{12rpx};
  159. font-size: #{28rpx};
  160. color:#666666;
  161. }
  162. .info-box {
  163. margin-left: #{12rpx};
  164. .info-label {
  165. margin-bottom: #{10rpx};
  166. color: #999999;
  167. font-size: #{28rpx};
  168. }
  169. .info {
  170. color: #666666;
  171. }
  172. }
  173. .head {
  174. width: #{75rpx};
  175. height: #{75rpx};
  176. }
  177. .icon-box {
  178. padding: 0 #{40rpx};
  179. border-left: #{2rpx} solid #e2e2e2;
  180. .icon {
  181. width: #{45rpx};
  182. height: #{45rpx};
  183. }
  184. }
  185. }
  186. </style>