|
|
@@ -11,7 +11,7 @@
|
|
|
<van-sticky :offset-top="0">
|
|
|
<div class="box">
|
|
|
<div class="time-box" @click="newShow = true">
|
|
|
- <div class="text">{{ createdAt ? createdAt : '请选择时间' }}</div>
|
|
|
+ <div class="text">{{ yearMonth ? yearMonth : '请选择时间' }}</div>
|
|
|
</div>
|
|
|
<div class="money1">共充值 ¥{{ count || 0 }}</div>
|
|
|
</div>
|
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
count: 0,
|
|
|
empty: false,
|
|
|
newShow: false,
|
|
|
- createdAt: '',
|
|
|
+ yearMonth: '',
|
|
|
list: [
|
|
|
// {
|
|
|
// name: '夏秋雨',
|
|
|
@@ -81,30 +81,47 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
Info() {
|
|
|
- let query = {
|
|
|
- page: 0,
|
|
|
- size: 1000,
|
|
|
- sort: 'createdAt,desc',
|
|
|
- createdAt: this.createdAt
|
|
|
- };
|
|
|
if (this.type === 'ROOM') {
|
|
|
+ let query = {
|
|
|
+ page: 0,
|
|
|
+ size: 1000,
|
|
|
+ sort: 'createdAt,desc',
|
|
|
+ yearMonth: this.yearMonth
|
|
|
+ };
|
|
|
query.roomId = this.roomInfo.roomId;
|
|
|
+ this.$http.get('/roomMoneyWithdrawApply/all', query).then(res => {
|
|
|
+ this.list = res.content;
|
|
|
+ this.empty = res.empty;
|
|
|
+ let countArr = this.list.filter(item => {
|
|
|
+ return item.amount > 0;
|
|
|
+ });
|
|
|
+ if (countArr.length > 0) {
|
|
|
+ this.count = countArr.reduce((total, item) => {
|
|
|
+ return total + item.amount;
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
+ });
|
|
|
} else {
|
|
|
+ let query = {
|
|
|
+ page: 0,
|
|
|
+ size: 1000,
|
|
|
+ sort: 'createdAt,desc',
|
|
|
+ yearMonth: this.yearMonth
|
|
|
+ };
|
|
|
query.userId = this.userInfo.id;
|
|
|
- }
|
|
|
- this.$http.get('/roomMoneyWithdrawApply/all', query).then(res => {
|
|
|
- this.list = res.content;
|
|
|
- this.empty = res.empty;
|
|
|
- let countArr = this.list.filter(item => {
|
|
|
- return item.amount > 0;
|
|
|
+ this.$http.get('/userMoneyWithdrawApply/all', query).then(res => {
|
|
|
+ this.list = res.content;
|
|
|
+ this.empty = res.empty;
|
|
|
+ let countArr = this.list.filter(item => {
|
|
|
+ return item.amount > 0;
|
|
|
+ });
|
|
|
+ if (countArr.length > 0) {
|
|
|
+ this.count = countArr.reduce((total, item) => {
|
|
|
+ return total + item.amount;
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
});
|
|
|
- if (countArr.length > 0) {
|
|
|
- this.count = countArr.reduce((total, item) => {
|
|
|
- return total + item.amount;
|
|
|
- }, 0);
|
|
|
- }
|
|
|
- // console.log(res);
|
|
|
- });
|
|
|
+ }
|
|
|
},
|
|
|
getIcon(status) {
|
|
|
switch (status) {
|
|
|
@@ -133,7 +150,7 @@ export default {
|
|
|
onConfirm(event) {
|
|
|
this.currentDate = event.detail;
|
|
|
var timeValue = this.timeFormat(new Date(event.detail), 'yyyy-MM');
|
|
|
- this.createdAt = timeValue;
|
|
|
+ this.yearMonth = timeValue;
|
|
|
this.Info();
|
|
|
this.newShow = false;
|
|
|
}
|
|
|
@@ -163,7 +180,6 @@ export default {
|
|
|
}
|
|
|
.money1 {
|
|
|
font-size: 12px;
|
|
|
- font-family: PingFangSC-Regular, PingFang SC;
|
|
|
font-weight: normal;
|
|
|
color: #646566;
|
|
|
line-height: 17px;
|
|
|
@@ -183,14 +199,12 @@ export default {
|
|
|
}
|
|
|
.text1 {
|
|
|
font-size: 14px;
|
|
|
- font-family: PingFangSC-Regular, PingFang SC;
|
|
|
font-weight: normal;
|
|
|
color: #000000;
|
|
|
line-height: 20px;
|
|
|
}
|
|
|
.text2 {
|
|
|
font-size: 13px;
|
|
|
- font-family: PingFangSC-Regular, PingFang SC;
|
|
|
font-weight: normal;
|
|
|
color: #aaacad;
|
|
|
line-height: 18px;
|
|
|
@@ -198,7 +212,6 @@ export default {
|
|
|
}
|
|
|
.money {
|
|
|
font-size: 16px;
|
|
|
- font-family: PingFangSC-Semibold, PingFang SC;
|
|
|
font-weight: bold;
|
|
|
color: #000000;
|
|
|
line-height: 24px;
|