index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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 easyLoadimage from '@/components/base/easy-loadimage.vue';
  66. const app = getApp();
  67. export default {
  68. components: {
  69. easyLoadimage
  70. },
  71. data() {
  72. return {
  73. urlDomain: this.$Cache.get("imgHost"),
  74. theme: app.globalData.theme,
  75. orderNo: '',
  76. InvoiceList: [],
  77. num: 0,
  78. deliveryNum: 0
  79. }
  80. },
  81. onLoad: function(options) {
  82. this.$set(this, 'orderNo', options.orderNo);
  83. this.getOrderInvoiceListInfo(options.orderNo);
  84. },
  85. methods: {
  86. getOrderInvoiceListInfo(orderNo) {
  87. uni.showLoading({
  88. title: "正在加载中"
  89. });
  90. orderInvoiceListInfo(orderNo).then(res => {
  91. uni.hideLoading();
  92. let data = res.data;
  93. this.deliveryNum = data.deliveryNum;
  94. this.num = data.num;
  95. this.$set(this, 'InvoiceList', data.invoiceList);
  96. }).catch(err => {
  97. this.$util.Tips({
  98. title: err
  99. });
  100. });
  101. },
  102. //跳转
  103. toLogistics(item,index){
  104. //快递配送
  105. if(item.deliveryType=='express'){
  106. uni.navigateTo({
  107. url: `/pages/goods/goods_logistics/index?invoiceId=${item.id}&expressName=${item.expressName}`
  108. })
  109. //商家送货-无需发货
  110. }else{
  111. uni.navigateTo({
  112. url: `/pages/goods/send_record/index?orderNo=${this.orderNo}&index=${index}`
  113. })
  114. }
  115. }
  116. }
  117. }
  118. </script>
  119. <style scoped lang="scss">
  120. .noCommodity{
  121. padding-top: 50% !important;
  122. }
  123. .logistics {
  124. &-title {
  125. height: 62rpx;
  126. line-height: 62rpx;
  127. background: #FCFBE7;
  128. padding: 0 30rpx;
  129. color: #9F560C;
  130. font-size: 24rpx;
  131. }
  132. }
  133. .wrapper {
  134. background-color: #fff;
  135. margin-top: 14rpx;
  136. padding: 20rpx 24rpx;
  137. &-num {
  138. font-size: 20rpx;
  139. color: #999999;
  140. }
  141. &-title {
  142. color: #666666;
  143. font-size: 24rpx;
  144. }
  145. &-img {
  146. width: 120rpx;
  147. height: 120rpx;
  148. margin-right: 20rpx;
  149. border-radius: 14rpx;
  150. overflow: hidden;
  151. margin-bottom: 20rpx;
  152. image {
  153. width: 100%;
  154. height: 100%;
  155. }
  156. &:nth-child(5n) {
  157. margin-right: 0;
  158. }
  159. }
  160. }
  161. .default_txt {
  162. font-size: 26rpx;
  163. color: #999;
  164. text-align: center;
  165. }
  166. .scroll_view {
  167. white-space: nowrap;
  168. padding-top: 10rpx;
  169. border-top:1rpx solid #F0F0F0;
  170. .wrapper-img {
  171. display: inline-block;
  172. margin-right: 10rpx;
  173. }
  174. }
  175. .colorSize{
  176. font-size: 28rpx !important;
  177. }
  178. .color-999{
  179. color: #999;
  180. }
  181. .bgcolor{
  182. background-color: #E5EFFE !important;
  183. color: #2A7EFB;
  184. height: 80rpx;
  185. line-height: 80rpx;
  186. border-radius: 14rpx;
  187. }
  188. .icon-shuoming2{
  189. margin-top: 10rpx !important;
  190. margin-right: 8rpx;
  191. font-size: 28rpx;
  192. }
  193. .line2-width{
  194. width: 450rpx;
  195. }
  196. </style>