|
@ -102,7 +102,7 @@ async function exportReceivedDetail(ctx, dataList) { |
|
|
exportData.push(item) |
|
|
exportData.push(item) |
|
|
} |
|
|
} |
|
|
const fileName = `回款明细表_${moment().format('YYYYMMDDHHmmss')}` + '.xlsx' |
|
|
const fileName = `回款明细表_${moment().format('YYYYMMDDHHmmss')}` + '.xlsx' |
|
|
const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName }) |
|
|
const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName, needIndexCell: false }) |
|
|
const fileData = fs.readFileSync(filePath); |
|
|
const fileData = fs.readFileSync(filePath); |
|
|
ctx.status = 200; |
|
|
ctx.status = 200; |
|
|
ctx.set('Content-Type', 'application/x-xls'); |
|
|
ctx.set('Content-Type', 'application/x-xls'); |
|
@ -225,20 +225,20 @@ async function exportAchievementDetail(ctx, dataList) { |
|
|
title: '是否可复制的业务路径', |
|
|
title: '是否可复制的业务路径', |
|
|
key: 'reproducible', |
|
|
key: 'reproducible', |
|
|
}, { |
|
|
}, { |
|
|
title: '省外业务1.1', |
|
|
title: '省外业务', |
|
|
key: 'outProvince', |
|
|
key: 'outProvince', |
|
|
}, { |
|
|
}, { |
|
|
title: '复购业务1.05', |
|
|
title: '复购业务', |
|
|
key: 'repurchase', |
|
|
key: 'repurchase', |
|
|
}, { |
|
|
}, { |
|
|
title: '可复制的业务路径1.1', |
|
|
title: '可复制的业务路径', |
|
|
key: 'isreproduce', |
|
|
key: 'isreproduce', |
|
|
}] |
|
|
}] |
|
|
const { utils: { simpleExcelDown } } = ctx.app.fs; |
|
|
const { utils: { simpleExcelDown } } = ctx.app.fs; |
|
|
let exportData = [] |
|
|
let exportData = [] |
|
|
for (let { dataValues: item } of dataList) { |
|
|
for (let { dataValues: item } of dataList) { |
|
|
item.isApproval = item.isApproval ? '是' : '否'; |
|
|
item.isApproval = JSON.stringify(item.isApproval) === 'null' ? '-' : item.isApproval ? '是' : '否'; |
|
|
item.reproducible = item.reproducible ? '是' : '否'; |
|
|
item.reproducible = JSON.stringify(item.reproducible) === 'null' ? '-' : item.reproducible ? '是' : '否'; |
|
|
exportData.push(item) |
|
|
exportData.push(item) |
|
|
} |
|
|
} |
|
|
const fileName = `业绩明细表_${moment().format('YYYYMMDDHHmmss')}` + '.xlsx' |
|
|
const fileName = `业绩明细表_${moment().format('YYYYMMDDHHmmss')}` + '.xlsx' |
|
|