|
@@ -59,32 +59,16 @@ |
|
@@ -59,32 +59,16 @@ |
59
|
|
59
|
|
60
|
<script>
|
60
|
<script>
|
61
|
import _ from 'lodash';
|
61
|
import _ from 'lodash';
|
62
|
- import ProductService from 'services/product/product-service';
|
|
|
63
|
import onSaleStore from './store';
|
62
|
import onSaleStore from './store';
|
|
|
63
|
+ import ProductService from 'services/product/product-service';
|
64
|
|
64
|
|
65
|
export default {
|
65
|
export default {
|
66
|
data() {
|
66
|
data() {
|
67
|
- return {
|
|
|
68
|
- showSizeEdit: false,
|
|
|
69
|
- tableCols: [],
|
|
|
70
|
- tableData: {},
|
|
|
71
|
- pageData: {},
|
|
|
72
|
- filters: {},
|
|
|
73
|
- batchOffSale: [],
|
|
|
74
|
- useFilterSign: false,
|
|
|
75
|
- categoryValue: []
|
|
|
76
|
- };
|
67
|
+ return onSaleStore.apply(this);
|
77
|
},
|
68
|
},
|
78
|
created() {
|
69
|
created() {
|
79
|
this.productService = new ProductService();
|
70
|
this.productService = new ProductService();
|
80
|
- const store = onSaleStore.apply(this);
|
|
|
81
|
-
|
|
|
82
|
this.productList();
|
71
|
this.productList();
|
83
|
- this.filters = store.filterFields;
|
|
|
84
|
- this.tableCols = store.tableCols;
|
|
|
85
|
- this.tableData = store.tableData;
|
|
|
86
|
- this.pageData = store.pageData;
|
|
|
87
|
-
|
|
|
88
|
},
|
72
|
},
|
89
|
methods: {
|
73
|
methods: {
|
90
|
editSize(skn) {
|
74
|
editSize(skn) {
|
|
@@ -117,10 +101,15 @@ |
|
@@ -117,10 +101,15 @@ |
117
|
this.pageData.current = 1;
|
101
|
this.pageData.current = 1;
|
118
|
},
|
102
|
},
|
119
|
clearFilter() {
|
103
|
clearFilter() {
|
120
|
- const store = onSaleStore.apply(this);
|
|
|
121
|
-
|
|
|
122
|
- this.filters = store.filterFields;
|
104
|
+ this.reset();
|
123
|
this.productList();
|
105
|
this.productList();
|
|
|
106
|
+ },
|
|
|
107
|
+ reset() {
|
|
|
108
|
+ _.each(this.filters, item => {
|
|
|
109
|
+ if (_.has(item, 'model')) {
|
|
|
110
|
+ item.model = '';
|
|
|
111
|
+ }
|
|
|
112
|
+ });
|
124
|
this.useFilterSign = false;
|
113
|
this.useFilterSign = false;
|
125
|
this.pageData.current = 1;
|
114
|
this.pageData.current = 1;
|
126
|
this.categoryValue = [];
|
115
|
this.categoryValue = [];
|