|
@@ -15,7 +15,7 @@
|
|
|
<view class="statistics flex-row justify-between ">
|
|
<view class="statistics flex-row justify-between ">
|
|
|
|
|
|
|
|
|
|
|
|
|
- <picker class="picker" @change="sureChooseDate" mode='date' fields="month" range-key="label" >
|
|
|
|
|
|
|
+ <picker class="picker" :end="endDate" @change="sureChooseDate" mode='date' fields="month" range-key="label" >
|
|
|
<view class="left flex-row">
|
|
<view class="left flex-row">
|
|
|
<text>{{dataTime || '全部'}}</text>
|
|
<text>{{dataTime || '全部'}}</text>
|
|
|
<image class="xialaImage" src="/static/transaction/u5.png"></image>
|
|
<image class="xialaImage" src="/static/transaction/u5.png"></image>
|
|
@@ -23,13 +23,13 @@
|
|
|
</picker>
|
|
</picker>
|
|
|
|
|
|
|
|
<view v-if="dataTime" class="left flex-row" @click="showDate">
|
|
<view v-if="dataTime" class="left flex-row" @click="showDate">
|
|
|
- <text> 全部</text>
|
|
|
|
|
|
|
+ <text>全部</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="right flex-row justify-around">
|
|
<view class="right flex-row justify-around">
|
|
|
- <text>新增{{tranFlowstatistic.rechargeAmount || 0}}</text>
|
|
|
|
|
- <text>消费-{{tranFlowstatistic.consumeAmount || 0 }}</text>
|
|
|
|
|
- <text>退款-{{tranFlowstatistic.refundAmount || 0 }}</text>
|
|
|
|
|
|
|
+ <text>新增:{{tranFlowstatistic.rechargeAmount || 0}}</text>
|
|
|
|
|
+ <text>消费:{{tranFlowstatistic.consumeAmount || 0 }}</text>
|
|
|
|
|
+ <text>退款:{{tranFlowstatistic.refundAmount || 0 }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -89,8 +89,27 @@
|
|
|
// 查询交流流水统计
|
|
// 查询交流流水统计
|
|
|
this.transactionFlowstatistic();
|
|
this.transactionFlowstatistic();
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ endDate() {
|
|
|
|
|
+ return this.getDate('end');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
-
|
|
|
|
|
|
|
+ getDate(type) {
|
|
|
|
|
+ const date = new Date();
|
|
|
|
|
+ let year = date.getFullYear();
|
|
|
|
|
+ let month = date.getMonth() + 1;
|
|
|
|
|
+ let day = date.getDate();
|
|
|
|
|
+
|
|
|
|
|
+ if (type === 'start') {
|
|
|
|
|
+ year = year - 60;
|
|
|
|
|
+ } else if (type === 'end') {
|
|
|
|
|
+ year = year ;
|
|
|
|
|
+ }
|
|
|
|
|
+ month = month > 9 ? month : '0' + month;
|
|
|
|
|
+ day = day > 9 ? day : '0' + day;
|
|
|
|
|
+ return `${year}-${month}-${day}`;
|
|
|
|
|
+ },
|
|
|
clickTab(e){
|
|
clickTab(e){
|
|
|
this.tabIndex = e.index
|
|
this.tabIndex = e.index
|
|
|
},
|
|
},
|