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

198 lines
7.8 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.
<template name="inboundCard">
<view class="xd-row-card {{item.input_rating === '不合格' ? 'xd-row-card--danger' : ''}}">
<view class="card-r1">
<view
class="btn-return {{submittingId === item.id ? 'is-disabled' : ''}}"
data-id="{{item.id}}"
bindtap="markFailThenSubmit"
>退回</view>
<view class="card-title-wrap">
<text class="task-title">{{item.item_name || '未知商品'}}</text>
<text class="photo-hint {{item.photoRequired ? 'need' : 'skip'}}">{{item.photoRequired ? '须拍照' : '免拍照'}}</text>
<text wx:if="{{item.independent_inbound}}" class="photo-hint independent">独立入库</text>
<text class="task-meta">{{item.prepare_qty || 0}}{{item.unit || ''}}</text>
</view>
<view
class="btn-pass {{submittingId === item.id ? 'is-disabled' : ''}}"
data-id="{{item.id}}"
bindtap="submitPassInspection"
>确认入库</view>
</view>
<view class="card-r2">
<view class="r2-photo">
<view wx:if="{{item.photoUrls.length}}" class="photo-grid">
<view
wx:for="{{item.photoUrls}}"
wx:for-item="photoUrl"
wx:for-index="photoIndex"
wx:key="*this"
class="photo-thumb-wrap"
>
<image
class="photo-thumb"
src="{{photoUrl}}"
mode="aspectFit"
data-url="{{photoUrl}}"
bindtap="previewPhoto"
/>
<view
class="photo-del"
catchtap="deletePhoto"
data-id="{{item.id}}"
data-index="{{photoIndex}}"
>×</view>
</view>
</view>
<view class="btn-photo" data-id="{{item.id}}" bindtap="choosePhoto">拍照</view>
<view
wx:if="{{item.photoRequired && (analyzingId === item.id || item.aiDone)}}"
class="ai-verdict {{analyzingId === item.id ? 'pending' : (item.aiSource === 'vision_unavailable' ? 'warn' : (item.input_rating === '不合格' ? 'fail' : 'ok'))}}"
>
<text wx:if="{{analyzingId === item.id}}">分析中</text>
<text wx:elif="{{item.aiSource === 'vision_unavailable'}}">人工</text>
<text wx:else>{{item.input_rating === '不合格' ? '不合格' : '合格'}}</text>
</view>
</view>
<view class="r2-field">
<input
class="qty-input"
type="digit"
value="{{item.input_qty}}"
data-id="{{item.id}}"
bindinput="onQtyInput"
placeholder="实收"
/>
</view>
<picker
class="r2-field r2-picker"
mode="selector"
range="{{resultOptions}}"
value="{{item.input_rating === '不合格' ? 1 : 0}}"
data-id="{{item.id}}"
bindchange="onRatingChange"
>
<view class="rate-pick">{{item.input_rating || '合格'}}</view>
</picker>
<picker
wx:if="{{item.requires_prepackaged_check}}"
class="r2-picker"
mode="date"
fields="month"
value="{{item.production_month}}"
data-id="{{item.id}}"
bindchange="onProductionMonthChange"
>
<view class="rate-pick">{{item.production_month || '产月'}}</view>
</picker>
</view>
</view>
</template>
<view class="page inspection-page {{embedded ? 'is-embedded' : ''}}">
<view wx:if="{{!hideProgress}}" class="kpi-card">
<view class="kpi-cell">
<view class="kpi-num xd-num">{{pendingCount}}</view>
<view class="kpi-label">待入库</view>
</view>
<view class="kpi-divider"></view>
<view class="kpi-cell">
<view class="kpi-num xd-num">{{doneCount}}</view>
<view class="kpi-label">本批条数</view>
</view>
<view class="kpi-divider"></view>
<view class="kpi-cell">
<view class="kpi-num xd-num">{{photoRequiredCount}}</view>
<view class="kpi-label">须拍照</view>
</view>
</view>
<view wx:if="{{!embedded}}" class="filter-pills">
<view
wx:for="{{sourceOptions}}"
wx:key="*this"
class="filter-pill {{sourceIndex === index ? 'on' : ''}}"
data-index="{{index}}"
bindtap="onSourcePillTap"
>{{item}}</view>
</view>
<view class="list-sheet">
<view class="batch-row">
<view class="batch-btn-wrap">
<button class="xd-btn-primary batch-btn" size="mini" bindtap="submitAllEligible" loading="{{batchSubmitting}}" disabled="{{batchSubmitting}}">
一键全部合格入库
</button>
</view>
<view wx:if="{{categoryChips.length}}" class="cat-grid">
<view
wx:for="{{categoryChips}}"
wx:key="name"
class="cat-cell {{categoryFilter === item.name ? 'is-active' : ''}}"
data-name="{{item.name}}"
bindtap="onCategoryTap"
>
<view class="cat-cell-name">{{item.name}}</view>
<view class="cat-cell-count">{{item.count}}</view>
</view>
</view>
</view>
<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="text-error">{{error}}</view>
<view wx:if="{{loading}}" class="text-muted">加载中...</view>
<view wx:if="{{!loading && visibleRows.length === 0}}" class="text-muted empty">{{categoryFilter ? '该分类暂无待入库任务' : '当前类型暂无待入库任务'}}</view>
<block wx:if="{{!loading && visibleRows.length && foldSameSku}}">
<block wx:for="{{dayCategoryGroups}}" wx:key="groupKey" wx:for-item="group">
<view wx:if="{{group.showDayHeader}}" class="today-day-head">{{group.dayLabel}}</view>
<view wx:for="{{group.skuGroups}}" wx:key="key" wx:for-item="skuGroup" class="sku-group">
<view
wx:if="{{skuGroup.multi}}"
class="sku-group-head {{skuGroup.collapsed ? 'is-collapsed' : ''}}"
data-key="{{skuGroup.key}}"
bindtap="toggleSkuGroup"
>
<view class="sku-group-main">
<view class="sku-group-title">{{skuGroup.name}}</view>
<view class="sku-group-meta">
{{skuGroup.count}}单 · 应收 {{skuGroup.prepareSumText}}{{skuGroup.unit}} · 已填 {{skuGroup.actualSumText}}{{skuGroup.unit}}
</view>
</view>
<view class="sku-group-chevron">{{skuGroup.collapsed ? '展开' : '收起'}}</view>
</view>
<block wx:if="{{!skuGroup.multi || !skuGroup.collapsed}}">
<block wx:for="{{skuGroup.items}}" wx:for-item="item" wx:key="id">
<template is="inboundCard" data="{{item, submittingId, analyzingId, resultOptions}}" />
</block>
</block>
</view>
</block>
</block>
<block wx:elif="{{!loading && visibleRows.length}}">
<block wx:for="{{dayCategoryGroups}}" wx:key="groupKey" wx:for-item="group">
<view wx:if="{{group.showDayHeader}}" class="today-day-head">{{group.dayLabel}}</view>
<block wx:for="{{group.items}}" wx:key="id" wx:for-item="item">
<template is="inboundCard" data="{{item, submittingId, analyzingId, resultOptions}}" />
</block>
</block>
</block>
</view>
</view>