Authored by 李奇

changed:导出接口参数修改

... ... @@ -37,6 +37,12 @@ export default () => {
model: '',
holder: ''
},
startTime: {
model: ''
},
endTime: {
model: '',
},
prodStatus: {
label: '商品状态',
model: -1,
... ...
... ... @@ -32,6 +32,12 @@ export default () => {
model: '',
holder: ''
},
startTime: {
model: ''
},
endTime: {
model: '',
},
prodStatus: {
label: '商品状态',
model: -1,
... ...
... ... @@ -22,8 +22,10 @@
:placeholder="filters.prodBarCode.holder"></Input>
</FilterItem>
<FilterItem :label="filters.orderTime.label">
<Date-picker type="date" placeholder="选择日期"
@on-change="dateChange" :value="filters.orderTime.model"></Date-picker>
<Date-picker type="daterange"
placeholder="选择日期"
@on-change="dateChange"
:value="filters.orderTime.model"></Date-picker>
</FilterItem>
<FilterItem :label="filters.prodStatus.label">
<Select v-model.trim="filters.prodStatus.model">
... ... @@ -108,8 +110,8 @@
productSkn: 'prodCode',
sknFactoryCode: 'merChantCode',
skuFactoryCode: 'prodBarCode',
startTime: 'orderTime',
endTime: 'orderTime',
startTime: 'startTime',
endTime: 'endTime',
statusList: 'prodStatus',
isOvertime: 'prodStatus'
};
... ... @@ -131,17 +133,23 @@
}
const ot = values.isOvertime;
const date = values.startTime;
const start = values.startTime;
const end = values.endTime;
const status = values.statusList;
values.isOvertime = ot === -2 ? 'Y' : '';
if (date && moment(date).isValid()) {
values.startTime = +moment(date).format('X');
values.endTime = +moment(date).add(1, 'days').format('X');
if (start && moment(start).isValid()) {
values.startTime = +moment(start).format('X');
} else {
values.startTime = '';
}
if (end && moment(end).isValid()) {
values.endTime = +moment(end).add(1, 'days').format('X');
} else {
values.endTime = '';
}
if (status === -1) {
values.statusList = [2, 3];
} else if (status === -2) {
... ... @@ -188,7 +196,8 @@
this.filters[k].model = v;
},
dateChange(date) {
this.setModel('orderTime', date);
this.setModel('startTime', date[0]);
this.setModel('endTime', date[1]);
},
rowClassName(row) {
if (row.isOvertime === 'Y') {
... ... @@ -211,6 +220,7 @@
});
const href = `/Api/erp/allotExportList?${temp.join('&')}`;
console.log(href)
window.open(href, '_blank');
}
... ...
... ... @@ -18,7 +18,8 @@
:placeholder="filters.prodBarCode.holder"></Input>
</FilterItem>
<FilterItem :label="filters.orderTime.label">
<Date-picker type="date" placeholder="选择日期"
<Date-picker type="daterange"
placeholder="选择日期"
@on-change="dateChange"
:value="filters.orderTime.model">
</Date-picker>
... ... @@ -115,8 +116,8 @@
productSkn: 'prodCode',
sknFactoryCode: 'merChantCode',
skuFactoryCode: 'prodBarCode',
startTime: 'orderTime',
endTime: 'orderTime',
startTime: 'startTime',
endTime: 'endTime',
isOvertime: 'prodStatus'
};
let values = {};
... ... @@ -142,15 +143,21 @@
}
const ot = values.isOvertime;
const date = values.startTime;
const start = values.startTime;
const end = values.endTime;
if (date && moment(date).isValid()) {
values.startTime = +moment(date).format('X');
values.endTime = +moment(date).add(1, 'days').format('X');
if (start && moment(start).isValid()) {
values.startTime = +moment(start).format('X');
} else {
values.endTime = '';
values.startTime = '';
}
if (end && moment(end).isValid()) {
values.endTime = +moment(end).add(1, 'days').format('X');
} else {
values.endTime = '';
}
values.isOvertime = ot === -1 ? '' : (ot === 1 ? 'N' : 'Y'); // eslint-disable-line
return values;
... ... @@ -250,7 +257,8 @@
this.filters[k].model = v;
},
dateChange(date) {
this.setModel('orderTime', date);
this.setModel('startTime', date[0]);
this.setModel('endTime', date[1]);
},
rowClassName(row) {
if (row.isOvertime === 'Y') {
... ...