优化员工头像和导出金额展示
This commit is contained in:
@@ -17,6 +17,14 @@ function timeRange(item) {
|
||||
return `${start || '-'}-${end || '-'}`
|
||||
}
|
||||
|
||||
function orderAmount(item) {
|
||||
const value = item.amount !== undefined && item.amount !== null ? item.amount : item.manualProductPrice
|
||||
if (value === undefined || value === null || value === '') return '-'
|
||||
const amount = Number(value)
|
||||
if (Number.isNaN(amount)) return String(value)
|
||||
return `¥${amount.toFixed(2).replace(/\.00$/, '')}`
|
||||
}
|
||||
|
||||
function scheduleSummary(item) {
|
||||
const mode = item.scheduleModeSummary || item.scheduleMode || ''
|
||||
const time = item.scheduleTimeSummary || item.ruleTimeSummary || ''
|
||||
@@ -81,12 +89,13 @@ Page({
|
||||
date: item.date || String(item.startTime || '').slice(0, 10) || '-',
|
||||
customer: item.customerName || '到店客户',
|
||||
product: item.productTitle || '预约作品',
|
||||
amount: orderAmount(item),
|
||||
artist: item.artistName || '未分配',
|
||||
time: timeRange(item),
|
||||
status: item.statusText || '-'
|
||||
}))
|
||||
this.setData({
|
||||
previewColumns: ['日期', '客户', '项目', '美甲师', '时间', '状态'],
|
||||
previewColumns: ['日期', '客户', '项目', '金额', '美甲师', '时间', '状态'],
|
||||
previewRows: rows
|
||||
})
|
||||
},
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<text class="preview-cell">{{item.date}}</text>
|
||||
<text class="preview-cell">{{item.customer}}</text>
|
||||
<text class="preview-cell">{{item.product}}</text>
|
||||
<text class="preview-cell">{{item.amount}}</text>
|
||||
<text class="preview-cell">{{item.artist}}</text>
|
||||
<text class="preview-cell">{{item.time}}</text>
|
||||
<text class="preview-cell">{{item.status}}</text>
|
||||
|
||||
Reference in New Issue
Block a user