Commit 8485f4f5 authored by Facius's avatar Facius

备件订单页面滚动

parent 34119e41
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
return '#2272FF' return '#2272FF'
} }
}, },
// 待签收 15 -> 已签收 20; 10 待审核 1 -> 已取消 -1 // 待签收 15 -> 已签收 20; 待审核 1 -> 已取消 -1
willStatuses() { willStatuses() {
return { return {
'1': '-1', '1': '-1',
......
...@@ -13,26 +13,28 @@ ...@@ -13,26 +13,28 @@
<u-tabs height="66" activeColor="#2272FF" bg-color="none" inactive-color="#999" bar-height="4" <u-tabs height="66" activeColor="#2272FF" bg-color="none" inactive-color="#999" bar-height="4"
bar-width="44" :offset="[0,0]" :list="list" count="total" :current="currentIndex" @change="change" bar-width="44" :offset="[0,0]" :list="list" count="total" :current="currentIndex" @change="change"
:is-scroll="false" font-size="28" bold></u-tabs> :is-scroll="false" font-size="28" bold></u-tabs>
</view> </view>
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring <view class="tab-view">
refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @scroll="scroll" <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring
:scroll-top="scrollTop" refresher-background="#F4F5F7" @refresherpulling="triggered = true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @scroll="scroll"
@refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top> :scroll-top="scrollTop" refresher-background="#F4F5F7" @refresherpulling="triggered = true"
<view class="loading-view" v-if="!loaded"> @refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top>
<u-loading mode="flower"></u-loading> <view class="loading-view" v-if="!loaded">
</view> <u-loading mode="flower"></u-loading>
<NoOrder v-else-if="noParts" imageName="wupeijianxinxi.png" text="当前暂无配件信息"
:customStyle="noPartsCustomStyle" />
<template v-else>
<view v-for="(item, index) in partsList" :key="item.id">
<AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell" @express="handleClickExpress"></AppliedCell>
</view>
<view class="load-more-view">
<u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 2" :status="loadStatus"
bgColor="#F4F5F7"></u-loadmore>
</view> </view>
</template> <NoOrder v-else-if="noParts" imageName="wupeijianxinxi.png" text="当前暂无配件信息"
</scroll-view> :customStyle="noPartsCustomStyle" />
<template v-else>
<view v-for="(item, index) in partsList" :key="item.id">
<AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell" @express="handleClickExpress"></AppliedCell>
</view>
<view class="load-more-view">
<u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 2" :status="loadStatus"
bgColor="#F4F5F7"></u-loadmore>
</view>
</template>
</scroll-view>
</view>
<view class="fixed-button"> <view class="fixed-button">
<ApplyButton :type="buttonType" @click="handleClickApply" /> <ApplyButton :type="buttonType" @click="handleClickApply" />
</view> </view>
...@@ -161,7 +163,7 @@ ...@@ -161,7 +163,7 @@
this._freshing = false; this._freshing = false;
if (this.pageNumber == 1) { if (this.pageNumber == 1) {
this.partsList = [] this.partsList = []
} }
let list = res.data || [] let list = res.data || []
this.partsList.push(...list) this.partsList.push(...list)
this.loadStatus = list.length < this.pageSize ? 'nomore' : 'loadmore' this.loadStatus = list.length < this.pageSize ? 'nomore' : 'loadmore'
...@@ -279,9 +281,9 @@ ...@@ -279,9 +281,9 @@
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
// .tab-view { .tab-view {
// height: 100%; height: 100%;
// overflow: auto; overflow: auto;
.load-more-view { .load-more-view {
margin-bottom: 20rpx; margin-bottom: 20rpx;
...@@ -295,7 +297,7 @@ ...@@ -295,7 +297,7 @@
margin-top: 300rpx; margin-top: 300rpx;
position: absolute; position: absolute;
} }
// } }
.fixed-button { .fixed-button {
position: fixed; position: fixed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment