Commit d6ce40f7 authored by 刘文虎's avatar 刘文虎

修改查欠账显示逻辑

parent 4887237a
...@@ -61,11 +61,15 @@ export default { ...@@ -61,11 +61,15 @@ export default {
onReady() { onReady() {
console.log('onReady'); console.log('onReady');
setTimeout(() => { setTimeout(() => {
this.firstEnter = false;
this.$refs['scroll-box'].reloadList(); this.$refs['scroll-box'].reloadList();
}, 500); }, 500);
this.firstEnter = false;
}, },
onShow() {}, onShow() {
if(!this.firstEnter){
this.$refs['scroll-box'].reloadList();
}
},
methods: { methods: {
initDate() { initDate() {
this.options.start = this.parseTime(new Date(), '{y}-{m}-{d}') + ' 00:00:00'; this.options.start = this.parseTime(new Date(), '{y}-{m}-{d}') + ' 00:00:00';
...@@ -92,7 +96,6 @@ export default { ...@@ -92,7 +96,6 @@ export default {
flex: 1; flex: 1;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
margin-bottom: -60rpx;
} }
.content-view { .content-view {
height: 100%; height: 100%;
......
...@@ -9,7 +9,10 @@ ...@@ -9,7 +9,10 @@
<view class="bill-count"> <view class="bill-count">
<view class="bill-count-item" v-for="(item, index) in list" :key="index"> <view class="bill-count-item" v-for="(item, index) in list" :key="index">
<view class="bill-count-item-value ellipsis">{{ detail[item.value] }}</view> <view class="bill-count-item-value ellipsis">{{ detail[item.value] }}</view>
<view class="bill-count-item-label">{{ name ? `${name}数据` :bookRecordType==="INCOME"?item.label:item.label2 }}</view> <view class="bill-count-item-label" >
<text v-if="item.value==='totalRecord'">{{ name ? `${name}笔数` :item.label }}</text>
<text v-else>{{ name ? `${name}${bookRecordType==="INCOME"?item.label:item.label2}` :bookRecordType==="INCOME"?item.label:item.label2 }}</text>
</view>
<view class="bill-count-item-line" v-if="index !== list.length - 1"></view> <view class="bill-count-item-line" v-if="index !== list.length - 1"></view>
</view> </view>
</view> </view>
......
...@@ -106,6 +106,7 @@ export default { ...@@ -106,6 +106,7 @@ export default {
scroll(e) { scroll(e) {
let { scrollTop } = e.detail; let { scrollTop } = e.detail;
// this.scrollTop=scrollTop // this.scrollTop=scrollTop
console.log(scrollTop)
}, },
reloadList() { reloadList() {
this.current = 1; this.current = 1;
...@@ -113,7 +114,10 @@ export default { ...@@ -113,7 +114,10 @@ export default {
if (!checkToken()) { if (!checkToken()) {
this.list = []; this.list = [];
} }
this.scrollTop = 1;
setTimeout(()=>{
this.scrollTop = 0; this.scrollTop = 0;
},100)
this.getList(); this.getList();
}, },
async getList() { async getList() {
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
</view> </view>
</view> </view>
<view class="debit-detail-right"> <view class="debit-detail-right">
<view class="debt" v-if="showDebtAmount"> <view class="debt" v-if="current===0||showDebtAmount">
<view class="content-item debt-status">欠款</view> <view class="content-item debt-status">{{showDebtAmount?'欠款':'未结清'}}</view>
<view class="content-item debt-money"> <view class="content-item debt-money">
<text>¥</text> <text>¥</text>
<text>{{ detail.debtAmount }}</text> <text>{{ detail.debtAmount }}</text>
...@@ -32,7 +32,11 @@ export default { ...@@ -32,7 +32,11 @@ export default {
detail: { detail: {
type: Object, type: Object,
default: () => {} default: () => {}
} },
current: {
type: Number,
default: 0
},
}, },
computed:{ computed:{
showDebtAmount(){ showDebtAmount(){
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<view class="scroll-view"> <view class="scroll-view">
<NoData v-if="noData(index)" :text="noDataText" customStyle="margin-top: 0rpx;" :imageName="noDataImage" /> <NoData v-if="noData(index)" :text="noDataText" customStyle="margin-top: 0rpx;" :imageName="noDataImage" />
<template v-else> <template v-else>
<view class="container"><debit-detail v-for="item in listData" :key="item.userid" :detail="item"></debit-detail></view> <view class="container"><debit-detail v-for="item in listData" :key="item.userid" :detail="item" :current="current"></debit-detail></view>
<view class="loading-view" v-if="!getCurrentPage(index).loaded && !getCurrentPage(index).freshing"><u-loading mode="flower"></u-loading></view> <view class="loading-view" v-if="!getCurrentPage(index).loaded && !getCurrentPage(index).freshing"><u-loading mode="flower"></u-loading></view>
<view v-show="(getCurrentPage(index).pageNumber === 1 && getCurrentPage(index).loaded) || getCurrentPage(index).pageNumber > 1"> <view v-show="(getCurrentPage(index).pageNumber === 1 && getCurrentPage(index).loaded) || getCurrentPage(index).pageNumber > 1">
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<view class="receipt-preview"> <view class="receipt-preview">
<view class="head-background"><!-- 背景 --></view> <view class="head-background"><!-- 背景 --></view>
<view class="scroll-view"> <view class="scroll-view">
<view class="close"> <!-- <scroll-view scroll-y="true" class="scroll-Y"> -->
<view class="close-view"@click="close">
<u-icon name="close"></u-icon>
</view>
</view>
<view class="head"> <view class="head">
<view class="head-title">请根据流程选填信息,即可生成下方收据小票</view> <view class="head-title">请根据流程选填信息,即可生成下方收据小票</view>
<view class="quoted-price-step"> <view class="quoted-price-step">
...@@ -22,18 +19,25 @@ ...@@ -22,18 +19,25 @@
<view class="head-tips">以下为账单示意图,仅做参考</view> <view class="head-tips">以下为账单示意图,仅做参考</view>
</view> </view>
<view class="preview"><u-image :src="previewImage" mode="widthFix" class="preview-image"></u-image></view> <view class="preview"><u-image :src="previewImage" mode="widthFix" class="preview-image"></u-image></view>
<!-- </scroll-view> -->
<!-- <view class="scroll-scrollbar">
<scroll-view scroll-y="true" class="scroll-scrollbar-view">
<view class="scroll-scrollbar-view-inner"><view class="scroll-scrollbar-view-inner-box"></view></view>
</scroll-view>
</view> -->
</view> </view>
<view class="close" @click="close"><image :src="closeIcon" mode=""></image></view>
</view> </view>
</uni-popup> </uni-popup>
</template> </template>
<script> <script>
import UniPopup from "@/uni_modules/uni-popup/uni-popup.vue" import UniPopup from '@/uni_modules/uni-popup/uni-popup.vue';
import { billBaseUrl } from '@/utils/config.js'; import { billBaseUrl } from '@/utils/config.js';
import { quotedPriceSteps } from '@/utils/options/maintain-bill/index.js'; import { quotedPriceSteps } from '@/utils/options/maintain-bill/index.js';
export default { export default {
name: 'receipt-preview', name: 'receipt-preview',
components:{ components: {
UniPopup UniPopup
}, },
data() { data() {
...@@ -42,6 +46,7 @@ export default { ...@@ -42,6 +46,7 @@ export default {
arrowUrl: billBaseUrl + 'baojiashunxu@3x.png', arrowUrl: billBaseUrl + 'baojiashunxu@3x.png',
steps: quotedPriceSteps, steps: quotedPriceSteps,
previewImage: billBaseUrl + 'weixiupreview.png', previewImage: billBaseUrl + 'weixiupreview.png',
closeIcon: billBaseUrl + 'guanbitanchuang@3x.png',
customStyle: { customStyle: {
// 'margin-top': '90rpx', // 'margin-top': '90rpx',
// 'margin-bottom': '60rpx' // 'margin-bottom': '60rpx'
...@@ -51,11 +56,11 @@ export default { ...@@ -51,11 +56,11 @@ export default {
methods: { methods: {
open() { open() {
this.show = true; this.show = true;
this.$refs.uniPopup.open() this.$refs.uniPopup.open();
}, },
close() { close() {
this.show = false; this.show = false;
this.$refs.uniPopup.close() this.$refs.uniPopup.close();
} }
} }
}; };
...@@ -70,28 +75,45 @@ export default { ...@@ -70,28 +75,45 @@ export default {
height: 1100rpx; height: 1100rpx;
width: 622rpx; width: 622rpx;
padding: 24rpx 16rpx 24rpx 24rpx; padding: 24rpx 16rpx 24rpx 24rpx;
// display: flex;
align-items: center;
border-radius: 24rpx; border-radius: 24rpx;
overflow: hidden;
.scroll-view { .scroll-view {
// flex: 1;
border-radius: 24rpx;
position: relative; position: relative;
z-index: 2; z-index: 2;
width: 100%; width: 100%;
height: 100%; height: 100%;
// height: 500rpx;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
-webkit-overflow-scrolling: auto; -webkit-overflow-scrolling: auto;
padding-right: 8rpx; padding-right: 8rpx;
@include scrollBarStyle; @include scrollBarStyle;
.close{ }
text-align: right; .scroll-Y {
.close-view{ width: 100%;
display: inline-block; height: 100%;
width: 88rpx; }
height: 64rpx; .scroll-scrollbar {
padding-right: 8rpx; width: 8rpx;
line-height: 64rpx; height: 100%;
text-align: right; &-view {
width: 100%;
height: 100%;
&-inner {
width: 100%;
height: 100%;
position: relative;
&-box {
position: absolute;
right: 0;
top: 0;
width: 4rpx;
height: 24rpx;
background-color: #191c27;
position: absolute;
}
} }
} }
} }
...@@ -100,10 +122,19 @@ export default { ...@@ -100,10 +122,19 @@ export default {
top: 0; top: 0;
width: 100%; width: 100%;
height: 328rpx; height: 328rpx;
border-radius: 24rpx 24rpx 0 0;
background: linear-gradient(180deg, #f4fffc 0%, #ffffff 100%); background: linear-gradient(180deg, #f4fffc 0%, #ffffff 100%);
position: absolute; position: absolute;
z-index: 1; z-index: 1;
} }
.close {
position: absolute;
bottom: -78rpx;
left: 50%;
transform: translateX(-50%);
width: 60rpx;
height: 60rpx;
}
.head { .head {
width: 100%; width: 100%;
height: 180rpx; height: 180rpx;
......
...@@ -73,4 +73,8 @@ $default-color: #02a074; ...@@ -73,4 +73,8 @@ $default-color: #02a074;
border: 2rpx solid #666; border: 2rpx solid #666;
background-color: #666; background-color: #666;
} }
&::-webkit-scrollbar-track {
border-radius: 10rpx;
background-color: #ffffff;
}
} }
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