Files
SupplierSystem/miniprogram/components/quality-reports-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

64 lines
2.6 KiB
Plaintext

<view class="quality-reports-panel {{embedded ? 'is-embedded' : ''}}">
<view class="tab-row">
<view class="tab-chip {{tab === 'pending' ? 'active' : ''}}" data-tab="pending" bindtap="onTab">待上传</view>
<view class="tab-chip {{tab === 'uploaded' ? 'active' : ''}}" data-tab="uploaded" bindtap="onTab">已上传</view>
</view>
<view wx:if="{{error}}" class="error">{{error}}</view>
<view wx:elif="{{loading}}" class="empty">加载中…</view>
<block wx:elif="{{tab === 'pending'}}">
<view class="type-bar" wx:if="{{typeLabels.length}}">
<text class="type-label">上传类型</text>
<picker mode="selector" range="{{typeLabels}}" value="{{uploadTypeIndex}}" bindchange="onTypePick">
<view class="type-picker">{{typeLabels[uploadTypeIndex] || '选择类型'}}</view>
</picker>
</view>
<view wx:if="{{!pending.length}}" class="empty">暂无待上传报告</view>
<view wx:for="{{pending}}" wx:key="share_key" class="card">
<view class="title">{{item.report_label}}</view>
<view class="meta">配送日 {{item.delivery_date || '-'}} · {{item.prep_count}} 行</view>
<view class="meta">{{item.item_names_text}}</view>
<view wx:if="{{item.share_hint}}" class="hint">{{item.share_hint}}</view>
<button
class="btn"
size="mini"
data-id="{{item.preparation_id}}"
data-type="{{item.report_type}}"
bindtap="uploadReport"
>上传报告</button>
</view>
</block>
<block wx:else>
<view wx:if="{{!uploaded.length}}" class="empty">暂无已上传报告</view>
<view wx:for="{{uploaded}}" wx:key="id" class="card">
<view class="title">{{item.report_label || '检验报告'}}</view>
<view class="meta {{item.validityClass}}">{{item.validity_label || item.validity_status || ''}}</view>
<view class="meta">配送日 {{item.delivery_date || '-'}}</view>
<view class="batch {{item.batchWarn ? 'warn' : ''}}">溯源批次:{{item.batchText}}</view>
<view wx:if="{{item.share_hint}}" class="hint">{{item.share_hint}}</view>
<view class="thumbs" wx:if="{{item.file_urls && item.file_urls.length}}">
<image
wx:for="{{item.file_urls}}"
wx:for-item="url"
wx:key="*this"
class="thumb"
src="{{url}}"
mode="aspectFill"
data-urls="{{item.file_urls}}"
data-url="{{url}}"
bindtap="preview"
/>
</view>
<button
wx:if="{{item.firstBatch}}"
class="btn"
size="mini"
data-batch="{{item.firstBatch}}"
bindtap="goTrace"
>查看溯源</button>
</view>
</block>
</view>