🐛 交易记录查询问题修复

This commit is contained in:
ronger 2021-12-29 12:00:06 +08:00
parent f9c9fd0b03
commit b45ea4e8db
2 changed files with 14 additions and 6 deletions

View File

@ -108,6 +108,11 @@ export default {
type: Object
}
},
watch: {
bankAccount() {
this.resetSearchDate()
}
},
data() {
return {
pickerOptions: {
@ -169,14 +174,17 @@ export default {
},
searchTransactionRecord(dates) {
this.$emit('searchTransactionRecord', dates);
},
resetSearchDate() {
const end = new Date();
const start = new Date();
start.setMonth(start.getMonth() - 1);
let searchDate = [start, end]
this.searchDate = searchDate
}
},
mounted() {
const end = new Date();
const start = new Date();
start.setMonth(start.getMonth() - 1);
let searchDate = [start, end]
this.searchDate = searchDate
this.resetSearchDate()
}
}
</script>

View File

@ -140,7 +140,7 @@ export default {
let _ts = this
let startDate = dates[0]
let endDate = dates[1]
_ts.$store.dispatch('wallet/fetchTransactionRecordList', {
_ts.$store.dispatch('bank-account/fetchTransactionRecordList', {
bankAccount: _ts.bankAccount,
startDate: startDate,
endDate: endDate