resetParams

This commit is contained in:
邓皓元 2019-03-19 11:28:02 +08:00
parent df4985250e
commit e325d501b7
2 changed files with 7 additions and 10 deletions

View File

@ -104,7 +104,7 @@
<div class="text-exp"> <div class="text-exp">
<Row v-if="counts"> <Row v-if="counts">
<a @click="sort" class="umar-r10"> <a @click="sort" class="umar-r10">
<b>已选 {{counts}} / {{filterTotal}} </b> <b>已选 {{counts}} </b>
</a> </a>
<a @click="clearSelect"> <a @click="clearSelect">
<b>清空</b> <b>清空</b>

View File

@ -408,18 +408,15 @@ export default {
this.clear(); this.clear();
this.close(); this.close();
}, },
resetSearch() { resetParams() {
for (let k in this.params) { for (let k in this.params) {
if (k === 'time') { if (k !== 'time') {
this.params[k] = [
this.moment().subtract('2', 'months').startOf('month').format('YYYY-MM-DD'),
this.moment().subtract('2', 'months').endOf('month').format('YYYY-MM-DD')
];
} else {
this.params[k] = ''; this.params[k] = '';
} }
} }
},
resetSearch() {
this.resetParams();
this.$store.dispatch('initOrder'); this.$store.dispatch('initOrder');
this.index(1); this.index(1);
}, },
@ -558,7 +555,7 @@ export default {
}); });
this.$store.commit('SET_REAL_ORDERS', orders); this.$store.commit('SET_REAL_ORDERS', orders);
this.resetParams();
this.changePage(1); this.changePage(1);
}, },
sortOrders(sortBy = 'times') { sortOrders(sortBy = 'times') {