Authored by 李奇

调拨发货未完成data store归集

... ... @@ -8,6 +8,10 @@ import { CellDispatch, CellDeliver, CellStockOut } from '../components';
export default function() {
return {
useFilter: false,
isExporting: false,
showOutStock: false,
deliverRows: [],
filters: {
orderNo: {
label: '调拨单号',
... ...
... ... @@ -64,35 +64,22 @@
<script>
import _ from 'lodash';
import moment from 'moment';
import {undone as undoneStore} from '../store';
import TradeService from 'services/trade/trade-service';
import dataStore from '../store/undone';
export default {
name: 'TabUndone',
data() {
return {
self: this,
filters: {},
page: {},
table: {},
useFilter: false,
isExporting: false,
showOutStock: false,
deliverRows: []
};
return undoneStore.apply(this);
},
created() {
this.tradeService = new TradeService();
const no = this.$route.query.no || 0;
const store = dataStore.apply(this);
this.filters = store.filters;
if (no) {
this.filters.orderNo.model = +no;
this.useFilter = true;
}
this.page = store.page;
this.table = store.table;
this.productList(this.params());
},
methods: {
... ... @@ -196,10 +183,13 @@
this.page.current = 1;
},
clearFilter() {
this.filters = dataStore.apply(this).filters;
this.useFilter = false;
this.productList(this.params());
this.page.current = 1;
_.each(this.filters, item => {
item.model = '';
});
},
pageChange(page) {
let params = this.params();
... ...
... ... @@ -107,10 +107,9 @@
const fmt = 'YYYY-MM-DD HH:mm:ss';
this.table.list = data;
this.expressTime = '-';
if (data.length) {
this.expressTime = moment.unix(data[0].createTime).format(fmt);
} else {
this.expressTime = '-';
}
}
},
... ...