|
@@ -67,30 +67,15 @@ |
|
@@ -67,30 +67,15 @@ |
67
|
|
67
|
|
68
|
<script>
|
68
|
<script>
|
69
|
import _ from 'lodash';
|
69
|
import _ from 'lodash';
|
70
|
- import ProductService from 'services/product/product-service';
|
|
|
71
|
import offSaleStore from './store';
|
70
|
import offSaleStore from './store';
|
|
|
71
|
+ import ProductService from 'services/product/product-service';
|
72
|
|
72
|
|
73
|
export default {
|
73
|
export default {
|
74
|
data() {
|
74
|
data() {
|
75
|
- return {
|
|
|
76
|
- tableCols: [],
|
|
|
77
|
- tableData: {},
|
|
|
78
|
- pageData: {},
|
|
|
79
|
- filters: [],
|
|
|
80
|
- batchOnSale: [],
|
|
|
81
|
- useFilterSign: false,
|
|
|
82
|
- showSizeEdit: false,
|
|
|
83
|
- categoryValue: []
|
|
|
84
|
- };
|
75
|
+ return offSaleStore.apply(this);
|
85
|
},
|
76
|
},
|
86
|
created() {
|
77
|
created() {
|
87
|
this.productService = new ProductService();
|
78
|
this.productService = new ProductService();
|
88
|
- const store = offSaleStore.apply(this);
|
|
|
89
|
-
|
|
|
90
|
- this.filters = store.filterFields;
|
|
|
91
|
- this.tableCols = store.tableCols;
|
|
|
92
|
- this.tableData = store.tableData;
|
|
|
93
|
- this.pageData = store.pageData;
|
|
|
94
|
this.productList();
|
79
|
this.productList();
|
95
|
},
|
80
|
},
|
96
|
methods: {
|
81
|
methods: {
|
|
@@ -125,10 +110,16 @@ |
|
@@ -125,10 +110,16 @@ |
125
|
this.pageData.current = 1;
|
110
|
this.pageData.current = 1;
|
126
|
},
|
111
|
},
|
127
|
clearFilter() {
|
112
|
clearFilter() {
|
128
|
- const store = offSaleStore.apply(this);
|
|
|
129
|
-
|
|
|
130
|
- this.filters = store.filterFields;
|
113
|
+ this.reset();
|
131
|
this.productList();
|
114
|
this.productList();
|
|
|
115
|
+
|
|
|
116
|
+ },
|
|
|
117
|
+ reset() {
|
|
|
118
|
+ _.each(this.filters, item => {
|
|
|
119
|
+ if (_.has(item, 'model')) {
|
|
|
120
|
+ item.model = '';
|
|
|
121
|
+ }
|
|
|
122
|
+ });
|
132
|
this.useFilterSign = false;
|
123
|
this.useFilterSign = false;
|
133
|
this.pageData.current = 1;
|
124
|
this.pageData.current = 1;
|
134
|
this.categoryValue = [];
|
125
|
this.categoryValue = [];
|