orderMixin.js
1.43 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
export default {
data() {
return {
date: '',
searchObj: {},
statusEnum: {
0: '未支付',
1: '已支付',
2: '已发货',
3: '已完成',
4: '售后中',
5: '退款失败',
6: '已退款',
},
channlList: [{
label: '海威',
value: 'HW'
}],
statusList: [{
label: '待收货',
value: [1, 2]
}, {
label: '已完成',
value: [3]
}, {
label: '已退款',
value: [6]
},
{
label: '售后中',
value: [4]
}
],
appereanceList: [{
label: '卡券',
value: 1
}, {
label: '直充',
value: 2
}],
}
},
watch: {
'date' (n, o) {
let [orderDateStart, orderDateEnd] = n
this.searchObj.orderDateStart = orderDateStart ? `${orderDateStart} 00:00:00` : ''
this.searchObj.orderDateEnd = orderDateEnd ? `${orderDateEnd} 23:59:59` : ''
}
},
methods: {
search() {
this.$refs.table.refreshTable()
},
reset() {
this.date = ''
this.searchObj = {}
this.$nextTick(() => {
this.search()
})
},
handleClick({ name }) {
let orderStatus = name ? name.split(',').map(e => Number(e)) : ''
this.searchObj.orderStatus = orderStatus
this.$nextTick(() => {
this.search()
})
}
},
}