Commit ab3aba27 authored by 管新明's avatar 管新明

fix

parent 69210d25
......@@ -105,10 +105,9 @@ export default class BaseController {
}
console.log(list, '导出报表')
let xlsxData = [
[
<% for(var i = 0; i < winnersExportData.length; ++i) {%>
<%- `${winnersExportData[i]}`
%><% } %>
[<% for(var i = 0; i < winnersExportData.length; ++i) {%>
<%- `${winnersExportData[i]},`
%><% } %>
]
]
res.forEach((v, index, arr) => {
......@@ -134,19 +133,7 @@ export default class BaseController {
if (v.type == PRIZE_TYPE.THANK) prizeType = '谢谢参与'
}
xlsxData.push([
v._id,
v.userNick,
v.createTime ? formatTime(new Date(v.createTime + EIGHT_HOURS)) : '',
v.type == 3 ? (v.receiveTime ? formatTime(new Date(v.receiveTime + EIGHT_HOURS)) : '暂未填写') : '/',
prizeType,
prizeDataType,
v.type == 2 ? `${v.credits || 0}积分` : v.name || '',
v.type == 3 ? v.receiveName || '' : '/',
v.type == 3 ? (v.phone ? v.phone + '' : '暂未填写') : '/',
v.type == 3 ? v.province + v.city + v.area + v.streetName + v.addressDetail || '暂未填写' : '/',
shipTxt,
v.type == 3 ? v.shipCompany || '' : '/',
v.type == 3 ? (v.shipNum ? v.shipNum + '' : '') : '/'
<%- `${winnersExportData.includes('奖品编号') && 'v._id,'}`%>
])
})
let buffer = xlsx.build([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment