diff --git a/JY-Salon-Front/src/views/ExportView.vue b/JY-Salon-Front/src/views/ExportView.vue index 83d52470..c57a9e6b 100644 --- a/JY-Salon-Front/src/views/ExportView.vue +++ b/JY-Salon-Front/src/views/ExportView.vue @@ -93,6 +93,18 @@ const timeRange = (item: Appointment): string => { return `${start || '-'}-${end || '-'}` } +const orderAmount = (item: Appointment): string => { + const value = 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$/, '')}` +} + const scheduleSummary = (item: Artist): string => { const source = item as Artist & { scheduleModeSummary?: string; scheduleMode?: string; scheduleTimeSummary?: string; ruleTimeSummary?: string } const mode = source.scheduleModeSummary || source.scheduleMode || '' @@ -102,12 +114,13 @@ const scheduleSummary = (item: Artist): string => { const loadOrderPreview = async (): Promise => { const data = await managerPlanningApi.calendar({ startDate: startDate.value, endDate: endDate.value }) - previewColumns.value = ['日期', '客户', '项目', '美甲师', '时间', '状态'] + previewColumns.value = ['日期', '客户', '项目', '金额', '美甲师', '时间', '状态'] previewRows.value = (data.appointments || []).slice(0, PREVIEW_SIZE).map((item, index) => ({ key: `order-${item.orderItemId || index}`, 日期: item.date || String(item.startTime || '').slice(0, 10) || '-', 客户: item.customerName || '到店客户', 项目: item.productTitle || '预约作品', + 金额: orderAmount(item), 美甲师: item.artistName || '未分配', 时间: timeRange(item), 状态: item.statusText || '-' diff --git a/JY-Salon-WeChat/pages/employee-detail/index.wxml b/JY-Salon-WeChat/pages/employee-detail/index.wxml index 663ced2a..5955fbdd 100644 --- a/JY-Salon-WeChat/pages/employee-detail/index.wxml +++ b/JY-Salon-WeChat/pages/employee-detail/index.wxml @@ -5,7 +5,10 @@ - {{employee.shortName}} + + + + {{employee.shortName}} {{employee.name}} 员工色 diff --git a/JY-Salon-WeChat/pages/employee-detail/index.wxss b/JY-Salon-WeChat/pages/employee-detail/index.wxss index 8c25beb1..037ff10f 100644 --- a/JY-Salon-WeChat/pages/employee-detail/index.wxss +++ b/JY-Salon-WeChat/pages/employee-detail/index.wxss @@ -23,11 +23,17 @@ width: 94rpx; height: 94rpx; border-radius: 50%; + overflow: hidden; color: #fff; font-size: 34rpx; font-weight: 900; } +.image-avatar image { + width: 100%; + height: 100%; +} + .employee-name { display: block; margin-bottom: 12rpx; diff --git a/JY-Salon-WeChat/pages/employees/index.wxss b/JY-Salon-WeChat/pages/employees/index.wxss index 8cc01799..12b3c6e4 100644 --- a/JY-Salon-WeChat/pages/employees/index.wxss +++ b/JY-Salon-WeChat/pages/employees/index.wxss @@ -50,10 +50,6 @@ overflow: hidden; } -.image-avatar { - background: #f0ece5; -} - .image-avatar image { width: 100%; height: 100%; diff --git a/JY-Salon-WeChat/pages/export/index.js b/JY-Salon-WeChat/pages/export/index.js index 68dd38b2..11e12bb3 100644 --- a/JY-Salon-WeChat/pages/export/index.js +++ b/JY-Salon-WeChat/pages/export/index.js @@ -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 }) }, diff --git a/JY-Salon-WeChat/pages/export/index.wxml b/JY-Salon-WeChat/pages/export/index.wxml index a00067c5..1b546e58 100644 --- a/JY-Salon-WeChat/pages/export/index.wxml +++ b/JY-Salon-WeChat/pages/export/index.wxml @@ -22,6 +22,7 @@ {{item.date}} {{item.customer}} {{item.product}} + {{item.amount}} {{item.artist}} {{item.time}} {{item.status}}