|
|
@@ -32,7 +32,12 @@
|
|
|
</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" @confirm="onConfirm" />
|
|
|
+ <van-datetime-picker
|
|
|
+ type="year-month"
|
|
|
+ @cancel="newShow = false"
|
|
|
+ :value="currentDate"
|
|
|
+ @confirm="onConfirm"
|
|
|
+ />
|
|
|
</van-popup>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -82,6 +87,9 @@ export default {
|
|
|
methods: {
|
|
|
Info() {
|
|
|
if (this.type === 'ROOM') {
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ });
|
|
|
let query = {
|
|
|
page: 0,
|
|
|
size: 1000,
|
|
|
@@ -89,19 +97,32 @@ export default {
|
|
|
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;
|
|
|
+ this.$http
|
|
|
+ .get('/roomMoneyWithdrawApply/all', query)
|
|
|
+ .then(res => {
|
|
|
+ wx.hideLoading();
|
|
|
+ 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.hideLoading();
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: e.error
|
|
|
+ });
|
|
|
});
|
|
|
- if (countArr.length > 0) {
|
|
|
- this.count = countArr.reduce((total, item) => {
|
|
|
- return total + item.amount;
|
|
|
- }, 0);
|
|
|
- }
|
|
|
- });
|
|
|
} else {
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ });
|
|
|
let query = {
|
|
|
page: 0,
|
|
|
size: 1000,
|
|
|
@@ -109,18 +130,28 @@ export default {
|
|
|
yearMonth: this.yearMonth
|
|
|
};
|
|
|
query.userId = this.userInfo.id;
|
|
|
- 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;
|
|
|
+ this.$http
|
|
|
+ .get('/userMoneyWithdrawApply/all', query)
|
|
|
+ .then(res => {
|
|
|
+ wx.hideLoading();
|
|
|
+ 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.hideLoading();
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: e.error
|
|
|
+ });
|
|
|
});
|
|
|
- if (countArr.length > 0) {
|
|
|
- this.count = countArr.reduce((total, item) => {
|
|
|
- return total + item.amount;
|
|
|
- }, 0);
|
|
|
- }
|
|
|
- });
|
|
|
}
|
|
|
},
|
|
|
getIcon(status) {
|