index.vue 5.8 KB

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