统一作业列表与待办统计并更新废弃扫码

This commit is contained in:
2026-10-30 15:42:38 +08:00
parent 868f18d7df
commit fadef06191
15 changed files with 482 additions and 66 deletions
+12 -4
View File
@@ -1,7 +1,7 @@
<template>
<view v-if="user" class="page-shell portal-page fulfillment-page">
<PortalHeader title="排车作业" :user="user" />
<scroll-view class="fulfillment-scroll" scroll-y><view class="portal-content fulfillment-content">
<scroll-view class="fulfillment-scroll" scroll-y><view class="portal-content fulfillment-content" :class="{ 'pda-task-list': !current }">
<view class="fulfillment-heading"><text class="fulfillment-title">理货审核、真实拣货与装车</text></view>
<view v-if="current" class="detail-toolbar"><text class="detail-title">{{ current.dispatchNo }}</text><button :disabled="busy" @tap="closeTask">‹ 返回列表</button></view>
<view v-if="current" class="stage-switch" role="tablist" aria-label="排车作业">
@@ -16,10 +16,14 @@
<view v-if="loading" class="fulfillment-state"><text>正在加载排车事实…</text></view>
<view v-if="error" class="fulfillment-error" role="alert"><text class="state-title">{{ error.message }}</text><text v-if="error.code">错误码:{{ error.code }}</text><text v-if="error.requestId">requestId:{{ error.requestId }}</text><text v-if="error.traceId">traceId:{{ error.traceId }}</text><text v-if="error.network">网络中断,请稍后重新操作。</text><button :disabled="busy || loading" @tap="retry">重新核对</button></view>
<template v-if="!current && !loading">
<view class="list-toolbar"><text class="list-title">排车任务</text><button :disabled="busy" @tap="loadTasks">刷新</button></view>
<view class="list-toolbar pda-list-toolbar"><text>排车任务<text v-if="!error"> · {{ tasks.length }} 单</text></text><button :disabled="busy" @tap="loadTasks"><uni-icons type="refresh" color="#135ee8" size="18" /><text>刷新</text></button></view>
<view v-if="!tasks.length && !error" class="fulfillment-state">暂无排车任务,可扫描排车单号读取。</view>
<view v-if="tasks.length" class="task-list">
<button v-for="task in tasks" :key="task.dispatchNo" class="task-card" @tap="openTask(task.dispatchNo)"><text class="business-code">{{ task.dispatchNo }}</text><text v-if="task.dispatchNo === recentTaskNo" class="recent-badge">上次作业</text><text class="status-badge">{{ stageLabel(task) }}</text><text class="task-meta">任务号 {{ task.taskNo || '—' }}</text></button>
<view v-if="tasks.length" class="task-list pda-list-cards">
<button v-for="task in tasks" :key="task.dispatchNo" class="task-card pda-task-card" hover-class="pda-task-card-pressed" @tap="openTask(task.dispatchNo)">
<view class="pda-task-head"><text class="pda-task-no">{{ task.dispatchNo }}</text><text class="status-badge pda-task-status">{{ stageLabel(task) }}</text></view>
<text v-if="String(task.taskNo || '').trim() && String(task.taskNo || '').trim() !== String(task.dispatchNo || '').trim()" class="pda-task-meta">任务号 {{ task.taskNo }}</text>
<view class="pda-task-footer"><text v-if="task.dispatchNo === recentTaskNo" class="recent-badge">上次作业</text><view class="pda-task-action"><text>详情</text><uni-icons type="right" color="#135ee8" size="14" /></view></view>
</button>
</view>
</template>
<template v-if="current">
@@ -298,3 +302,7 @@ export default {
.scan-notice-hint { display: block; margin-top: 24rpx; color: #72839b; font-size: 24rpx; }
</style>
<style scoped lang="scss">
@import '../../styles/task-list.scss';
</style>