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">
<Row v-if="counts">
<a @click="sort" class="umar-r10">
<b>已选 {{counts}} / {{filterTotal}} </b>
<b>已选 {{counts}} </b>
</a>
<a @click="clearSelect">
<b>清空</b>

View File

@ -408,18 +408,15 @@ export default {
this.clear();
this.close();
},
resetSearch() {
resetParams() {
for (let k in this.params) {
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 {
if (k !== 'time') {
this.params[k] = '';
}
}
},
resetSearch() {
this.resetParams();
this.$store.dispatch('initOrder');
this.index(1);
},
@ -558,7 +555,7 @@ export default {
});
this.$store.commit('SET_REAL_ORDERS', orders);
this.resetParams();
this.changePage(1);
},
sortOrders(sortBy = 'times') {