distribution.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="">
  3. <u-navbar
  4. title="物流详情"
  5. :autoBack="true"
  6. :safeAreaInsetTop="true"
  7. >
  8. </u-navbar>
  9. <!-- <view class="map-wrap">
  10. <map style="width: 100%; height: 300px;" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
  11. </view> -->
  12. <view class="base-info page-wrap">
  13. <view class="company base-item u-flex" v-if="details.logisticsNum">
  14. <!-- <u--image :showLoading="false" :src="companylogo" width="60rpx" height="60rpx"></u--image> -->
  15. <text>{{details.logisticsCompany}}:{{details.logisticsNum}}</text>
  16. </view>
  17. <view class="orderNo base-item">订单号:{{details.orderNum}}</view>
  18. <view class="addr base-item">收货地址:{{details.receiveAdress + details.address }}</view>
  19. </view>
  20. <view class="distribution page-wrap">
  21. <u-steps current="0" activeColor="#00A447" dot direction="column">
  22. <u-steps-item
  23. v-for="(item,index) in details.dileveryList" :key="index"
  24. :title="item.reason + dileveryStatus(item.status)"
  25. :desc="item.time">
  26. </u-steps-item>
  27. <!-- <u-steps-item title="已出库" desc="10:35"></u-steps-item> -->
  28. </u-steps>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default{
  34. data(){
  35. return {
  36. orderId:'',
  37. details:{
  38. orderNum:'',
  39. receiveAdress:'',
  40. address:''
  41. },
  42. staticUrl:this.$commonConfig.staticUrl,
  43. latitude: 30.659462,
  44. longitude: 104.065735,
  45. covers: [], //存放标记点数组
  46. companylogo:'',
  47. }
  48. },
  49. computed:{
  50. dileveryStatus(){
  51. return function(value){
  52. let dileveryList = ['下单', '揽件', '运输中', '派件中', '签收', '退回', '拒签']
  53. return ''
  54. return '-' + dileveryList[value]
  55. }
  56. }
  57. },
  58. onLoad(page) {
  59. this.orderId = page.orderId;
  60. this.getDilevery();
  61. // this.setCovers(this.latitude, this.longitude);
  62. },
  63. methods:{
  64. //设置点位
  65. setCovers(latitude, longitude) {
  66. let location = {
  67. id: 0,
  68. latitude: Number(latitude),
  69. longitude: Number(longitude),
  70. width: uni.upx2px(50),
  71. height: uni.upx2px(55),
  72. iconPath:this.$commonConfig.staticUrl+ '/img/index-nav-2.png'
  73. // iconPath: './../../static/location.png'
  74. }
  75. this.covers = [location]
  76. },
  77. getDilevery(){
  78. this.$u.api.getDilevery({orderId:this.orderId}).then(res=>{
  79. this.details = res.data;
  80. this.details.dileveryList = res.data.dileveryList.reverse();
  81. console.log('res',res.data);
  82. }).catch(err=>{
  83. console.log('getDilevery',err);
  84. })
  85. }
  86. }
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. .base-info{
  91. background-color: #fff;
  92. font-size: 32rpx;
  93. font-weight: 400;
  94. color: #333333;
  95. line-height: 45rpx;
  96. .base-item{
  97. padding: 20rpx;
  98. border-bottom: 0.5px solid #eee;
  99. }
  100. .company{
  101. font-weight: 600;
  102. color: #00A447;
  103. }
  104. .orderNo{
  105. }
  106. }
  107. .distribution{
  108. /deep/.u-steps{
  109. font-weight: 400;
  110. .u-text__value{
  111. font-size: 32rpx;
  112. color: #999999;
  113. line-height: 45rpx;
  114. }
  115. .u-text__value--main{
  116. color: #00A447;
  117. }
  118. .u-text__value--tips{
  119. font-size: 24rpx;
  120. line-height: 33rpx;
  121. }
  122. }
  123. }
  124. </style>