feat: 任务树/流转卡展示驳回原因与返工备注(网页SlimCard,移动端FlowCard/SwipeCards)

This commit is contained in:
2026-09-09 17:29:40 +08:00
parent 7b7dbbb0d8
commit b088d25df9
3 changed files with 19 additions and 0 deletions

View File

@ -16,6 +16,8 @@
</view>
<!-- 时间独占一行 -->
<text class="fc-time"> {{ fmtDate(node.created_at) }}{{ node.completed_at ? '→' + fmtDate(node.completed_at) : '→至今' }}</text>
<!-- 驳回/返工原因 REJECTED reject_reason返工节点取含驳回/返工的备注 -->
<text v-if="reasonText" style="display:block;margin:8rpx 0 0;font-size:22rpx;line-height:1.4;color:#dc2626;font-weight:600;"> {{ reasonText }}</text>
<!-- 卡片底部全宽蓝色日志条对齐 Web -->
<view v-if="node.records && node.records.length" class="ft-log-bar" @tap.stop="$emit('viewRecords', node)">
查看操作日志 ({{ node.records.length }})
@ -34,6 +36,13 @@ export default {
},
emits: ["viewRecords"],
computed: {
// 驳回/返工原因:原 REJECTED 有 reject_reason返工节点原因在 remark形如“返工任务驳回自…原因…
reasonText() {
const n = this.node || {};
if (n.reject_reason) return `驳回: ${n.reject_reason}`;
const rm = n.remark;
return rm && (rm.indexOf("驳回") >= 0 || rm.indexOf("返工") >= 0) ? rm : "";
},
isMainNode() {
return !this.node.parent_task_id
|| this.node.task_type === "TRANSFER"

View File

@ -41,6 +41,9 @@
<text class="tc-name">{{ card.task_name }}</text>
<!-- 被驳回原任务显示驳回原因返工节点原因由下方备注框承载 -->
<text v-if="card.reject_reason" style="display:block;margin-top:6rpx;font-size:22rpx;line-height:1.4;color:#dc2626;font-weight:600;"> 驳回: {{ card.reject_reason }}</text>
<view class="tc-meta">
<view class="tc-meta-row">
<!-- 仓储任务assignee null直接显示系统名不取用户头像 -->