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

fix: 调整ejs语法

parent aa19aca5
...@@ -135,17 +135,17 @@ export default class BaseController { ...@@ -135,17 +135,17 @@ export default class BaseController {
xlsxData.push([ xlsxData.push([
<%- `${winnersExportData.includes('奖品编号') && 'v._id,'}`%> <%- `${winnersExportData.includes('奖品编号') && 'v._id,'}`%>
<%- `${winnersExportData.includes('用户id') && 'v.userNick,'}`%> <%- `${winnersExportData.includes('用户id') && 'v.userNick,'}`%>
<%- `${winnersExportData.includes('中奖时间') && 'v.createTime ? formatTime(new Date(v.createTime + EIGHT_HOURS)) : '','}`%> <%- `${winnersExportData.includes('中奖时间') && "v.createTime ? formatTime(new Date(v.createTime + EIGHT_HOURS)) : '',"}`%>
<%- `${winnersExportData.includes('地址填写时间') && 'v.type == 3 ? (v.receiveTime ? formatTime(new Date(v.receiveTime + EIGHT_HOURS)) : '暂未填写') : '/','}`%> <%- `${winnersExportData.includes('地址填写时间') && "v.type == 3 ? (v.receiveTime ? formatTime(new Date(v.receiveTime + EIGHT_HOURS)) : '暂未填写') : '/',"}`%>
<%- `${winnersExportData.includes('奖品类型') && 'prizeType,'}`%> <%- `${winnersExportData.includes('奖品类型') && 'prizeType,'}`%>
<%- `${winnersExportData.includes('发奖来源') && 'prizeDataType,'}`%> <%- `${winnersExportData.includes('发奖来源') && 'prizeDataType,'}`%>
<%- `${winnersExportData.includes('奖品名称') && 'v.type == 2 ? `${v.credits || 0}积分` : v.name || '','}`%> <%- `${winnersExportData.includes('奖品名称') && "v.type == 2 ? `${v.credits || 0}积分` : v.name || '',"}`%>
<%- `${winnersExportData.includes('收货人') && 'v.type == 3 ? v.receiveName || '' : '/','}`%> <%- `${winnersExportData.includes('收货人') && "v.type == 3 ? v.receiveName || '' : '/',"}`%>
<%- `${winnersExportData.includes('联系方式') && 'v.type == 3 ? (v.phone ? v.phone + '' : '暂未填写') : '/','}`%> <%- `${winnersExportData.includes('联系方式') && "v.type == 3 ? (v.phone ? v.phone + '' : '暂未填写') : '/',"}`%>
<%- `${winnersExportData.includes('收货地址') && 'v.type == 3 ? v.province + v.city + v.area + v.streetName + v.addressDetail || '暂未填写' : '/','}`%> <%- `${winnersExportData.includes('收货地址') && "v.type == 3 ? v.province + v.city + v.area + v.streetName + v.addressDetail || '暂未填写' : '/',"}`%>
<%- `${winnersExportData.includes('发货地址') && 'shipTxt,'}`%> <%- `${winnersExportData.includes('发货地址') && 'shipTxt,'}`%>
<%- `${winnersExportData.includes('物流公司') && 'v.type == 3 ? v.shipCompany || '' : '/','}`%> <%- `${winnersExportData.includes('物流公司') && "v.type == 3 ? v.shipCompany || '' : '/',"}`%>
<%- `${winnersExportData.includes('物流单号') && 'v.type == 3 ? (v.shipNum ? v.shipNum + '' : '') : '/''}`%> <%- `${winnersExportData.includes('物流单号') && "v.type == 3 ? (v.shipNum ? v.shipNum + '' : '') : '/'"}`%>
]) ])
}) })
let buffer = xlsx.build([ 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