新增门店订单与核销管理列表,对齐 Android 订单能力并完善账号级缓存。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 14:46:10 +08:00
parent c4de3d17d0
commit 08492df6ce
51 changed files with 3668 additions and 102 deletions

View File

@ -0,0 +1,71 @@
//
// OrderListHeaderView.swift
// suixinkan
//
// Created by Codex on 2026/6/29.
//
import SwiftUI
/// `.searchable`
struct OrderListHeaderView: View {
let filterTitle: String
let timeFilterTitle: String
let statusFilters: [OrderStatusFilter]
let selectedStatus: Int
let onStatusSelected: (Int) -> Void
let onTimeFilterTap: () -> Void
var body: some View {
HStack(spacing: 8) {
Menu {
ForEach(statusFilters) { filter in
Button(filter.title) {
onStatusSelected(filter.id)
}
}
} label: {
OrderListFilterPill(title: filterTitle, showsChevron: true)
}
Button(action: onTimeFilterTap) {
OrderListFilterPill(title: timeFilterTitle, showsCalendar: true)
}
.buttonStyle(.plain)
}
.padding(16)
.background(.white)
}
}
/// pill
private struct OrderListFilterPill: View {
let title: String
var showsChevron = false
var showsCalendar = false
var body: some View {
HStack(spacing: 4) {
Text(title)
.font(.system(size: 14))
.foregroundStyle(AppDesign.orderLabelColor)
.lineLimit(1)
.minimumScaleFactor(0.75)
Spacer(minLength: 4)
if showsChevron {
Image(systemName: "chevron.down")
.font(.system(size: 12, weight: .semibold))
.foregroundStyle(AppDesign.orderLabelColor)
}
if showsCalendar {
Image(systemName: "calendar")
.font(.system(size: 15))
.foregroundStyle(AppDesign.orderLabelColor)
}
}
.padding(.horizontal, 12)
.frame(maxWidth: .infinity)
.frame(height: 35)
.background(AppDesign.orderInputBackground, in: RoundedRectangle(cornerRadius: 4))
}
}