From 82276a731cae229325bdbda50d5772ff4b743bda Mon Sep 17 00:00:00 2001 From: hayu <1604366271@qq.com> Date: Wed, 12 Nov 2025 12:24:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E8=AF=A6=E6=83=85=E3=80=81?= =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=AE=A1=E6=A0=B8=E8=AF=A6=E6=83=85=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repair/repairManage/component/home.vue | 15 ++++++++ .../testExamine/component/homeApply.vue | 38 +++++++++++++++++-- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/src/views/material/repair/repairManage/component/home.vue b/src/views/material/repair/repairManage/component/home.vue index 795a0df5..25fbba91 100644 --- a/src/views/material/repair/repairManage/component/home.vue +++ b/src/views/material/repair/repairManage/component/home.vue @@ -49,6 +49,9 @@ 导出 + + 导出明细 + @@ -681,6 +684,18 @@ export default { `维修任务单_${currentTime}.xlsx`, ) }, + handleDetailsExport() { + const currentTime = formatTime(new Date()); + this.download( + 'material/repair/exportDetails', + { + ...this.queryParams, + // startTime:this.queryParams.time[0], + // endTime:this.queryParams.time[1] + }, + `维修任务详情单_${currentTime}.xlsx`, + ) + }, //查看维修任务单 async handlePrint(row) { const res = await getRepairDocumentInfo(row.taskId); diff --git a/src/views/material/repair/testExamine/component/homeApply.vue b/src/views/material/repair/testExamine/component/homeApply.vue index 79f6f05d..54cf97e7 100644 --- a/src/views/material/repair/testExamine/component/homeApply.vue +++ b/src/views/material/repair/testExamine/component/homeApply.vue @@ -102,6 +102,16 @@ >导出 + + 导出明细 + + + const validOptions = allOptions.filter(item => item.value == 10 || item.value == 11 || item.value == 12 ) - + // 如果有有效选项,设置第一个为默认值 if (validOptions.length > 0) { this.queryParams.taskStatus = validOptions[0].value } - + // 执行查询 this.getList() }, @@ -543,6 +553,28 @@ export default { `修试审核_${currentTime}.xlsx` ); }, + handleDetailsExport() { + 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()); + this.download( + "/material/repair/exportAuditDetails", + { + ...this.queryParams, + // startTime: this.queryParams.time && this.queryParams.time[0], + // endTime: this.queryParams.time && this.queryParams.time[1], + }, + `修试审核详情_${currentTime}.xlsx` + ); + }, //发布按钮 handleSend(row) {