...
|
...
|
@@ -67,30 +67,15 @@ |
|
|
|
|
|
<script>
|
|
|
import _ from 'lodash';
|
|
|
import ProductService from 'services/product/product-service';
|
|
|
import offSaleStore from './store';
|
|
|
import ProductService from 'services/product/product-service';
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
tableCols: [],
|
|
|
tableData: {},
|
|
|
pageData: {},
|
|
|
filters: [],
|
|
|
batchOnSale: [],
|
|
|
useFilterSign: false,
|
|
|
showSizeEdit: false,
|
|
|
categoryValue: []
|
|
|
};
|
|
|
return offSaleStore.apply(this);
|
|
|
},
|
|
|
created() {
|
|
|
this.productService = new ProductService();
|
|
|
const store = offSaleStore.apply(this);
|
|
|
|
|
|
this.filters = store.filterFields;
|
|
|
this.tableCols = store.tableCols;
|
|
|
this.tableData = store.tableData;
|
|
|
this.pageData = store.pageData;
|
|
|
this.productList();
|
|
|
},
|
|
|
methods: {
|
...
|
...
|
@@ -125,10 +110,16 @@ |
|
|
this.pageData.current = 1;
|
|
|
},
|
|
|
clearFilter() {
|
|
|
const store = offSaleStore.apply(this);
|
|
|
|
|
|
this.filters = store.filterFields;
|
|
|
this.reset();
|
|
|
this.productList();
|
|
|
|
|
|
},
|
|
|
reset() {
|
|
|
_.each(this.filters, item => {
|
|
|
if (_.has(item, 'model')) {
|
|
|
item.model = '';
|
|
|
}
|
|
|
});
|
|
|
this.useFilterSign = false;
|
|
|
this.pageData.current = 1;
|
|
|
this.categoryValue = [];
|
...
|
...
|
|