|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
last: false,
|
|
|
time: 0,
|
|
|
count: 0,
|
|
|
- startTime: '',
|
|
|
+ createdAt: '',
|
|
|
empty: false,
|
|
|
newShow: false,
|
|
|
list: [
|
|
|
@@ -67,35 +67,39 @@ export default {
|
|
|
...mapState(['roomInfo', 'userInfo'])
|
|
|
},
|
|
|
mounted() {
|
|
|
- let query = {
|
|
|
- page: 0,
|
|
|
- size: 1000,
|
|
|
- sort: 'settleTime,desc'
|
|
|
- };
|
|
|
- query.roomId = this.roomInfo.roomId;
|
|
|
- this.$http
|
|
|
- .get('/api/mp/roomFeeRecord', query)
|
|
|
- .then(res => {
|
|
|
- // console.log(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);
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- wx.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: e.error
|
|
|
- });
|
|
|
- });
|
|
|
+ this.Info();
|
|
|
},
|
|
|
methods: {
|
|
|
+ Info() {
|
|
|
+ let query = {
|
|
|
+ page: 0,
|
|
|
+ size: 1000,
|
|
|
+ sort: 'settleTime,desc',
|
|
|
+ createdAt: this.createdAt
|
|
|
+ };
|
|
|
+ query.roomId = this.roomInfo.roomId;
|
|
|
+ this.$http
|
|
|
+ .get('/api/mp/roomFeeRecord', query)
|
|
|
+ .then(res => {
|
|
|
+ // console.log(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);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: e.error
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
timeFormat(date, fmt) {
|
|
|
var o = {
|
|
|
'M+': date.getMonth() + 1 //月份
|
|
|
@@ -113,7 +117,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;
|
|
|
}
|
|
|
}
|