owelist.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view>
  3. <u-navbar
  4. title="历史欠费"
  5. title-color="#fff"
  6. :custom-back="customBack"
  7. :border-bottom="false"
  8. back-icon-color="#CCE8FF"
  9. :background="{background: 'linear-gradient(145deg, #41AFF9 0%, #2D8CFB 100%)' }"></u-navbar>
  10. <view class="owelist">
  11. <view class="owelist-item" v-for="(item,index) in owelist" :key="item.id">
  12. <view class="item-header u-flex u-row-between">
  13. <view class="vehicle-no">{{item.vehicleNo}}</view>
  14. <view class="space-name">{{item.spaceName}}</view>
  15. </view>
  16. <view class="road-name u-flex">
  17. <u-icon name="map-fill" color="#3397FA" size="36"></u-icon>
  18. {{item.roadName}}
  19. </view>
  20. <view class="info-item">进场时间:{{item.inTime}}</view>
  21. <view class="info-item">出场时间:{{item.outTime}}</view>
  22. <view class="info-item">停车时长:{{item.duration}}</view>
  23. <view class="info-item">欠费金额:<span class="u-type-warning">{{item.payAmount}}元</span></view>
  24. </view>
  25. </view>
  26. <u-toast ref="uToast" />
  27. </view>
  28. </template>
  29. <script>
  30. export default{
  31. data(){
  32. return{
  33. orderID:'',
  34. leaveDetail:[],
  35. owelist:[],
  36. }
  37. },
  38. onLoad(page){
  39. this.orderID = page.orderID;
  40. console.log('this.orderID',this.orderID)
  41. },
  42. onShow(){
  43. this.handleEntranceOutDetail();
  44. },
  45. methods:{
  46. customBack(){
  47. this.$u.route({
  48. // type:'switchTab',
  49. url: 'pages/index/index'
  50. });
  51. },
  52. handleEntranceOutDetail(){
  53. this.$u.api.entranceOutDetail({spaceId:this.orderID})
  54. .then(res=>{
  55. // this.$refs.uToast.show({
  56. // title: res.msg,
  57. // type: 'success',
  58. // });
  59. this.leaveDetail = res.data;
  60. this.owelist = res.data.oweList;
  61. console.log('entranceOutDetail',res)
  62. }).catch(err=>{
  63. this.$refs.uToast.show({
  64. title: err.msg,
  65. type: 'error',
  66. });
  67. console.log('entranceOutDetail ',err)
  68. });
  69. },
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. @import './owelist.scss'
  75. </style>