|
|
@@ -11,7 +11,7 @@
|
|
|
<van-sticky :offset-top="0">
|
|
|
<div class="box">
|
|
|
<div class="time-box" @click="newShow = true">
|
|
|
- <div class="text">{{ startTime ? startTime : '请选择时间' }}</div>
|
|
|
+ <div class="text">{{ createdAt ? createdAt : '请选择时间' }}</div>
|
|
|
</div>
|
|
|
<div class="money1">共充值 ¥{{ count || 0 }}</div>
|
|
|
</div>
|
|
|
@@ -32,7 +32,7 @@
|
|
|
</template>
|
|
|
<van-empty v-if="empty" description="暂无记录哦"> </van-empty>
|
|
|
<van-popup :show="newShow" position="bottom" @close="newShow = false">
|
|
|
- <van-datetime-picker type="year-month" :value="currentDate" :min-date="minDate" @confirm="onConfirm" />
|
|
|
+ <van-datetime-picker type="year-month" :value="currentDate" @confirm="onConfirm" />
|
|
|
</van-popup>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -51,6 +51,7 @@ export default {
|
|
|
count: 0,
|
|
|
empty: false,
|
|
|
newShow: false,
|
|
|
+ createdAt: '',
|
|
|
list: [
|
|
|
// {
|
|
|
// name: '夏秋雨',
|
|
|
@@ -58,8 +59,8 @@ export default {
|
|
|
// amount: 100
|
|
|
// }
|
|
|
],
|
|
|
- currentDate: new Date().getTime(),
|
|
|
- minDate: new Date().getTime()
|
|
|
+ currentDate: new Date().getTime()
|
|
|
+ // minDate: new Date().getTime()
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -76,31 +77,35 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- let query = {
|
|
|
- page: 0,
|
|
|
- size: 1000,
|
|
|
- sort: 'createdAt,desc'
|
|
|
- };
|
|
|
- if (this.type === 'ROOM') {
|
|
|
- query.roomId = this.roomInfo.roomId;
|
|
|
- } else {
|
|
|
- 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;
|
|
|
- });
|
|
|
- if (countArr.length > 0) {
|
|
|
- this.count = countArr.reduce((total, item) => {
|
|
|
- return total + item.amount;
|
|
|
- }, 0);
|
|
|
- }
|
|
|
- // console.log(res);
|
|
|
- });
|
|
|
+ this.Info();
|
|
|
},
|
|
|
methods: {
|
|
|
+ Info() {
|
|
|
+ let query = {
|
|
|
+ page: 0,
|
|
|
+ size: 1000,
|
|
|
+ sort: 'createdAt,desc',
|
|
|
+ createdAt: this.createdAt
|
|
|
+ };
|
|
|
+ if (this.type === 'ROOM') {
|
|
|
+ query.roomId = this.roomInfo.roomId;
|
|
|
+ } else {
|
|
|
+ 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;
|
|
|
+ });
|
|
|
+ if (countArr.length > 0) {
|
|
|
+ this.count = countArr.reduce((total, item) => {
|
|
|
+ return total + item.amount;
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
+ // console.log(res);
|
|
|
+ });
|
|
|
+ },
|
|
|
getIcon(status) {
|
|
|
switch (status) {
|
|
|
case 'APPLY':
|
|
|
@@ -128,7 +133,8 @@ export default {
|
|
|
onConfirm(event) {
|
|
|
this.currentDate = event.detail;
|
|
|
var timeValue = this.timeFormat(new Date(event.detail), 'yyyy-MM');
|
|
|
- this.startTime = timeValue;
|
|
|
+ this.createdAt = timeValue;
|
|
|
+ this.Info();
|
|
|
this.newShow = false;
|
|
|
}
|
|
|
}
|