统一作业列表与待办统计并更新废弃扫码
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
<template>
|
||||
<view v-if="user" class="page-shell portal-page work-page">
|
||||
<PortalHeader :title="title" :user="user" />
|
||||
<scroll-view class="work-scroll" scroll-y><view class="portal-content work-content">
|
||||
<scroll-view class="work-scroll" scroll-y><view class="portal-content work-content" :class="{ 'pda-task-list': !showCurrent && stage !== 'review' }">
|
||||
<view v-if="showCurrent" class="detail-toolbar"><button :disabled="busy" @tap="closeCurrent">‹ 返回列表</button></view>
|
||||
|
||||
<template v-if="!showCurrent">
|
||||
<view class="row-head candidate-toolbar"><text class="card-title">{{ candidateHeading }}</text><button v-if="stage !== 'review'" class="link-button" :disabled="loading" @tap="bootstrap">{{ loading ? '刷新中…' : '刷新' }}</button></view>
|
||||
<view class="row-head candidate-toolbar" :class="{ 'pda-list-toolbar': stage !== 'review' }"><text class="card-title">{{ candidateHeading }}<text v-if="stage !== 'review' && !error"> · {{ visibleCandidates.length }} 单</text></text><button v-if="stage !== 'review'" class="link-button" :disabled="loading" @tap="bootstrap"><uni-icons type="refresh" color="#135ee8" size="18" /><text>{{ loading ? '刷新中…' : '刷新' }}</text></button></view>
|
||||
<view v-if="loading && !visibleCandidates.length" class="empty-box"><uni-load-more status="loading" /><text class="empty-copy">正在加载换标任务…</text></view>
|
||||
<view v-else-if="!visibleCandidates.length" class="empty-box"><uni-icons type="info" color="#8090a3" size="32" /><text class="empty-copy">{{ emptyText }}</text></view>
|
||||
<view v-else-if="stage !== 'review'" class="task-list">
|
||||
<view v-for="item in visibleCandidates" :key="item.relabelNo" class="task-card relabel-candidate" :class="{ current: current?.relabelNo === item.relabelNo, 'rework-card': item.reviewDecision === 'REWORK' }" @tap="openExecution(item)">
|
||||
<view class="row-head"><text class="business-code">{{ item.relabelNo }}</text><text class="status-pill">{{ statusLabel(item.taskStatus || item.applicationStatus) }}</text></view>
|
||||
<view class="candidate-kind"><text>{{ relabelTypeName(item.operationType) }}</text><text v-if="item.reviewDecision === 'REWORK'" class="rework-tag">退回重做</text></view>
|
||||
<view class="candidate-footer"><text class="candidate-progress">已换标 <text class="candidate-progress-value">{{ item.relabelledPackages }} / {{ item.expectedPackages }}</text></text><text v-if="item.skippedPackages + item.exceptionPackages > 0" class="candidate-warning">跳过/异常 {{ item.skippedPackages + item.exceptionPackages }}</text><text class="candidate-enter">进入 ›</text></view>
|
||||
<view v-else-if="stage !== 'review'" class="task-list pda-list-cards">
|
||||
<view v-for="item in visibleCandidates" :key="item.relabelNo" class="task-card relabel-candidate pda-task-card" :class="{ current: current?.relabelNo === item.relabelNo, 'rework-card': item.reviewDecision === 'REWORK' }" hover-class="pda-task-card-pressed" @tap="openExecution(item)">
|
||||
<view class="pda-task-head"><text class="pda-task-no">{{ item.relabelNo }}</text><text class="status-pill pda-task-status">{{ statusLabel(item.taskStatus || item.applicationStatus) }}</text></view>
|
||||
<view class="candidate-kind pda-task-flags"><text>{{ relabelTypeName(item.operationType) }}</text><text v-if="item.reviewDecision === 'REWORK'" class="rework-tag">退回重做</text></view>
|
||||
<view class="pda-task-metrics" :class="{ 'has-three': item.skippedPackages + item.exceptionPackages > 0 }"><view><strong>{{ item.expectedPackages }}</strong><text>应处理</text></view><view><strong>{{ item.relabelledPackages }}</strong><text>已换标</text></view><view v-if="item.skippedPackages + item.exceptionPackages > 0" class="pda-task-metric-warning"><strong>{{ item.skippedPackages + item.exceptionPackages }}</strong><text>跳过/异常</text></view></view>
|
||||
<view class="pda-task-footer"><view class="pda-task-action"><text>进入</text><uni-icons type="right" color="#135ee8" size="14" /></view></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="task-list">
|
||||
@@ -391,3 +392,7 @@
|
||||
.summary-metrics{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:4px;margin-left:auto;font-size:9px;line-height:18px}.summary-metric{display:inline-block;padding:1px 4px;border-radius:4px;background:#dcfce7;color:#16a34a;font-weight:700;white-space:nowrap}
|
||||
.candidate-toolbar{align-items:center;margin-bottom:12px}.candidate-toolbar .card-title{margin-bottom:0;font-size:16px;line-height:24px}.candidate-toolbar .link-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:88px;height:44px;min-height:44px;margin:0;padding:0 16px;border:1px solid #9dc0f4;border-radius:8px;color:#135ee8;font-size:16px;font-weight:700;line-height:normal;background:#eaf2ff}.candidate-toolbar .link-button::after{border:0}.candidate-toolbar .link-button[disabled]{color:#718095;border-color:#dce5f0;background:#e8edf3}
|
||||
.relabel-candidate .business-code{min-width:0;font-size:18px;line-height:24px;overflow-wrap:anywhere}.relabel-candidate .status-pill{font-size:12px;line-height:18px}.candidate-kind{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px;color:#52647c;font-size:14px;line-height:22px}.candidate-footer{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin-top:10px}.candidate-progress{color:#52647c;font-size:14px;line-height:24px}.candidate-progress-value{color:#135ee8;font-size:18px;font-weight:700}.candidate-warning{color:#b54708;font-size:12px;line-height:20px}.candidate-enter{margin-left:auto;color:#135ee8;font-size:14px;font-weight:600;line-height:24px}</style>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '../../styles/task-list.scss';
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user