feat: 任务树/流转卡展示驳回原因与返工备注(网页SlimCard,移动端FlowCard/SwipeCards)
This commit is contained in:
@ -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"
|
||||
|
||||
@ -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,直接显示系统名,不取用户头像 -->
|
||||
|
||||
Reference in New Issue
Block a user