123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <template>
- <view>
- <u-navbar
- title="车主信息"
- title-color="#fff"
- :custom-back="customBack"
- :border-bottom="false"
- back-icon-color="#CCE8FF"
- :background="{background: 'linear-gradient(145deg, #41AFF9 0%, #2D8CFB 100%)' }"></u-navbar>
-
- <u-empty class="u-m-t-50" text="很棒!没有欠费订单!" mode="list" v-if="listEmpty"></u-empty>
- <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" >
- <view class="owelist">
- <view class="owelist-item" v-for="(item,index) in owelist" :key="item.id">
- <view class="item-header u-flex u-row-between">
- <view class="vehicle-no">{{item.vehicleNo}}</view>
- <view class="space-name">{{item.spaceName}}</view>
- </view>
- <view class="road-name u-flex">
- <u-icon name="map-fill" color="#3397FA" size="36"></u-icon>
- {{item.roadName}}
- </view>
- <view class="info-item">进场时间:{{item.inTime}}</view>
- <view class="info-item">出场时间:{{item.outTime}}</view>
- <view class="info-item">停车时长:{{item.duration}}</view>
- <view class="info-item">欠费金额:<span class="amount">{{item.payAmount}}元</span></view>
- </view>
- </view>
- </mescroll-body>
- <u-toast ref="uToast" />
- </view>
- </template>
- <script>
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- export default{
- mixins: [MescrollMixin], // 使用mixin
- data(){
- return{
- orderID:'',
- listEmpty:false,
- owelist:[],
- pagination:Object.assign({}, {pageNo: 1,pageSize: 10}),
- }
- },
- onLoad(page){
- this.orderID = page.orderID;
- console.log('this.orderID',this.orderID)
- },
- onShow(){
- // this.owelist = [];
- // this.handleEntranceOutDetail();
- },
- onReachBottom() {
- // this.getData();
- console.log('111')
- },
- methods:{
- customBack(){
- this.$u.route({
- // type:'switchTab',
- url: 'pages/index/index'
- });
- },
- handleEntranceOutDetail(){
- uni.showLoading({});
- this.$u.api.entranceOutDetail({spaceId:this.orderID})
- .then(res=>{
- uni.hideLoading();
- // this.$refs.uToast.show({
- // title: res.msg,
- // type: 'success',
- // });
- this.leaveDetail = res.data;
- for (let item of res.data.oweList) {
- this.owelist.push(item)
- }
- if(this.owelist.length<=0){this.listEmpty = true};
-
- console.log('entranceOutDetail',res)
- }).catch(err=>{
- uni.hideLoading();
- this.$refs.uToast.show({
- title: err.msg,
- type: 'error',
- });
- console.log('entranceOutDetail ',err)
- });
-
- },
- downCallback(){
- this.mescroll.resetUpScroll();
- },
- upCallback(page){
- console.log('upCallback ',page);
- let pageNum = page.num; // 页码, 默认从1开始
- let pageSize = page.size; // 页长, 默认每页10条
- this.$u.api.entranceOutDetail({spaceId:this.orderID})
- .then(res=>{
- // uni.hideLoading();
- // this.$refs.uToast.show({
- // title: res.msg,
- // type: 'success',
- // });
- this.leaveDetail = res.data;
- for (let item of res.data.oweList) {
- this.owelist.push(item)
- }
- if(this.owelist.length<=0){this.listEmpty = true};
-
- console.log('entranceOutDetail',res)
- }).catch(err=>{
- // uni.hideLoading();
- this.$refs.uToast.show({
- title: err.msg,
- type: 'error',
- });
- console.log('entranceOutDetail ',err)
- });
-
- }
-
- }
- }
- </script>
- <style lang="scss">
- @import './ownersinfo.scss'
- </style>
|