orderDetails.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <view class="content-orderDetails">
  3. <view class="flex justify_center align_center order-states">
  4. <u-image src="/static/order/prescription_order_icon_pay.png" width="48" height="48"></u-image>
  5. <text>{{pageInfo.orderStatusDictValue||''}}</text>
  6. </view>
  7. <view class="flex justify_center order-time">下单时间:{{pageInfo.createDate||'--'}}</view>
  8. <view class="order-info">
  9. <view class="flex justify_between item">
  10. <text>店铺名称</text>
  11. <text>{{pageInfo.customerName||'--'}}</text>
  12. </view>
  13. <view class="flex justify_between item">
  14. <text>订单编号</text>
  15. <text>{{pageInfo.orderReserveNo|| '--'}}</text>
  16. </view>
  17. <view class="flex justify_between item">
  18. <text>服务骑手</text>
  19. <text>{{pageInfo.name||'--'}}</text>
  20. </view>
  21. </view>
  22. <view class="order-info">
  23. <view class="flex justify_between item">
  24. <text>下单用户</text>
  25. <text>{{pageInfo.contactMobile||'--'}}</text>
  26. </view>
  27. </view>
  28. <view class="order-info" v-if="pageInfo.orderStatus=='FINISH'">
  29. <view class="flex flex_column item type">
  30. <view>回收品类明细</view>
  31. <view></view>
  32. </view>
  33. <view class="flex justify_between item">
  34. <text>黄纸1.2元/千克</text>
  35. <text>5千克/6元</text>
  36. </view>
  37. <view class="flex justify_between item">
  38. <text>黄纸1.2元/千克</text>
  39. <text>5千克/6元</text>
  40. </view>
  41. <view class="flex justify_between item">
  42. <text>黄纸1.2元/千克</text>
  43. <text>5千克/6元</text>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. import {orderDetail}from '@/api/order.js'
  50. export default{
  51. data(){
  52. return{
  53. pageInfo:null,
  54. orderId:'' // 订单id
  55. }
  56. },
  57. onLoad(query) {
  58. console.log(query,query.id,'============订单')
  59. if(query){
  60. this.orderId=query.id
  61. this.getPageInfo()
  62. }
  63. },
  64. methods:{
  65. getPageInfo(){
  66. orderDetail({id:this.orderId}).then(res=>{
  67. console.log(res,'============订单详情')
  68. if(res.status==200){
  69. this.pageInfo=res.data
  70. }else{
  71. uni.showToast({
  72. title:res.message,
  73. icon:'none'
  74. })
  75. }
  76. })
  77. }
  78. }
  79. }
  80. </script>
  81. <style lang="less">
  82. .content-orderDetails{
  83. width: 100%;
  84. height: 100vh;
  85. padding: 44upx 32upx;
  86. background-color: #f5f5f5;
  87. .order-states{
  88. margin-bottom: 10upx;
  89. text{
  90. display: inline-block;
  91. margin: 0 10upx;
  92. font-size: 42upx;
  93. color: #191919;
  94. }
  95. }
  96. .order-time{
  97. margin-bottom: 30upx;
  98. }
  99. .order-info{
  100. margin-bottom: 20upx;
  101. background: #FFFFFF;
  102. border-radius: 24upx;
  103. font-weight: 400;
  104. color: #191919;
  105. .item{
  106. padding: 30upx;
  107. border-bottom: 1px soild #bbb;
  108. // &:first-child{
  109. // color: #7C7D7E;
  110. // }
  111. }
  112. .item>text:first-child{
  113. color: #7C7D7E;
  114. }
  115. .type{
  116. color: #7C7D7E;
  117. }
  118. }
  119. }
  120. </style>