distribution.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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"
  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. onLoad(page) {
  50. this.orderId = page.orderId;
  51. this.getDilevery();
  52. // this.setCovers(this.latitude, this.longitude);
  53. },
  54. methods:{
  55. //设置点位
  56. setCovers(latitude, longitude) {
  57. let location = {
  58. id: 0,
  59. latitude: Number(latitude),
  60. longitude: Number(longitude),
  61. width: uni.upx2px(50),
  62. height: uni.upx2px(55),
  63. iconPath:this.$commonConfig.staticUrl+ '/img/index-nav-2.png'
  64. // iconPath: './../../static/location.png'
  65. }
  66. this.covers = [location]
  67. },
  68. getDilevery(){
  69. this.$u.api.getDilevery({orderId:this.orderId}).then(res=>{
  70. this.details = res.data;
  71. console.log('res',res.data);
  72. }).catch(err=>{
  73. console.log('getDilevery',err);
  74. })
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .base-info{
  81. background-color: #fff;
  82. font-size: 32rpx;
  83. font-weight: 400;
  84. color: #333333;
  85. line-height: 45rpx;
  86. .base-item{
  87. padding: 20rpx;
  88. border-bottom: 0.5px solid #eee;
  89. }
  90. .company{
  91. font-weight: 600;
  92. color: #00A447;
  93. }
  94. .orderNo{
  95. }
  96. }
  97. .distribution{
  98. /deep/.u-steps{
  99. font-weight: 400;
  100. .u-text__value{
  101. font-size: 32rpx;
  102. color: #999999;
  103. line-height: 45rpx;
  104. }
  105. .u-text__value--main{
  106. color: #00A447;
  107. }
  108. .u-text__value--tips{
  109. font-size: 24rpx;
  110. line-height: 33rpx;
  111. }
  112. }
  113. }
  114. </style>