162 lines
7.4 KiB
Plaintext
162 lines
7.4 KiB
Plaintext
<!--pages/merchant-orders/merchant-orders.wxml-->
|
|
<view class="sj-page">
|
|
<!-- 顶部商品类型滑动 -->
|
|
<view class="leixing-area">
|
|
<scroll-view class="leixing-scroll" scroll-x enhanced show-scrollbar="{{false}}">
|
|
<view class="leixing-container">
|
|
<block wx:for="{{shangpinleixing}}" wx:key="id">
|
|
<view
|
|
class="leixing-item {{xuanzhongLeixingId == item.id ? 'leixing-active' : ''}}"
|
|
data-id="{{item.id}}"
|
|
bindtap="selectLeixing"
|
|
>
|
|
<image class="leixing-img" src="{{item.full_tupian_url}}" mode="aspectFill"/>
|
|
<text class="leixing-name">{{item.jieshao || '类型'}}</text>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
|
|
<!-- 搜索行 -->
|
|
<view class="filter-row">
|
|
<view class="search-box">
|
|
<image class="search-icon" src="/images/icon_search.svg" mode="aspectFit"/>
|
|
<input class="search-input" placeholder="搜索订单ID/介绍/昵称/接单员ID/拼多多订单号" value="{{searchKeyword}}" bindinput="onSearchInput" bindconfirm="onSearchConfirm" confirm-type="search"/>
|
|
<view class="search-clear" wx:if="{{searchKeyword}}" bindtap="clearSearch"><text>✕</text></view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 时间段筛选 -->
|
|
<view class="time-filter-row">
|
|
<picker mode="date" value="{{timeStart}}" bindchange="onTimeStartChange">
|
|
<view class="time-pill {{timeStart ? 'time-pill--active' : ''}}">{{timeStart || '开始日期'}}</view>
|
|
</picker>
|
|
<text class="time-sep">至</text>
|
|
<picker mode="date" value="{{timeEnd}}" bindchange="onTimeEndChange">
|
|
<view class="time-pill {{timeEnd ? 'time-pill--active' : ''}}">{{timeEnd || '结束日期'}}</view>
|
|
</picker>
|
|
<view class="time-clear" wx:if="{{timeStart || timeEnd}}" bindtap="clearTimeFilter">清除</view>
|
|
</view>
|
|
<view class="time-quick-row">
|
|
<view class="time-quick-chip" data-days="0" bindtap="pickQuickRange">全部</view>
|
|
<view class="time-quick-chip" data-days="1" bindtap="pickQuickRange">今天</view>
|
|
<view class="time-quick-chip" data-days="7" bindtap="pickQuickRange">近7天</view>
|
|
<view class="time-quick-chip" data-days="30" bindtap="pickQuickRange">近30天</view>
|
|
</view>
|
|
|
|
<view class="staff-filter-row" wx:if="{{staffList.length > 0}}">
|
|
<picker mode="selector" range="{{staffList}}" range-key="nickname" bindchange="onStaffFilterChange">
|
|
<view class="staff-filter-pill {{selectedStaffMemberId ? 'staff-filter-pill--active' : ''}}">
|
|
<text class="staff-filter-tag">客服</text>
|
|
<text class="staff-filter-value">{{selectedStaffLabel}}</text>
|
|
<text class="staff-filter-arrow">▾</text>
|
|
</view>
|
|
</picker>
|
|
<view wx:if="{{selectedStaffMemberId}}" class="staff-filter-clear" bindtap="clearStaffFilter">清除</view>
|
|
</view>
|
|
|
|
<!-- 待结算数量提示条(保留原功能) -->
|
|
<view class="sj-pending-tip" wx:if="{{pendingCount > 0}}">
|
|
<text class="sj-pending-icon"></text>
|
|
<text class="sj-pending-text">待结算订单</text>
|
|
<view class="sj-pending-badge">{{pendingCount}}</view>
|
|
</view>
|
|
|
|
<!-- 主体:左右布局 -->
|
|
<view class="main-container">
|
|
<!-- 左侧状态栏(可纵向滑动) -->
|
|
<scroll-view class="left-status" scroll-y enhanced show-scrollbar="{{false}}">
|
|
<view class="left-status-inner">
|
|
<block wx:for="{{statusList}}" wx:key="key">
|
|
<view class="status-item {{currentStatusKey == item.key ? 'status-active' : ''}}" data-key="{{item.key}}" bindtap="switchStatus">
|
|
<text class="status-name">{{item.name}}</text>
|
|
<!-- 结算中状态旁边显示红色数字(保留原功能) -->
|
|
<view class="status-dot" wx:if="{{currentStatusKey == item.key}}"></view>
|
|
<view wx:if="{{item.key === 'jiesuanzhong' && pendingCount > 0}}" class="sj-status-badge">{{pendingCount}}</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</scroll-view>
|
|
|
|
<!-- 右侧包裹:撑出右边距,里面是 scroll-view -->
|
|
<view class="right-wrapper">
|
|
<scroll-view
|
|
class="right-list"
|
|
scroll-y enhanced show-scrollbar="{{false}}"
|
|
scroll-top="{{listScrollTop}}"
|
|
bindscroll="onListScroll"
|
|
refresher-enabled="{{true}}"
|
|
refresher-threshold="80"
|
|
refresher-default-style="black"
|
|
refresher-background="#fff8e1"
|
|
refresher-triggered="{{scrollViewRefreshing}}"
|
|
bindrefresherrefresh="onPullDownRefresh"
|
|
bindscrolltolower="onReachBottom"
|
|
lower-threshold="50"
|
|
>
|
|
<view class="refresher-slot" slot="refresher">
|
|
<text wx:if="{{scrollViewRefreshing}}" class="refreshing-text">⚡ 正在刷新...</text>
|
|
<text wx:else class="pull-text">▼ 下拉刷新</text>
|
|
</view>
|
|
|
|
<!-- 内容容器 -->
|
|
<view class="list-inner">
|
|
<!-- 加载中 -->
|
|
<view wx:if="{{isLoading && currentList.length === 0}}" class="loading-state">
|
|
<view class="loading-spinner"></view>
|
|
<text class="loading-tip">加载订单中...</text>
|
|
</view>
|
|
|
|
<!-- 空状态 -->
|
|
<view wx:elif="{{!isLoading && currentList.length === 0}}" class="empty-state">
|
|
<image class="empty-img" src="/images/empty-order.png" mode="aspectFit"/>
|
|
<text class="empty-text">暂无订单</text>
|
|
<text class="empty-subtext">快去派发订单吧</text>
|
|
</view>
|
|
|
|
<!-- 订单列表:简洁卡片,突出状态 -->
|
|
<view class="sj-order-list">
|
|
<block wx:for="{{currentList}}" wx:key="dingdan_id">
|
|
<view class="sj-order-card" data-item="{{item}}" bindtap="goToSjDingdanXiangqing">
|
|
<view class="sj-order-card-head">
|
|
<text class="sj-order-id">单号 {{item.dingdan_id}}</text>
|
|
<view class="sj-status-tag" style="color:{{item.zhuangtaiColor}};background:{{item.zhuangtaiBg}}">{{item.zhuangtaiZh}}</view>
|
|
</view>
|
|
<text class="sj-order-desc line2">{{item.jieshao || '暂无介绍'}}</text>
|
|
<view class="sj-order-meta">
|
|
<text class="sj-order-amount">¥{{item.jine || '0.00'}}</text>
|
|
<text class="sj-order-time">{{item.creat_time}}</text>
|
|
</view>
|
|
<text class="sj-order-remark line2" wx:if="{{item.beizhu}}">备注:{{item.beizhu}}</text>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
|
|
<!-- 上拉加载更多提示 -->
|
|
<view class="load-more" wx:if="{{hasMore && currentList.length > 0 && !isLoadingMore}}">
|
|
<text class="load-more-text">上拉加载更多</text>
|
|
</view>
|
|
|
|
<!-- 加载中 -->
|
|
<view class="loading-more-state" wx:if="{{isLoadingMore}}">
|
|
<view class="mini-spinner"></view>
|
|
<text>加载中...</text>
|
|
</view>
|
|
|
|
<!-- 🆕 手动加载更多按钮 -->
|
|
<view class="manual-load-more" wx:if="{{hasMore && currentList.length > 0 && !isLoadingMore}}">
|
|
<button class="load-more-btn" bindtap="onLoadMoreTap" loading="{{false}}">点击加载更多</button>
|
|
</view>
|
|
|
|
<!-- 没有更多 -->
|
|
<view class="no-more" wx:if="{{!hasMore && currentList.length > 0}}">
|
|
<text>—— 没有更多了 ——</text>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<global-notification id="global-notification" />
|
|
<tab-bar /> |