Browse Source

首页添加完结导出

dev-xx
马远东 2 months ago
parent
commit
0cd010290b
  1. 9
      src/api/aftersales/aftersalesWorkOrder.js
  2. 25
      src/views/aftersales/aftersalesWorkOrder.vue

9
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({

25
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 {

Loading…
Cancel
Save