From 721482102c5f17d7ffeac84373f3c4b25701edce Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Tue, 16 Sep 2025 20:43:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E9=A2=86=E6=96=99=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/lease/outBound/index.vue | 34 +++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/views/material/lease/outBound/index.vue b/src/views/material/lease/outBound/index.vue index 984124cc..c1d52bfe 100644 --- a/src/views/material/lease/outBound/index.vue +++ b/src/views/material/lease/outBound/index.vue @@ -55,6 +55,7 @@ 搜索 重置 导出 + 导出领料明细 @@ -994,6 +995,39 @@ export default { ) }, + /** 导出领料明细按钮操作 */ + handleExportDetail() { + const formatTime = date => { + const year = date.getFullYear() + const month = String(date.getMonth() + 1).padStart(2, '0') + const day = String(date.getDate()).padStart(2, '0') + const hours = String(date.getHours()).padStart(2, '0') + const minutes = String(date.getMinutes()).padStart(2, '0') + const seconds = String(date.getSeconds()).padStart(2, '0') + return `${year}${month}${day}_${hours}${minutes}${seconds}` + } + + const currentTime = formatTime(new Date()) + const params = { + keyWord: this.queryParams.keyWord, + startTime: this.queryParams.time && this.queryParams.time[0], + endTime: this.queryParams.time && this.queryParams.time[1], + pageSize: this.queryParams.pageSize, + pageNum: this.queryParams.pageNum, + hasSign: 1 + } + if (!this.queryParams.taskStatus) { + params.statusList = [3, 4, 5] + } else { + params.statusList = [this.queryParams.taskStatus] + } + this.download( + '/material/lease_apply_info/exportLeaseOutRecordDetail', + { ...params }, + `领用明细数据_${currentTime}.xlsx` + ) + }, + /** 查看按钮操作 */ handleView(row) { console.log('🚀 ~ handleView ~ row:', row.taskType)