Files
SupplierSystem/miniprogram/components/supplier-status-panel/index.wxml
T
Ubuntu deb3e72750
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
chore: 以 AI 生鲜配送系统 当前版本作为 SupplierSystem 起点
来源仓库:jxc/ai-fresh-delivery
来源提交:f0b1a180e2deb7e4673b9d1c8542619f7bc0f73d
快照树:  09f679334ff38f0ff25e907961c94a8223bcaedd(与来源 HEAD 工作树逐字节一致,3801 个文件)

按约定本仓库不带任何历史提交:来源仓库的历史中含真实凭据
(生产 SSH 私钥 deploy/id_rsa_tencent、server/.env、.env.tencent/.env.production/.env.gitea、
deploy/小程序AppSecret.txt,其中 MP_APPSECRET / S3 AccessKey 经哈希比对与线上同值),
整包推送会把这些凭据永久带入本仓库,故只取「当前版本」的单提交快照。
供应商系统后续开发自本提交开始。
2026-10-08 17:35:43 +08:00

88 lines
4.6 KiB
Plaintext

<view class="supplier-status-panel {{embedded ? 'is-embedded' : ''}}">
<view class="card">
<view class="row">
<view>
<view class="section-title">供应商完成状态</view>
<view class="text-muted date-hint">
{{oneClickEnabled ? '查看供货进度,可一键验收已完成的供应商供货' : '按配送日查看各供应商供货进度(含已完成)'}}
</view>
</view>
<view class="refresh" bindtap="loadRows">刷新</view>
</view>
<view wx:if="{{featureEnabled}}" class="filter-row">
<view class="filter-chip {{viewMode === 'recent' ? 'active' : ''}}" bindtap="showRecentRange">近3天</view>
<view class="filter-chip {{viewMode === 'pending' ? 'active' : ''}}" bindtap="showAllPending">全部未完成</view>
<picker mode="date" value="{{deliveryDate}}" bindchange="onDeliveryDateChange">
<view class="filter-chip {{viewMode === 'date' ? 'active' : ''}}">指定日</view>
</picker>
</view>
<view wx:if="{{featureEnabled && viewMode === 'recent' && rangeLabel}}" class="text-muted period-summary">
配送日 {{rangeLabel}}(含昨天、今天、明天)
</view>
<view wx:if="{{featureEnabled && viewMode === 'date' && deliveryDate}}" class="text-muted period-summary">
配送日 {{deliveryDate}}
</view>
<view wx:if="{{error}}" class="text-error">{{error}}</view>
<view wx:if="{{loading}}" class="text-muted">加载中...</view>
<view wx:if="{{!loading && featureEnabled && groups.length === 0}}" class="text-muted">
暂无供应商供货任务
<view wx:if="{{viewMode === 'date'}}" class="empty-hint">可切换「近3天」查看昨天/今天的已完成供货</view>
<view wx:elif="{{viewMode === 'pending'}}" class="empty-hint">当前没有未完成供货;已完成记录请用「近3天」或「指定日」查看</view>
</view>
<view wx:for="{{groups}}" wx:key="supplier_code" wx:for-item="group" class="supplier-group">
<view class="group-header" bindtap="toggleGroup" data-code="{{group.supplier_code}}">
<view class="group-main">
<text class="chevron">{{group.collapsed ? '▶' : '▼'}}</text>
<view>
<view class="group-title">{{group.supplier_name}}</view>
<view class="text-muted group-sub">
完成 {{group.completed_count}} · 进行中 {{group.in_progress_count}} · 待供货 {{group.pending_count}}<text wx:if="{{group.stockout_count}}"> · 缺货 {{group.stockout_count}}</text><text wx:if="{{oneClickEnabled && group.pending_inspection_count}}"> · 待验收 {{group.pending_inspection_count}}</text>
</view>
</view>
</view>
<view class="group-actions">
<button
wx:if="{{oneClickEnabled && group.pending_inspection_count > 0}}"
class="btn-one-click"
size="mini"
catchtap="confirmBatchInspectSupplier"
data-code="{{group.supplier_code}}"
data-name="{{group.supplier_name}}"
data-count="{{group.pending_inspection_count}}"
disabled="{{submitting}}"
>一键验收</button>
<view class="group-badge">{{group.total_count}}</view>
</view>
</view>
<view wx:if="{{!group.collapsed}}">
<view wx:for="{{group.items}}" wx:key="id" wx:for-item="item" class="task-item">
<view class="task-title">{{item.item_name}}</view>
<view class="text-muted" wx:if="{{item.order_code}}">订单:{{item.order_code}}</view>
<view class="text-muted" wx:if="{{item.delivery_date}}">配送日:{{item.delivery_date}}</view>
<view class="text-muted">数量:{{item.prepare_qty || 0}} {{item.unit || ''}}</view>
<view class="task-footer">
<view class="status-tag {{item.statusClass}}">{{item.status_text}}</view>
<view wx:if="{{item.inspection_completed}}" class="inspect-tag done">已验收</view>
<view wx:elif="{{item.inspection_pending && item.prepare_status === 30}}" class="inspect-tag pending">待验收</view>
<button
wx:if="{{oneClickEnabled && item.can_one_click_inspect}}"
class="btn-one-click item"
size="mini"
catchtap="confirmInspectItem"
data-id="{{item.id}}"
data-name="{{item.item_name}}"
disabled="{{submitting}}"
>验收</button>
</view>
<view wx:if="{{item.stockout_reason}}" class="text-muted">缺货原因:{{item.stockout_reason}}</view>
</view>
</view>
</view>
</view>
</view>