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

修改查欠账显示逻辑

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