index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <view :data-theme="theme">
  3. <view v-if="InvoiceList.length" class="logistics-title">
  4. <text></text>
  5. <text>当前订单已发{{deliveryNum}}个包裹</text>
  6. </view>
  7. <view class="borderPad">
  8. <view v-for="(item,index) in InvoiceList" :key="item.id" class='wrapper borRadius14'>
  9. <view class='bnt cancel' hover-class='none' @click="toLogistics(item,index)">
  10. <view v-if="item.deliveryType ==='express'" class="acea-row mb30 row-between">
  11. <text class="wrapper-title colorSize">快递配送</text>
  12. <view class="wrapper-title colorSize color-999">{{item.expressName}}:{{item.trackingNumber}}</view>
  13. </view>
  14. <view v-else-if="item.deliveryType ==='noNeed'" class="acea-row mb30 row-between">
  15. <text class="wrapper-title colorSize">无需发货</text>
  16. <view class="wrapper-title colorSize color-999 text-right line1" style="width: 80%;" :title="item.deliveryMark">{{item.deliveryMark}}</view>
  17. </view>
  18. <view v-else class="acea-row mb30 row-between">
  19. <text class="wrapper-title colorSize">商家送货</text>
  20. <view class="wrapper-title colorSize color-999">{{item.deliveryCarrier}} {{item.carrierPhone}}</view>
  21. </view>
  22. <view class="wrapper-pro acea-row">
  23. <scroll-view scroll-x="true" class="scroll_view" v-if="item.detailList.length>1">
  24. <view v-for="j in item.detailList" :key="j.id" class="wrapper-img">
  25. <easy-loadimage mode="widthFix" :image-src="j.image"></easy-loadimage>
  26. </view>
  27. </scroll-view>
  28. <view v-else class="acea-row">
  29. <image class="wrapper-img" :src="item.detailList[0].image" mode=""></image>
  30. <view class="acea-row row-column-between ml20">
  31. <view class="line2 line2-width f-s-28">
  32. {{item.detailList[0].productName}}
  33. </view>
  34. <view class="f-s-24 color-999 line2-width">
  35. {{item.detailList[0].sku}}
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="wrapper-num">共{{item.totalNum}}件商品</view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class='noCommodity' v-if="!InvoiceList.length">
  45. <view class='pictrue text-center'>
  46. <image :src="urlDomain+'crmebimage/presets/nowuliu.png'"></image>
  47. <view class="default_txt">暂无物流信息~</view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. // +----------------------------------------------------------------------
  54. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  55. // +----------------------------------------------------------------------
  56. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  57. // +----------------------------------------------------------------------
  58. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  59. // +----------------------------------------------------------------------
  60. // | Author: CRMEB Team <admin@crmeb.com>
  61. // +----------------------------------------------------------------------
  62. import {
  63. orderInvoiceListInfo
  64. } from '@/api/order.js';
  65. import {
  66. secondHandOrderInvoiceListInfo
  67. } from '@/api/secondHand.js';
  68. import easyLoadimage from '@/components/base/easy-loadimage.vue';
  69. const app = getApp();
  70. export default {
  71. components: {
  72. easyLoadimage
  73. },
  74. data() {
  75. return {
  76. urlDomain: this.$Cache.get("imgHost"),
  77. theme: app.globalData.theme,
  78. orderNo: '',
  79. orderType: '',
  80. InvoiceList: [],
  81. num: 0,
  82. deliveryNum: 0
  83. }
  84. },
  85. onLoad: function(options) {
  86. this.$set(this, 'orderNo', options.orderNo);
  87. this.$set(this, 'orderType', options.orderType);
  88. this.getOrderInvoiceListInfo(options.orderNo);
  89. },
  90. methods: {
  91. getOrderInvoiceListInfo(orderNo) {
  92. uni.showLoading({
  93. title: "正在加载中"
  94. });
  95. let api = this.orderType === 'secondHand' ? secondHandOrderInvoiceListInfo : orderInvoiceListInfo
  96. api(orderNo).then(res => {
  97. uni.hideLoading();
  98. let data = res.data;
  99. this.deliveryNum = data.deliveryNum;
  100. this.num = data.num;
  101. this.$set(this, 'InvoiceList', data.invoiceList);
  102. }).catch(err => {
  103. this.$util.Tips({
  104. title: err
  105. });
  106. });
  107. },
  108. //跳转
  109. toLogistics(item,index){
  110. //快递配送
  111. if(item.deliveryType=='express'){
  112. uni.navigateTo({
  113. url: `/pages/goods/goods_logistics/index?invoiceId=${item.id}&expressName=${item.expressName}&orderType=${this.orderType}`
  114. })
  115. //商家送货-无需发货
  116. }else{
  117. uni.navigateTo({
  118. url: `/pages/goods/send_record/index?orderNo=${this.orderNo}&index=${index}`
  119. })
  120. }
  121. }
  122. }
  123. }
  124. </script>
  125. <style scoped lang="scss">
  126. .noCommodity{
  127. padding-top: 50% !important;
  128. }
  129. .logistics {
  130. &-title {
  131. height: 62rpx;
  132. line-height: 62rpx;
  133. background: #FCFBE7;
  134. padding: 0 30rpx;
  135. color: #9F560C;
  136. font-size: 24rpx;
  137. }
  138. }
  139. .wrapper {
  140. background-color: #fff;
  141. margin-top: 14rpx;
  142. padding: 20rpx 24rpx;
  143. &-num {
  144. font-size: 20rpx;
  145. color: #999999;
  146. }
  147. &-title {
  148. color: #666666;
  149. font-size: 24rpx;
  150. }
  151. &-img {
  152. width: 120rpx;
  153. height: 120rpx;
  154. margin-right: 20rpx;
  155. border-radius: 14rpx;
  156. overflow: hidden;
  157. margin-bottom: 20rpx;
  158. image {
  159. width: 100%;
  160. height: 100%;
  161. }
  162. &:nth-child(5n) {
  163. margin-right: 0;
  164. }
  165. }
  166. }
  167. .default_txt {
  168. font-size: 26rpx;
  169. color: #999;
  170. text-align: center;
  171. }
  172. .scroll_view {
  173. white-space: nowrap;
  174. padding-top: 10rpx;
  175. border-top:1rpx solid #F0F0F0;
  176. .wrapper-img {
  177. display: inline-block;
  178. margin-right: 10rpx;
  179. }
  180. }
  181. .colorSize{
  182. font-size: 28rpx !important;
  183. }
  184. .color-999{
  185. color: #999;
  186. }
  187. .bgcolor{
  188. background-color: #E5EFFE !important;
  189. color: #2A7EFB;
  190. height: 80rpx;
  191. line-height: 80rpx;
  192. border-radius: 14rpx;
  193. }
  194. .icon-shuoming2{
  195. margin-top: 10rpx !important;
  196. margin-right: 8rpx;
  197. font-size: 28rpx;
  198. }
  199. .line2-width{
  200. width: 450rpx;
  201. }
  202. </style>