Authored by 李奇

调拨发货完成data store归集

... ... @@ -6,8 +6,10 @@
import CellInfo from 'components/cell/cell-info';
import { CellDispatch } from '../components';
export default () => {
export default function() {
return {
useFilterSign: false,
showOutStock: true,
filters: {
orderNo: {
label: '调拨单号',
... ... @@ -227,4 +229,4 @@ export default () => {
list: []
}
};
};
}
... ...
... ... @@ -52,34 +52,22 @@
<script>
import _ from 'lodash';
import moment from 'moment';
import {done as doneStore } from '../store';
import TradeService from 'services/trade/trade-service';
import dataStore from '../store/done';
export default {
name: 'TabDone',
data() {
return {
filters: {},
page: {},
table: {},
useFilterSign: false,
showOutStock: true
};
return doneStore.apply(this);
},
created() {
this.tradeService = new TradeService();
const store = dataStore();
this.filters = store.filters;
this.page = store.page;
this.table = store.table;
const params = {
pageNo: 1,
pageSize: 20,
statusList: [2, 3, 4]
};
this.tradeService = new TradeService();
this.productList(params);
},
methods: {
... ... @@ -182,10 +170,13 @@
this.page.current = 1;
},
clearFilter() {
this.filters = dataStore().filters;
this.useFilterSign = false;
this.productList(this.params());
this.page.current = 1;
_.each(this.filters, item => {
item.model = '';
});
},
pageChange(page) {
const params = this.params();
... ...