Showing
2 changed files
with
13 additions
and
7 deletions
| ... | @@ -125,7 +125,7 @@ export function exportDeclareData(data) { | ... | @@ -125,7 +125,7 @@ export function exportDeclareData(data) { |
| 125 | url: url, | 125 | url: url, |
| 126 | method: 'post', | 126 | method: 'post', |
| 127 | responseType: 'blob', // 确保响应类型为 blob | 127 | responseType: 'blob', // 确保响应类型为 blob |
| 128 | - data: data.declareIds, | 128 | + data: data, |
| 129 | }) | 129 | }) |
| 130 | .then((res) => { | 130 | .then((res) => { |
| 131 | const aLink = document.createElement("a"); | 131 | const aLink = document.createElement("a"); | ... | ... |
| ... | @@ -557,13 +557,22 @@ export default { | ... | @@ -557,13 +557,22 @@ export default { |
| 557 | }, | 557 | }, |
| 558 | //导出 | 558 | //导出 |
| 559 | downloadData() { | 559 | downloadData() { |
| 560 | - if (this.selected.length > 0) { | ||
| 561 | this.loadings.exportDeclareLoading = true; | 560 | this.loadings.exportDeclareLoading = true; |
| 562 | let obj = { | 561 | let obj = { |
| 563 | - declareIds: [], | 562 | + billNo: this.sreachFormData.billNo, |
| 563 | + declareId: [], | ||
| 564 | + logisticsNo: this.sreachFormData.logisticsNo, | ||
| 565 | + orderNo: this.sreachFormData.orderNo, | ||
| 566 | + receiptStatus: this.sreachFormData.receiptStatus, | ||
| 564 | }; | 567 | }; |
| 568 | + obj.startCreateTime = ""; | ||
| 569 | + obj.endCreateTime = ""; | ||
| 570 | + if (this.sreachFormData.createTime.length > 0) { | ||
| 571 | + obj.startCreateTime = this.sreachFormData.createTime[0]; | ||
| 572 | + obj.endCreateTime = this.sreachFormData.createTime[1]; | ||
| 573 | + } | ||
| 565 | this.selected.forEach((item) => { | 574 | this.selected.forEach((item) => { |
| 566 | - obj.declareIds.push(item.declareId); | 575 | + obj.declareId.push(item.declareId); |
| 567 | }); | 576 | }); |
| 568 | exportDeclareData(obj).then((res)=>{ | 577 | exportDeclareData(obj).then((res)=>{ |
| 569 | // if (res.code === "200") { | 578 | // if (res.code === "200") { |
| ... | @@ -578,9 +587,6 @@ export default { | ... | @@ -578,9 +587,6 @@ export default { |
| 578 | this.alertErrorMsg(err); | 587 | this.alertErrorMsg(err); |
| 579 | this.loadings.exportDeclareLoading = false; | 588 | this.loadings.exportDeclareLoading = false; |
| 580 | }) | 589 | }) |
| 581 | - }else { | ||
| 582 | - this.alertWarningMsg("请选择需导出的数据!"); | ||
| 583 | - } | ||
| 584 | 590 | ||
| 585 | }, | 591 | }, |
| 586 | 592 | ... | ... |
-
Please register or login to post a comment