feat(移动端): 流转树在库任务显示『谁转入在库』
- TreeCanvas 全屏流转树 + TaskTreeNode 内嵌树节点,在库/入库任务显示『📥 转入在库: 创建人』
- 复用 formatUserName 中文名映射
This commit is contained in:
@ -15,6 +15,8 @@
|
||||
<text v-if="task.assignee_id">负责人: {{ task.assignee_id }}</text>
|
||||
<text v-if="task.reject_reason" class="reject-reason">驳回: {{ task.reject_reason }}</text>
|
||||
</view>
|
||||
<!-- 📥 在库任务:显示谁转入在库 -->
|
||||
<text v-if="isWarehouseTask && task.created_by" class="warehouse-in">📥 转入在库: {{ formatUserName(task.created_by) }}</text>
|
||||
|
||||
<!-- 任务初始描述 / 交接备注(常驻显示,区别于动态日志 records) -->
|
||||
<view v-if="task.remark || task.description" class="task-initial-remark">
|
||||
@ -82,6 +84,7 @@
|
||||
|
||||
<script>
|
||||
import { getBaseUrl } from "../../../utils/request";
|
||||
import { formatUserName } from "../../../utils/format";
|
||||
|
||||
export default {
|
||||
name: "TaskTreeNode",
|
||||
@ -101,6 +104,13 @@ export default {
|
||||
console.log("task.description =", this.task.description);
|
||||
},
|
||||
computed: {
|
||||
isWarehouseTask() {
|
||||
return !!(this.task && (
|
||||
String(this.task.task_name || '').includes('在库')
|
||||
|| String(this.task.task_name || '').includes('入库')
|
||||
|| this.task.assignee_id === 'virtual_warehouse'
|
||||
));
|
||||
},
|
||||
canEditRecord() {
|
||||
if (this.readonly) return false;
|
||||
if (this.task.assignee_id == this.currentUserId) return true;
|
||||
@ -178,6 +188,7 @@ export default {
|
||||
.tag-fission { background: #7c3aed; }
|
||||
.tnode-meta { margin-top: 2px; font-size: 11px; color: #9ca3af; display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
.reject-reason { color: #ef4444; }
|
||||
.warehouse-in { display: block; margin-top: 4px; font-size: 11px; color: #059669; font-weight: 700; }
|
||||
|
||||
/* 任务初始描述(常驻,区别于动态记录) */
|
||||
.task-initial-remark {
|
||||
|
||||
Reference in New Issue
Block a user