Authored by 李奇

未上架data store归集

... ... @@ -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 = [];
... ...
... ... @@ -16,7 +16,11 @@ const auditStatus = {
export default function() {
return {
filterFields: {
batchOnSale: [],
useFilterSign: false,
showSizeEdit: false,
categoryValue: [],
filters: {
sknCode: {
label: 'SKN编码',
labelSpan: 6,
... ...