Files
SupplierSystem/miniprogram/components/order-manage-panel/index.wxml
T
雨天 be9ee17f7a
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
调整(送货单图片): 按钮与配送按钮同一行,不新开一行
开发者 2026-10-15(附截图):「放在配送按钮的右边,而不是新开一行给他」。\n\n- 卡片操作行改为「左侧组 .actions-main(配送/推进 + 送货单图片)+ 右侧详情」;\n  去掉原来单独一行的 .actions--note 块。\n- 契约测试加一条「同一行」断言(.actions-main 存在、actions--note 不存在);\n  设计文 §3.2 与修订记录 v3 同步。未改文案。
2026-10-15 13:48:17 +08:00

190 lines
7.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<view class="page {{embedded ? 'is-embedded' : ''}}">
<view class="page-atmosphere" aria-hidden="true"></view>
<view class="card filters anim-rise">
<view class="filter-block" wx:if="{{!embedded}}">
<view class="filter-label">订单状态</view>
<view class="chip-row">
<view
wx:for="{{statusGroups}}"
wx:key="value"
class="chip {{statusGroup === item.value ? 'active' : ''}}"
data-value="{{item.value}}"
bindtap="onStatusGroup"
>{{item.label}}{{item.count >= 0 ? '(' + item.count + ')' : ''}}</view>
</view>
</view>
<view class="filter-block">
<view class="filter-label">时间范围</view>
<view class="chip-row">
<view class="chip {{dateField === 'delivery_date' ? 'active' : ''}}" data-field="delivery_date" bindtap="setDateField">配送日</view>
<view class="chip {{dateField === 'created_at' ? 'active' : ''}}" data-field="created_at" bindtap="setDateField">下单日</view>
</view>
<view class="chip-row">
<view
wx:for="{{dateRanges}}"
wx:key="value"
class="chip {{dateRange === item.value ? 'active' : ''}}"
data-value="{{item.value}}"
bindtap="onDateRange"
>{{item.label}}</view>
<view
class="chip {{dateRange === 'custom' ? 'active' : ''}}"
bindtap="onOpenCustomRange"
>{{customRangeLabel}}</view>
</view>
<view class="range-bar" wx:if="{{dateRange === 'custom'}}">
<view class="range-bar-cell">
<picker mode="date" value="{{dateFrom}}" end="{{dateTo}}" bindchange="onCustomFromChange">
<view class="range-bar-inner">
<van-icon name="calendar-o" size="14px" color="#059669" />
<text class="range-bar-text">{{dateFrom || '开始日期'}}</text>
</view>
</picker>
</view>
<view class="range-bar-split">至</view>
<view class="range-bar-cell">
<picker mode="date" value="{{dateTo}}" start="{{dateFrom}}" bindchange="onCustomToChange">
<view class="range-bar-inner">
<van-icon name="calendar-o" size="14px" color="#059669" />
<text class="range-bar-text">{{dateTo || '结束日期'}}</text>
</view>
</picker>
</view>
</view>
</view>
<view class="search-row">
<view class="search-box">
<van-icon name="search" size="16px" color="#a1a1aa" />
<input
class="search-input"
placeholder="搜索订单号/客户/商品名"
value="{{search}}"
confirm-type="search"
bindinput="onSearchInput"
bindconfirm="onSearch"
/>
</view>
<button class="search-btn" size="mini" bindtap="onSearch">查询</button>
</view>
<view class="stats">
<view class="stats-item">
<text class="stats-label">订单</text>
<text class="stats-value">{{total}}</text>
</view>
<view class="stats-divider"></view>
<view class="stats-item">
<text class="stats-label">合计</text>
<text class="stats-value stats-amount">¥{{totalAmountText}}</text>
</view>
</view>
</view>
<view wx:if="{{loading}}" class="state-box">
<van-loading size="24px" color="#059669">加载中…</van-loading>
</view>
<view wx:elif="{{error}}" class="state-box error-box">{{error}}</view>
<view wx:elif="{{!rows.length}}" class="state-box">
<van-empty description="暂无订单" />
</view>
<view wx:else class="order-list anim-rise anim-rise--delay">
<view
wx:for="{{rows}}"
wx:key="order_code"
class="card order-card"
data-code="{{item.order_code}}"
bindtap="openDetail"
>
<view class="order-title-row">
<text class="customer">{{item.company_name || '客户'}}</text>
<view class="status-tag status-{{item.order_status}}">{{item.statusLabel}}</view>
</view>
<view class="order-sub-row">
<view class="order-code-wrap">
<van-icon name="orders-o" size="12px" color="#059669" />
<view class="order-code">{{item.order_code}}</view>
</view>
<view class="meta-amount">¥{{item.amountText}}</view>
</view>
<view class="meta-row">
<view class="meta-item">
<van-icon name="logistics" size="12px" color="#a1a1aa" />
<text>配送 {{item.delivery_date || '-'}}</text>
</view>
<view wx:if="{{item.status_hint}}" class="hint hint--inline">
<van-icon name="info-o" size="11px" color="#d97706" />
<text>{{item.status_hint}}</text>
</view>
</view>
<view class="actions" wx:if="{{item.next_status || item.isRetailAwaitingConfirm}}">
<view class="actions-main">
<!-- 散客录单:没有备货/验收/分拣/配送 ⇒ 只给「确认扣除并完结」(后端硬扣 retail_out) -->
<button
wx:if="{{item.isRetailAwaitingConfirm}}"
class="btn-primary action-btn"
size="mini"
hover-stop-propagation
disabled="{{advancingOrderCode && advancingOrderCode !== item.order_code}}"
loading="{{advancingOrderCode === item.order_code}}"
data-code="{{item.order_code}}"
catchtap="onRetailConfirm"
>确认扣除并完结</button>
<button
wx:else
class="btn-primary action-btn"
size="mini"
hover-stop-propagation
disabled="{{advancingOrderCode && advancingOrderCode !== item.order_code}}"
loading="{{advancingOrderCode === item.order_code}}"
data-code="{{item.order_code}}"
data-status="{{item.next_status}}"
data-label="{{item.advance_label}}"
catchtap="onAdvance"
>{{item.advance_label || '推进'}}</button>
<!-- 送货单图片:与配送/推进按钮**同一行**(2026-10-15 开发者:放配送按钮右边,不新开一行) -->
<button
wx:if="{{item.customer_code !== '__INDEPENDENT_INBOUND__'}}"
class="note-btn"
size="mini"
hover-stop-propagation
loading="{{noteImageOrderCode === item.order_code}}"
disabled="{{!!noteImageOrderCode && noteImageOrderCode !== item.order_code}}"
data-code="{{item.order_code}}"
catchtap="onDeliveryNoteImage"
>送货单图片</button>
</view>
<view class="detail-entry">
<text>详情</text>
<van-icon name="arrow" size="12px" color="#a1a1aa" />
</view>
</view>
<view class="actions actions-only-detail" wx:else>
<button
wx:if="{{item.customer_code !== '__INDEPENDENT_INBOUND__'}}"
class="note-btn"
size="mini"
hover-stop-propagation
loading="{{noteImageOrderCode === item.order_code}}"
disabled="{{!!noteImageOrderCode && noteImageOrderCode !== item.order_code}}"
data-code="{{item.order_code}}"
catchtap="onDeliveryNoteImage"
>送货单图片</button>
<view class="detail-entry">
<text>查看详情</text>
<van-icon name="arrow" size="12px" color="#a1a1aa" />
</view>
</view>
</view>
</view>
<!-- 送货单图片用的离屏画布(与各面板打印画布同款:存在但不可见) -->
<canvas type="2d" id="deliveryNoteCanvas" class="print-canvas"></canvas>
</view>