小程序页面视觉对齐二期:预约图片轮播、订单数据预览、微信用户关联与请假管理
新增预约详情作品图片轮播字段与组装;新增订单预览与未关联微信用户候选接口;补齐请假记录查询接口;订单数据预览改为四列;请假管理接入真实排班例外并支持新增;日程、我的、美甲师详情与改派选择器按设计稿微调;注册结果页与申请提交时间对齐设计稿。
This commit is contained in:
@@ -11,13 +11,6 @@ function shortDateTime(value) {
|
||||
return text.length > 16 ? text.slice(0, 16) : text || '-'
|
||||
}
|
||||
|
||||
function timeRange(item) {
|
||||
const start = String(item.startTime || '').slice(11, 16)
|
||||
const end = String(item.endTime || '').slice(11, 16)
|
||||
if (!start && !end) return '-'
|
||||
return `${start || '-'}-${end || '-'}`
|
||||
}
|
||||
|
||||
function scheduleSummary(item) {
|
||||
const mode = item.scheduleModeSummary || item.scheduleMode || ''
|
||||
const time = item.scheduleTimeSummary || item.ruleTimeSummary || ''
|
||||
@@ -73,21 +66,20 @@ Page({
|
||||
},
|
||||
|
||||
async loadOrderPreview() {
|
||||
const data = await planningApi.calendar({
|
||||
const data = await planningApi.orderPreview({
|
||||
startDate: this.data.startDate,
|
||||
endDate: this.data.endDate
|
||||
})
|
||||
const rows = (data.appointments || []).slice(0, PREVIEW_SIZE).map((item, index) => ({
|
||||
key: `order-${item.orderItemId || index}`,
|
||||
date: item.date || String(item.startTime || '').slice(0, 10) || '-',
|
||||
customer: item.customerName || '到店客户',
|
||||
product: item.productTitle || '预约作品',
|
||||
artist: item.artistName || '未分配',
|
||||
time: timeRange(item),
|
||||
status: item.statusText || '-'
|
||||
const list = Array.isArray(data) ? data : (data.list || [])
|
||||
const rows = list.slice(0, PREVIEW_SIZE).map((item, index) => ({
|
||||
key: `order-${item.orderNo || item.id || index}`,
|
||||
orderNo: item.orderNo || '-',
|
||||
amount: item.actualAmount === null || item.actualAmount === undefined ? '-' : `¥${item.actualAmount}`,
|
||||
status: item.statusText || '-',
|
||||
createTime: shortDateTime(item.createTime && String(item.createTime).replace('T', ' '))
|
||||
}))
|
||||
this.setData({
|
||||
previewColumns: ['日期', '客户', '项目', '美甲师', '时间', '状态'],
|
||||
previewColumns: ['订单编号', '实付金额', '状态', '创建时间'],
|
||||
previewRows: rows
|
||||
})
|
||||
},
|
||||
|
||||
@@ -19,12 +19,10 @@
|
||||
</view>
|
||||
<view wx:for="{{previewRows}}" wx:key="key" class="preview-row">
|
||||
<block wx:if="{{type === '订单数据'}}">
|
||||
<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.artist}}</text>
|
||||
<text class="preview-cell">{{item.time}}</text>
|
||||
<text class="preview-cell order-no">{{item.orderNo}}</text>
|
||||
<text class="preview-cell">{{item.amount}}</text>
|
||||
<text class="preview-cell">{{item.status}}</text>
|
||||
<text class="preview-cell">{{item.createTime}}</text>
|
||||
</block>
|
||||
<block wx:elif="{{type === '客户数据'}}">
|
||||
<text class="preview-cell">{{item.name}}</text>
|
||||
|
||||
@@ -38,12 +38,13 @@
|
||||
}
|
||||
|
||||
.preview-table {
|
||||
min-width: 920rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.preview-row {
|
||||
display: flex;
|
||||
min-height: 58rpx;
|
||||
align-items: center;
|
||||
min-height: 68rpx;
|
||||
border-bottom: 1rpx solid #e7ece9;
|
||||
}
|
||||
|
||||
@@ -52,25 +53,32 @@
|
||||
}
|
||||
|
||||
.preview-row-head {
|
||||
border-radius: 8rpx;
|
||||
background: #f3f7f4;
|
||||
min-height: 64rpx;
|
||||
border-bottom: 0;
|
||||
border-radius: 12rpx;
|
||||
background: #f5f7f4;
|
||||
}
|
||||
|
||||
.preview-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 150rpx;
|
||||
min-width: 150rpx;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding: 0 12rpx;
|
||||
overflow: hidden;
|
||||
color: #5e564d;
|
||||
color: #17211f;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.35;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.preview-cell.order-no {
|
||||
flex: 1.35;
|
||||
font-family: "SF Mono", Menlo, monospace;
|
||||
}
|
||||
|
||||
.preview-row-head .preview-cell {
|
||||
color: #17211f;
|
||||
font-weight: 800;
|
||||
color: #71807a;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user