From 0cd010290bac7ba12e6163240b2fd34d8affb37c Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Thu, 21 Nov 2024 15:30:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=B7=BB=E5=8A=A0=E5=AE=8C?= =?UTF-8?q?=E7=BB=93=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/aftersales/aftersalesWorkOrder.js | 9 +++++++ src/views/aftersales/aftersalesWorkOrder.vue | 25 ++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/api/aftersales/aftersalesWorkOrder.js b/src/api/aftersales/aftersalesWorkOrder.js index 2812bc3e..789ad03f 100644 --- a/src/api/aftersales/aftersalesWorkOrder.js +++ b/src/api/aftersales/aftersalesWorkOrder.js @@ -500,6 +500,15 @@ export const $_exportWorkOrder2 = (params) => { responseType: 'blob', }) } +// 完结导出 +export const $_exportWorkOrder4 = (params) => { + return request({ + url: '/api/logpm-aftersales/aftersalesWorkOrder/exportWorkOrder4', + method: 'get', + params, + responseType: 'blob', + }) +} // 处理完毕 export const $_exportWorkOrder3 = (params) => { return request({ diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index cd0e7143..d6f9470e 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -636,6 +636,7 @@ import { $_exportWorkOrder1, $_exportWorkOrder2, $_exportWorkOrder3, + $_exportWorkOrder4, } from '@/api/aftersales/aftersalesWorkOrder'; import { columnList, @@ -2830,6 +2831,10 @@ const exportReport = () => { // 理赔金额未出 ExportClaimAmount(dataID); break; + case 6: + // 完结 + CompleteExport(dataID); + break; default: ExportAll(dataID); break; @@ -2934,6 +2939,26 @@ const ExportClaimAmount = async dataID => { } finally { } }; +// 完结导出 +const CompleteExport = async dataID => { + try { + let res = await $_exportWorkOrder4(dataID); + const currentDate = new Date(); + const formattedDate = `${currentDate.getFullYear()}${(currentDate.getMonth() + 1) + .toString() + .padStart(2, '0')}${currentDate.getDate().toString().padStart(2, '0')}${currentDate + .getHours() + .toString() + .padStart(2, '0')}${currentDate.getMinutes().toString().padStart(2, '0')}${currentDate + .getSeconds() + .toString() + .padStart(2, '0')}`; + downloadXls(res.data, `导出工单数据${formattedDate}.xlsx`); + } catch (e) { + console.log(e); + } finally { + } +}; // 处理完毕导出 const ProcessedExported = async dataID => { try {