Files
SupplierSystem/miniprogram/components/picking-panel/index.wxml
T
雨天 02982efa9e
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
fix(分拣): 批次行补入库日+单位,清小程序打印,Web 去批次上下移
- 批次行摘要改为「区 入库日 数量单位」(如 冷库B 10-12 5斤),无区时回退「入库日 数量单位」
- 小程序彻底不做打印:移除「一键确认」后的自动下发打印,删除 printPickLabels/printCurrentPick/choosePrintDevice/pickPrintCodes 及相关 state 与 import;同步更新 mpPickingScopeSelect 契约断言
- Web 批次编辑弹窗去掉 ↑↓,删除 moveBatchEditorRow 与 i18n picking.batch.moveUp/moveDown

无迁移,未动后端逻辑。小程序需重新编译。
2026-10-12 13:13:50 +08:00

200 lines
8.6 KiB
Plaintext

<view class="pick-page {{embedded ? 'is-embedded' : ''}} {{activeTask.pick_status == 30 ? 'pick-page--outbound' : (activeTask.pick_status < 30 ? 'pick-page--picking' : '')}}">
<view class="page-atmosphere" aria-hidden="true"></view>
<view wx:if="{{!hideProgress}}" class="kpi-card">
<view class="kpi-cell">
<view class="kpi-num xd-num">{{tasks.length}}</view>
<view class="kpi-label">我的任务</view>
</view>
<view class="kpi-divider"></view>
<view class="kpi-cell">
<view class="kpi-num xd-num">{{taskSummary.pickedCount || 0}}</view>
<view class="kpi-label">已确认</view>
</view>
<view class="kpi-divider"></view>
<view class="kpi-cell">
<view class="kpi-num xd-num">{{pendingCount || 0}}</view>
<view class="kpi-label">待分拣</view>
</view>
</view>
<view class="list-sheet">
<view class="date-axis">
<picker
mode="selector"
range="{{dateFieldOptions}}"
range-key="label"
value="{{dateFieldIndex}}"
bindchange="onDateFieldPick"
>
<view class="date-chip axis-pick">{{dateFieldLabel}} ▾</view>
</picker>
<picker mode="date" value="{{dateFrom || todayValue}}" bindchange="onCustomFromChange">
<view class="date-chip date-pick {{dateFrom ? 'on' : ''}}">{{dateFrom || '起始日'}} ▾</view>
</picker>
<picker mode="date" value="{{dateTo || dateFrom || todayValue}}" bindchange="onCustomToChange">
<view class="date-chip date-pick {{dateTo ? 'on' : ''}}">{{dateTo || '结束日'}} ▾</view>
</picker>
</view>
<view wx:if="{{error}}" class="error-box">{{error}}</view>
<view wx:if="{{loading}}" class="state-box">
<van-loading size="24px" color="#059669">加载中...</van-loading>
</view>
<view wx:elif="{{!loading && tasks.length === 0}}" class="state-box">
<van-empty description="暂无分配给您的拣货单,请联系仓管在 Web「分拣出库」中分配" />
</view>
<view wx:if="{{scopeGroups.length}}" class="scope-wrap">
<view class="scope-select {{scopeMenuOpen ? 'is-open' : ''}}" bindtap="toggleScopeMenu">
<text class="scope-select-val">{{scopePickerLabels[scopePickerIndex]}}</text>
<text class="scope-select-arrow">▾</text>
</view>
<view wx:if="{{scopeMenuOpen}}" class="scope-menu">
<view
wx:for="{{scopeGroups}}"
wx:key="key"
class="scope-option {{item.key === activeGroupKey ? 'is-active' : ''}}"
data-key="{{item.key}}"
catchtap="onScopeOptionTap"
>{{item.label}}</view>
</view>
</view>
<block wx:if="{{activeTask}}">
<view wx:if="{{taskSummary}}" class="progress-line">
<text>已确认 {{taskSummary.pickedCount}}/{{taskSummary.total}}</text>
<view class="progress-bar">
<view
class="progress-fill"
style="width: {{taskSummary.total ? (taskSummary.pickedCount / taskSummary.total * 100) : 0}}%;"
></view>
</view>
<text class="items-meta">待 {{pendingCount}}</text>
</view>
<block wx:for="{{activePendingItems}}" wx:key="rowKey">
<view wx:if="{{item._zone}}" class="zone-head">{{item.zone_label}}</view>
<view
wx:else
class="detail-row {{item.picked_done ? 'is-done' : 'is-pending'}}"
>
<view class="line-one">
<view
wx:if="{{activeTask.pick_status < 30 || item.can_pick}}"
class="btn-pick {{saving ? 'is-disabled' : ''}}"
data-pick="{{item.pick_code || activePickCode}}"
data-id="{{item.id}}"
catchtap="confirmItemPick"
>确认</view>
<text class="line-product">{{item.display_name}}</text>
<text class="qty-meta">需求 {{item.required_qty}}{{item.unit || ''}}</text>
<block wx:if="{{activeTask.pick_status < 30 || item.can_pick}}">
<view class="qty-chip">
<text class="qty-chip-lab">{{item.qty_chip_label}}</text>
<input
class="qty-input {{pickingScaleRequired && item.pick_by_weight && !(item.input_weight > 0) ? 'qty-input--warn' : ''}}"
type="digit"
value="{{item.pick_by_weight ? item.input_weight : item.input_qty}}"
data-pick="{{item.pick_code || activePickCode}}"
data-id="{{item.id}}"
data-field="{{item.pick_by_weight ? 'input_weight' : 'input_qty'}}"
bindinput="onFieldInput"
/>
</view>
<view wx:if="{{item.need_extra_weight}}" class="qty-chip qty-chip--extra">
<text class="qty-chip-lab">重量</text>
<input
class="qty-input"
type="digit"
value="{{item.input_weight}}"
data-pick="{{item.pick_code || activePickCode}}"
data-id="{{item.id}}"
data-field="input_weight"
bindinput="onFieldInput"
/>
</view>
</block>
<block wx:elif="{{item.line_pick_status >= 30 && !item.can_pick}}">
<text class="qty-meta">已拣 {{item.picked_qty_num || 0}}{{item.unit || ''}}</text>
</block>
</view>
<view wx:if="{{batchesMap[item.id]}}" class="batch-line">
<text class="batch-lab">批次</text>
<block wx:if="{{batchesMap[item.id].loading}}">
<text class="batch-muted">加载中</text>
</block>
<block wx:elif="{{batchesMap[item.id].plan_text}}">
<text class="batch-sum">{{batchesMap[item.id].plan_text}}</text>
<text wx:if="{{batchesMap[item.id].shortfall}}" class="batch-warn">缺 {{batchesMap[item.id].shortfall}}</text>
</block>
<block wx:elif="{{batchesMap[item.id].error}}">
<text class="batch-muted">{{batchesMap[item.id].error}}</text>
</block>
<block wx:else>
<text class="batch-muted">无可扣批次</text>
</block>
<view class="btn-batch" data-id="{{item.id}}" catchtap="openBatchEditor">调整</view>
</view>
</view>
</block>
</block>
</view>
<view
wx:if="{{hasOpenPicks}}"
class="bottom-bar-slot {{embedded ? 'bottom-bar-slot--embedded' : ''}}"
/>
<view
wx:if="{{activeTask && !hasOpenPicks && activeTask.pick_status == 30}}"
class="bottom-bar-slot bottom-bar-slot--stack {{embedded ? 'bottom-bar-slot--embedded' : ''}}"
/>
<root-portal enable="{{true}}">
<view wx:if="{{hasOpenPicks}}" class="bottom-bar bottom-bar--row {{embedded ? 'bottom-bar--embedded' : ''}}">
<view
class="btn-primary bottom-main {{saving ? 'is-disabled' : ''}}"
data-pick="{{activePickCode}}"
bindtap="confirmAllPicks"
>一键确认</view>
</view>
<view wx:if="{{activeTask && !hasOpenPicks && activeTask.pick_status == 30}}" class="bottom-bar bottom-bar--stack {{embedded ? 'bottom-bar--embedded' : ''}}">
<view class="flow-tip">分拣已完成,订单进入待配送,等待司机装车核货</view>
</view>
<view wx:if="{{editor}}" class="batch-mask" bindtap="closeBatchEditor"></view>
<view wx:if="{{editor}}" class="batch-sheet" catchtap="noop">
<view class="batch-sheet-head">
<text class="batch-sheet-title">{{editor.name}}</text>
<text class="batch-sheet-sub">需 {{editor.need}}{{editor.unit}} · 可扣 {{editor.claimable}}</text>
</view>
<view class="batch-sheet-body">
<view wx:for="{{editor.rows}}" wx:key="batch_id" class="batch-row">
<view class="batch-row-info">
<text class="batch-row-no">{{item.batch_no}}</text>
<text class="batch-row-meta">{{item.storage_zone || '未设区域'}} · 入库 {{item.inbound_date || '—'}} · 可用 {{item.available_qty}}</text>
</view>
<input
class="batch-input"
type="digit"
value="{{item.qty}}"
data-index="{{index}}"
bindinput="onBatchQtyInput"
/>
</view>
</view>
<view class="batch-sheet-total">
<text>合计 {{editor.total}} / 需 {{editor.need}}</text>
<text wx:if="{{editor.shortfall}}" class="batch-warn">库存不足,还缺 {{editor.shortfall}}</text>
</view>
<view class="batch-sheet-foot">
<view class="batch-btn ghost" catchtap="resetBatchEditorFifo">按先进先出</view>
<view class="batch-btn primary" catchtap="applyBatchEditor">确定</view>
</view>
</view>
</root-portal>
</view>