distribution.vue 3.0 KB

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