fix(分拣出库拍照): 拍照区移到详情上方,避免被忽略
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

- Web:出库拍照区从底部按钮上方移到明细标题下方(详情顶部)
- 小程序:从底部 bar 上方移到任务详情顶部(进度行上方)
- 仅位置调整,无逻辑变更;两端 tsc + node --check 通过,前端全量仍基线
This commit is contained in:
雨天
2026-10-12 16:01:13 +08:00
parent fd96513c11
commit 2ab033f79c
2 changed files with 58 additions and 58 deletions
+14 -14
View File
@@ -63,6 +63,20 @@
</view>
<block wx:if="{{activeTask}}">
<view wx:if="{{hasOpenPicks}}" class="outbound-photo">
<view class="outbound-photo-head">
<text class="outbound-photo-title">出库拍照(可选)</text>
<text class="outbound-photo-hint">不拍也能完成</text>
</view>
<view class="outbound-photo-list">
<view class="outbound-photo-add" bindtap="pickOutboundPhotos">{{photoUploading ? '上传中…' : '拍照/选图'}}</view>
<view wx:for="{{outboundPhotos}}" wx:key="path" class="outbound-photo-item">
<image class="outbound-photo-img" src="{{item.tempFilePath}}" mode="aspectFill" />
<view class="outbound-photo-del" data-index="{{index}}" catchtap="removeOutboundPhoto">×</view>
</view>
</view>
</view>
<view wx:if="{{taskSummary}}" class="progress-line">
<text>已确认 {{taskSummary.pickedCount}}/{{taskSummary.total}}</text>
<view class="progress-bar">
@@ -152,20 +166,6 @@
class="bottom-bar-slot bottom-bar-slot--stack {{embedded ? 'bottom-bar-slot--embedded' : ''}}"
/>
<view wx:if="{{hasOpenPicks}}" class="outbound-photo">
<view class="outbound-photo-head">
<text class="outbound-photo-title">出库拍照(可选)</text>
<text class="outbound-photo-hint">不拍也能完成</text>
</view>
<view class="outbound-photo-list">
<view class="outbound-photo-add" bindtap="pickOutboundPhotos">{{photoUploading ? '上传中…' : '拍照/选图'}}</view>
<view wx:for="{{outboundPhotos}}" wx:key="path" class="outbound-photo-item">
<image class="outbound-photo-img" src="{{item.tempFilePath}}" mode="aspectFill" />
<view class="outbound-photo-del" data-index="{{index}}" catchtap="removeOutboundPhoto">×</view>
</view>
</view>
</view>
<root-portal enable="{{true}}">
<view wx:if="{{hasOpenPicks}}" class="bottom-bar bottom-bar--row {{embedded ? 'bottom-bar--embedded' : ''}}">
<view
+44 -44
View File
@@ -2311,6 +2311,50 @@ function assigneeLabel(user: PickingAssignee, roleLabel: (code: string) => strin
</button>
</div>
{Number(selectedTask.pick_status) < 30 && (
<div className="mb-4 p-4 bg-gray-50 rounded-lg border border-gray-200 space-y-2">
<div className="flex flex-wrap items-center justify-between gap-2">
<p className="text-sm font-medium text-black">{t('picking.outboundPhoto.title')}</p>
<span className="text-xs text-gray-500">{t('picking.outboundPhoto.hint')}</span>
</div>
<div className="flex flex-wrap items-center gap-2">
<button
type="button"
onClick={() => outboundPhotoInputRef.current?.click()}
disabled={photoUploading}
className="px-3 py-1.5 border border-gray-200 rounded-md text-sm text-gray-700 hover:bg-white disabled:opacity-50"
>
{photoUploading ? t('picking.outboundPhoto.uploading') : t('picking.outboundPhoto.add')}
</button>
{outboundPhotos.map((photo) => (
<span key={photo.path} className="relative inline-block">
<img
src={photo.previewUrl}
alt=""
className="w-14 h-14 object-cover rounded border border-gray-200"
/>
<button
type="button"
onClick={() => removeOutboundPhoto(photo.path)}
aria-label={t('common.close')}
className="absolute -top-1 -right-1 w-4 h-4 rounded-full bg-black/70 text-white text-[10px] leading-none"
>
×
</button>
</span>
))}
</div>
<input
ref={outboundPhotoInputRef}
type="file"
accept="image/*"
multiple
className="hidden"
onChange={(event) => void handleOutboundPhotosPicked(event)}
/>
</div>
)}
{Number(selectedTask.pick_status) < 30 && pickingScaleRequired && (
<div className="mb-4 rounded-lg border border-sky-200 bg-sky-50 px-4 py-3 text-sm text-sky-900">
{t('picking.modal.weighRequired')}
@@ -2719,50 +2763,6 @@ function assigneeLabel(user: PickingAssignee, roleLabel: (code: string) => strin
</div>
)}
{Number(selectedTask.pick_status) < 30 && (
<div className="mt-6 p-4 bg-gray-50 rounded-lg border border-gray-200 space-y-2">
<div className="flex flex-wrap items-center justify-between gap-2">
<p className="text-sm font-medium text-black">{t('picking.outboundPhoto.title')}</p>
<span className="text-xs text-gray-500">{t('picking.outboundPhoto.hint')}</span>
</div>
<div className="flex flex-wrap items-center gap-2">
<button
type="button"
onClick={() => outboundPhotoInputRef.current?.click()}
disabled={photoUploading}
className="px-3 py-1.5 border border-gray-200 rounded-md text-sm text-gray-700 hover:bg-white disabled:opacity-50"
>
{photoUploading ? t('picking.outboundPhoto.uploading') : t('picking.outboundPhoto.add')}
</button>
{outboundPhotos.map((photo) => (
<span key={photo.path} className="relative inline-block">
<img
src={photo.previewUrl}
alt=""
className="w-14 h-14 object-cover rounded border border-gray-200"
/>
<button
type="button"
onClick={() => removeOutboundPhoto(photo.path)}
aria-label={t('common.close')}
className="absolute -top-1 -right-1 w-4 h-4 rounded-full bg-black/70 text-white text-[10px] leading-none"
>
×
</button>
</span>
))}
</div>
<input
ref={outboundPhotoInputRef}
type="file"
accept="image/*"
multiple
className="hidden"
onChange={(event) => void handleOutboundPhotosPicked(event)}
/>
</div>
)}
<div className="flex justify-end gap-3 mt-6">
<button
type="button"