...
|
...
|
@@ -21,10 +21,18 @@ |
|
|
<Input v-model.trim="filters.prodBarCode.model"
|
|
|
:placeholder="filters.prodBarCode.holder"></Input>
|
|
|
</filter-item>
|
|
|
<filter-item :label="filters.sendTime.label">
|
|
|
<Date-picker type="daterange"
|
|
|
placeholder="选择日期"
|
|
|
@on-change="dateChange"
|
|
|
v-model.trim="filters.sendTime.model">
|
|
|
</Date-picker>
|
|
|
</filter-item>
|
|
|
<filter-item>
|
|
|
<Button type="primary" @click="filterSearch">筛选</Button>
|
|
|
<Button type="warning" @click="exportList">导出</Button>
|
|
|
<Button @click="clearFilter">清空条件</Button>
|
|
|
<Button type="warning" @click="exportSelected">导出</Button>
|
|
|
<Button type="warning" v-show="canExportAll" @click="exportAll">导出全部</Button>
|
|
|
<filter-tips type="warning" show-icon closable>请务必认真填写发货情况及物流信息,否则商品无法正常入库</filter-tips>
|
|
|
</filter-item>
|
|
|
</layout-filter>
|
...
|
...
|
@@ -58,6 +66,23 @@ |
|
|
this.tradeService = new TradeService();
|
|
|
this.getExpList(params);
|
|
|
},
|
|
|
computed: {
|
|
|
canExportAll() {
|
|
|
const filterKeys = {
|
|
|
skn: 'prodCode',
|
|
|
sku: 'skuCode',
|
|
|
proReqFormId: 'orderNo',
|
|
|
expressNumber: 'expressNo',
|
|
|
skuFactoryCode: 'prodBarCode',
|
|
|
startTime: 'sendStartTime',
|
|
|
endTime: 'sendEndTime',
|
|
|
};
|
|
|
|
|
|
return _.some(filterKeys, val => {
|
|
|
return this.filters[val].model;
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
getExpList(params) {
|
|
|
this.$Loading.start();
|
...
|
...
|
@@ -91,6 +116,13 @@ |
|
|
this.page.current = page;
|
|
|
this.getExpList(params);
|
|
|
},
|
|
|
setModel(k, v) {
|
|
|
this.filters[k].model = v;
|
|
|
},
|
|
|
dateChange(date) {
|
|
|
this.setModel('sendStartTime', date[0]);
|
|
|
this.setModel('sendEndTime', date[1]);
|
|
|
},
|
|
|
params() {
|
|
|
const data = {
|
|
|
pageNo: 1,
|
...
|
...
|
@@ -103,7 +135,9 @@ |
|
|
sku: 'skuCode',
|
|
|
proReqFormId: 'orderNo',
|
|
|
expressNumber: 'expressNo',
|
|
|
skuFactoryCode: 'prodBarCode'
|
|
|
skuFactoryCode: 'prodBarCode',
|
|
|
startTime: 'sendStartTime',
|
|
|
endTime: 'sendEndTime',
|
|
|
};
|
|
|
|
|
|
if (!this.useFilter) {
|
...
|
...
|
@@ -161,7 +195,26 @@ |
|
|
this.table.list = data.records;
|
|
|
this.page.total = data.totalCount;
|
|
|
},
|
|
|
exportList() {
|
|
|
exportAll() {
|
|
|
let filter = {};
|
|
|
|
|
|
const fieldKeys = {
|
|
|
skn: 'prodCode',
|
|
|
sku: 'skuCode',
|
|
|
proReqFormId: 'orderNo',
|
|
|
expressNumber: 'expressNo',
|
|
|
skuFactoryCode: 'prodBarCode',
|
|
|
startTime: 'sendStartTime',
|
|
|
endTime: 'sendEndTime',
|
|
|
};
|
|
|
|
|
|
_.each(fieldKeys, (val, key) => {
|
|
|
if (this.filters[val].model) {
|
|
|
filter[key] = this.filters[val].model;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
exportSelected() {
|
|
|
let express = [];
|
|
|
|
|
|
_.each(this.selection, pageSel => {
|
...
|
...
|
@@ -173,10 +226,6 @@ |
|
|
if (!express.length) {
|
|
|
return this.$Message.warning('请选择需要导出的条目', 3);
|
|
|
}
|
|
|
|
|
|
const href = `/Api/erp/todo?expressNumberList=${express.join('&')}`;
|
|
|
|
|
|
window.open(href, '_blank');
|
|
|
},
|
|
|
selectionChange(rows) {
|
|
|
this.selection[this.page.current] = rows;
|
...
|
...
|
|