searchMixin.js
683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
export default {
data() {
return {
date: '',
brandList: [],
searchObj: {},
}
},
mounted() {
this.getGoodsBrandList()
let that = this
document.onkeydown = () => {
let key = window.event.keyCode
if (key == 13) {
that.search()
}
}
},
methods: {
getGoodsBrandList() {
this.$apis.orderApi.getAllBrandList({}).then(({ data }) => {
this.brandList = data
})
},
search(callBack) {
this.$refs.table.refreshTable(true, false, callBack)
},
reset() {
this.date = ''
this.searchObj = {}
this.$nextTick(() => {
this.search()
})
},
},
}