Authored by 李奇

请退单导出修改

... ... @@ -48,7 +48,7 @@
this.$router.push({ name: 'repository.prodReturn.list' });
},
exportDetail() {
let href = `/Api/erp/exportProductReturnList?
let href = `/Api/erp/exportProductReturnDetail?
supplierId=${this.supplierId}&returnedSupplierId=${this.returnId}`;
window.open(href, '_blank');
... ...
... ... @@ -14,11 +14,11 @@
<Input v-model.trim.number="filters.reqNum.model" :maxlength="9"></Input>
</FilterItem>
<FilterItem :label="filters.createTime.label">
<Date-picker type="datetimerange" placeholder="选择日期和时间"
<Date-picker v-model="filters.createTime.model" type="datetimerange" placeholder="选择日期和时间"
@on-change="createTimeChange"></Date-picker>
</FilterItem>
<FilterItem :label="filters.outTime.label">
<Date-picker type="datetimerange" placeholder="选择日期和时间"
<Date-picker v-model="filters.outTime.model" type="datetimerange" placeholder="选择日期和时间"
@on-change="outTimeChange"></Date-picker>
</FilterItem>
<FilterItem>
... ... @@ -83,22 +83,33 @@
this.page.current = 1;
},
clearFilter() {
_.each(this.filters, item => {
item.model = '';
});
this.page.current = 1;
this.page.total = 0;
this.enableFilter = false;
this.returnList(this.filterValues());
},
createTimeChange(time) {
// 兼容: https://github.com/iview/iview/issues/973
if (!_.isArray(time)) {
time = time.split(' - ');
}
this.filters.bCreateTime.model = +moment(time[0]).format('X');
this.filters.eCreateTime.model = +moment(time[1]).format('X');
if ((time[0] + '').length) {
this.filters.bCreateTime.model = +moment(time[0]).format('X');
this.filters.eCreateTime.model = +moment(time[1]).format('X');
}
},
outTimeChange(time) {
// 兼容: https://github.com/iview/iview/issues/973
if (!_.isArray(time)) {
time = time.split(' - ');
}
this.filters.bOutTime.model = +moment(time[0]).format('X');
this.filters.eOutTime.model = +moment(time[1]).format('X');
if ((time[0] + '').length) {
this.filters.bOutTime.model = +moment(time[0]).format('X');
this.filters.eOutTime.model = +moment(time[1]).format('X');
}
},
returnList(params) {
const isValid = this.checkParams(params);
... ... @@ -140,7 +151,7 @@
},
resolveData(data) {
this.dataList = data.records;
this.page.total = data.total;
this.page.total = data.totalCount;
},
pageChange(page) {
let params = this.filterValues();
... ... @@ -149,9 +160,6 @@
this.page.current = page;
this.returnList(params);
},
selectChange(rows) {
this.batchRows = rows;
},
goDetail(row) {
const returnId = row.returnedSupplierId;
const supplierId = row.supplierId;
... ... @@ -195,7 +203,7 @@
temp.push(`${key}=${val}`);
});
window.open(`/Api/erp/allotExportList?${temp.join('&')}`, '_blank');
window.open(`/Api/erp/exportProductReturnList?${temp.join('&')}`, '_blank');
},
exportOne(id) {
window.open(`/Api/erp/exportProductReturnList?returnedSupplierId=${id}`, '_blank');
... ...
... ... @@ -27,7 +27,8 @@ export default function() {
model: ''
},
createTime: {
label: '请退时间'
label: '请退时间',
model: ''
},
bCreateTime: {
model: ''
... ... @@ -36,7 +37,8 @@ export default function() {
model: ''
},
outTime: {
label: '退库时间'
label: '退库时间',
model: ''
},
bOutTime: {
model: ''
... ...