|
|
@@ -1,10 +1,11 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <u-picker v-model="showTime" mode="time" :params="params" :default-time="defaultTime" @confirm="confirmTime"></u-picker>
|
|
|
+ <u-picker v-model="showTime" mode="time" :params="params" :default-time="defaultTime" @confirm="confirmTime">
|
|
|
+ </u-picker>
|
|
|
<view class="top">
|
|
|
<view>
|
|
|
<view class="value" style="margin-bottom: 50rpx;">
|
|
|
- <text>总营收</text>
|
|
|
+ <text>总应收</text>
|
|
|
<text class="text-price">{{shopData.totalFunkPrice}}</text>
|
|
|
</view>
|
|
|
<view class="value">
|
|
|
@@ -19,7 +20,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="margin-top-20" style="margin-bottom: -10rpx;">
|
|
|
- <u-tabs active-color="#FC8D38" :active-item-style="activeItemStyle" :list="tabslist" bg-color="#f1f1f1" :current="current" @change="change"></u-tabs>
|
|
|
+ <u-tabs active-color="#FC8D38" :active-item-style="activeItemStyle" :list="tabslist" bg-color="#f1f1f1"
|
|
|
+ :current="current" @change="change"></u-tabs>
|
|
|
</view>
|
|
|
<view class="data">
|
|
|
<view class="left">
|
|
|
@@ -49,10 +51,10 @@
|
|
|
<text>价值</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
|
|
|
- :up="upOption">
|
|
|
- <view @click="$jump('/pages/bill/billDetail?billDetail='+JSON.stringify(item)+'¤t='+current)" class="item" hover-class="hoverClass"
|
|
|
- v-for="(item,index) in list" :key="index">
|
|
|
+ <mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
|
|
|
+ :down="downOption" :up="upOption">
|
|
|
+ <view @click="$jump('/pages/bill/billDetail?billDetail='+JSON.stringify(item)+'¤t='+current)"
|
|
|
+ class="item" hover-class="hoverClass" v-for="(item,index) in list" :key="index">
|
|
|
<block v-if="current==0">
|
|
|
<view class="area1">
|
|
|
<view class="item-padding">
|
|
|
@@ -77,20 +79,24 @@
|
|
|
<block v-if="current==1">
|
|
|
<view class="area1">
|
|
|
<view class="item-padding">
|
|
|
- <image :src="item.userAvator" mode="aspectFit"></image>
|
|
|
- <view class="">
|
|
|
+ <image style="border-radius: 50%;"
|
|
|
+ :src="item.userAvator?item.userAvator:'/static/icon/avatar.png'" mode="aspectFit">
|
|
|
+ </image>
|
|
|
+ <view class="margin-left-10">
|
|
|
<text>{{item.userName}}</text>
|
|
|
<text>{{item.updateTime}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="area3 text-area u-flex-1" >
|
|
|
- <view class="item-padding" style="text-align: right;flex:1;font-size: 34rpx;color: #F39248;margin-right: 20rpx;">+¥{{item.realPayAmount}}</view>
|
|
|
+ <view class="area3 text-area u-flex-1">
|
|
|
+ <view class="item-padding"
|
|
|
+ style="text-align: right;flex:1;font-size: 34rpx;color: #F39248;margin-right: 20rpx;">
|
|
|
+ +¥{{item.realPayAmount}}</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
</mescroll-body>
|
|
|
-
|
|
|
+
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -102,9 +108,9 @@
|
|
|
mixins: [MescrollMixin],
|
|
|
data() {
|
|
|
return {
|
|
|
- activeItemStyle:{
|
|
|
- fontWeight:800,
|
|
|
- fontSize:'36rpx'
|
|
|
+ activeItemStyle: {
|
|
|
+ fontWeight: 800,
|
|
|
+ fontSize: '36rpx'
|
|
|
},
|
|
|
tabslist: [{
|
|
|
name: '应收明细'
|
|
|
@@ -112,41 +118,49 @@
|
|
|
name: '余额明细'
|
|
|
}],
|
|
|
current: 0,
|
|
|
- list:[],
|
|
|
- downOption:{
|
|
|
- auto:false
|
|
|
+ list: [],
|
|
|
+ downOption: {
|
|
|
+ auto: false
|
|
|
},
|
|
|
- showTime:false,
|
|
|
+ showTime: false,
|
|
|
params: {
|
|
|
year: true,
|
|
|
month: true,
|
|
|
},
|
|
|
- defaultTime:'',
|
|
|
- shopData:{}
|
|
|
+ defaultTime: '',
|
|
|
+ shopData: {},
|
|
|
+ height:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
let m = new Date().getMonth() + 1
|
|
|
let y = new Date().getFullYear()
|
|
|
- let m1 = m<10? ("0" + m) : m
|
|
|
+ let m1 = m < 10 ? ("0" + m) : m
|
|
|
this.defaultTime = y + '-' + m1
|
|
|
this.shopDetail()
|
|
|
},
|
|
|
+ onReady() {
|
|
|
+ this.getElInfo()
|
|
|
+ },
|
|
|
methods: {
|
|
|
- async shopDetail(){
|
|
|
- let params ={
|
|
|
- id:this.vuex_shopId
|
|
|
+ async getElInfo() {
|
|
|
+ let rectInfo = await this.$u.getRect('.card');
|
|
|
+ this.height=this.$u.sys().windowHeight - rectInfo.top + 'px'
|
|
|
+ },
|
|
|
+ async shopDetail() {
|
|
|
+ let params = {
|
|
|
+ id: this.vuex_shopId
|
|
|
}
|
|
|
let res = await this.$api.shop.detail(params)
|
|
|
this.shopData = res.data
|
|
|
},
|
|
|
- async shop(){
|
|
|
+ async shop() {
|
|
|
let params = {}
|
|
|
-
|
|
|
+
|
|
|
let res = await this.$api.shop.remainDetailPage(params)
|
|
|
},
|
|
|
- confirmTime(e){
|
|
|
- this.defaultTime = e.year + '-' +e.month
|
|
|
+ confirmTime(e) {
|
|
|
+ this.defaultTime = e.year + '-' + e.month
|
|
|
this.downCallback()
|
|
|
},
|
|
|
upCallback(mescroll) {
|
|
|
@@ -155,12 +169,12 @@
|
|
|
}
|
|
|
let params = {
|
|
|
shopId: this.vuex_shopId,
|
|
|
- current:mescroll.num,
|
|
|
- size:mescroll.size,
|
|
|
- monthTime:this.defaultTime
|
|
|
+ current: mescroll.num,
|
|
|
+ size: mescroll.size,
|
|
|
+ monthTime: this.defaultTime
|
|
|
}
|
|
|
try {
|
|
|
- if(this.current==0){
|
|
|
+ if (this.current == 0) {
|
|
|
this.$api.shop.yingshouPage(params).then(res => {
|
|
|
let data = res.data.records
|
|
|
let total = res.data.total
|
|
|
@@ -168,7 +182,7 @@
|
|
|
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
|
|
this.list = this.list.concat(data); //追加新数据
|
|
|
})
|
|
|
- }else if(this.current==1){
|
|
|
+ } else if (this.current == 1) {
|
|
|
this.$api.shop.remainDetailPage(params).then(res => {
|
|
|
let data = res.data.records
|
|
|
let total = res.data.total
|
|
|
@@ -177,7 +191,7 @@
|
|
|
this.list = this.list.concat(data); //追加新数据
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
} catch (e) {
|
|
|
this.mescroll.endErr()
|
|
|
}
|
|
|
@@ -185,7 +199,7 @@
|
|
|
downCallback() {
|
|
|
setTimeout(() => {
|
|
|
this.mescroll.resetUpScroll();
|
|
|
- }, 10)
|
|
|
+ }, 200)
|
|
|
},
|
|
|
change(index) {
|
|
|
this.current = index;
|
|
|
@@ -209,7 +223,7 @@
|
|
|
|
|
|
.top {
|
|
|
padding: 50rpx;
|
|
|
- background-image: linear-gradient(to right,#FBA33D,#FF8D32);
|
|
|
+ background-image: linear-gradient(to right, #FBA33D, #FF8D32);
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
|