feat(order): 新增订单 tab,支持未分配与我的订单分栏

This commit is contained in:
lik
2026-11-10 15:51:22 +08:00
parent 541611eaad
commit 5848d181a6
9 changed files with 149 additions and 76 deletions
+30 -18
View File
@@ -3,28 +3,40 @@
<!-- 顶部标题 -->
<view class="header">
<view class="header-content">
<text class="header-title">订单管理</text>
<text class="header-sub">共 {{stats.total}} 个订单</text>
<text class="header-title">{{currentScope === 'pool' ? '接单大厅' : '我的订单'}}</text>
<text class="header-sub">共 {{stats.total}} {{currentScope === 'pool' ? '个未分配订单' : '个订单'}}</text>
</view>
<view class="header-add" wx:if="{{isAdmin}}" bindtap="onAddOrder">新增预约</view>
</view>
<!-- 状态筛选 -->
<view class="filter-bar">
<scroll-view class="filter-scroll" scroll-x enhanced show-scrollbar="{{false}}">
<view class="filter-list">
<view
class="filter-tag {{currentStatus === item.value ? 'active' : ''}}"
wx:for="{{statusFilters}}"
wx:key="value"
data-status="{{item.value}}"
bindtap="onStatusChange"
>
<text>{{item.label}}</text>
<text class="filter-count" wx:if="{{item.count > 0}}">{{item.count}}</text>
</view>
<!-- 订单分栏:未分配订单 / 我的订单 -->
<view class="scope-bar">
<view
class="scope-tab {{currentScope === 'pool' ? 'active' : ''}}"
data-scope="pool"
bindtap="onScopeChange"
>未分配订单</view>
<view
class="scope-tab {{currentScope === 'mine' ? 'active' : ''}}"
data-scope="mine"
bindtap="onScopeChange"
>我的订单</view>
</view>
<!-- 状态筛选:仅「我的订单」可用,通过下拉选择,不再占用页面 tab -->
<view class="filter-bar" wx:if="{{currentScope === 'mine'}}">
<text class="filter-label">订单状态</text>
<picker
mode="selector"
range="{{statusFilterLabels}}"
value="{{statusIndex}}"
bindchange="onStatusPick"
>
<view class="status-pill">
<text>{{statusFilterLabels[statusIndex]}}</text>
<t-icon name="chevron-down" size="24rpx" color="#A3988B" />
</view>
</scroll-view>
</picker>
</view>
<!-- 订单列表 -->
@@ -44,7 +56,7 @@
<!-- 空状态 -->
<view class="empty-box" wx:elif="{{!isLoading && orderList.length === 0}}">
<t-empty icon="file" description="暂无订单" t-class-description="empty-text">
<t-empty icon="file" description="{{currentScope === 'pool' ? '暂无可接订单' : '暂无订单'}}" t-class-description="empty-text">
<view slot="action">
<view class="empty-btn" bindtap="onReload">刷新</view>
</view>