Authored by 李奇

调拨发货完成data store归集

@@ -6,8 +6,10 @@ @@ -6,8 +6,10 @@
6 import CellInfo from 'components/cell/cell-info'; 6 import CellInfo from 'components/cell/cell-info';
7 import { CellDispatch } from '../components'; 7 import { CellDispatch } from '../components';
8 8
9 -export default () => { 9 +export default function() {
10 return { 10 return {
  11 + useFilterSign: false,
  12 + showOutStock: true,
11 filters: { 13 filters: {
12 orderNo: { 14 orderNo: {
13 label: '调拨单号', 15 label: '调拨单号',
@@ -227,4 +229,4 @@ export default () => { @@ -227,4 +229,4 @@ export default () => {
227 list: [] 229 list: []
228 } 230 }
229 }; 231 };
230 -}; 232 +}
@@ -52,34 +52,22 @@ @@ -52,34 +52,22 @@
52 <script> 52 <script>
53 import _ from 'lodash'; 53 import _ from 'lodash';
54 import moment from 'moment'; 54 import moment from 'moment';
  55 + import {done as doneStore } from '../store';
55 import TradeService from 'services/trade/trade-service'; 56 import TradeService from 'services/trade/trade-service';
56 - import dataStore from '../store/done';  
57 57
58 export default { 58 export default {
59 name: 'TabDone', 59 name: 'TabDone',
60 data() { 60 data() {
61 - return {  
62 - filters: {},  
63 - page: {},  
64 - table: {},  
65 - useFilterSign: false,  
66 - showOutStock: true  
67 - }; 61 + return doneStore.apply(this);
68 }, 62 },
69 created() { 63 created() {
70 - this.tradeService = new TradeService();  
71 - const store = dataStore();  
72 -  
73 - this.filters = store.filters;  
74 - this.page = store.page;  
75 - this.table = store.table;  
76 -  
77 const params = { 64 const params = {
78 pageNo: 1, 65 pageNo: 1,
79 pageSize: 20, 66 pageSize: 20,
80 statusList: [2, 3, 4] 67 statusList: [2, 3, 4]
81 }; 68 };
82 69
  70 + this.tradeService = new TradeService();
83 this.productList(params); 71 this.productList(params);
84 }, 72 },
85 methods: { 73 methods: {
@@ -182,10 +170,13 @@ @@ -182,10 +170,13 @@
182 this.page.current = 1; 170 this.page.current = 1;
183 }, 171 },
184 clearFilter() { 172 clearFilter() {
185 - this.filters = dataStore().filters;  
186 this.useFilterSign = false; 173 this.useFilterSign = false;
187 this.productList(this.params()); 174 this.productList(this.params());
188 this.page.current = 1; 175 this.page.current = 1;
  176 +
  177 + _.each(this.filters, item => {
  178 + item.model = '';
  179 + });
189 }, 180 },
190 pageChange(page) { 181 pageChange(page) {
191 const params = this.params(); 182 const params = this.params();