Authored by 李奇

已上架data store归集

... ... @@ -59,32 +59,16 @@
<script>
import _ from 'lodash';
import ProductService from 'services/product/product-service';
import onSaleStore from './store';
import ProductService from 'services/product/product-service';
export default {
data() {
return {
showSizeEdit: false,
tableCols: [],
tableData: {},
pageData: {},
filters: {},
batchOffSale: [],
useFilterSign: false,
categoryValue: []
};
return onSaleStore.apply(this);
},
created() {
this.productService = new ProductService();
const store = onSaleStore.apply(this);
this.productList();
this.filters = store.filterFields;
this.tableCols = store.tableCols;
this.tableData = store.tableData;
this.pageData = store.pageData;
},
methods: {
editSize(skn) {
... ... @@ -117,10 +101,15 @@
this.pageData.current = 1;
},
clearFilter() {
const store = onSaleStore.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,6 +16,10 @@ const auditStatus = {
export default function() {
return {
showSizeEdit: false,
batchOffSale: [],
useFilterSign: false,
categoryValue: [],
tableCols: [
{
type: 'selection',
... ... @@ -155,7 +159,7 @@ export default function() {
total: 0,
current: 1
},
filterFields: {
filters: {
sknCode: {
label: 'SKN编码',
model: '',
... ...