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