feat(shipping-notice): 优化货运订单履约流程与用户体验
- 优化聊天附件列表为横向可滚动布局并新增配套测试用例 - 移除自动填充默认用户消息逻辑,空备注时不再伪造默认正文 - 修复流程Gate动作展示逻辑,隐藏历史遗留操作与自动阶段无效按钮 - 完善库存匹配重试与订单快照冻结校验流程 - 优化进度展示优先级,优先显示人工待处理状态 - 移除Excel导出自动推导金额逻辑,强制使用Schema配置字段 - 新增货代通用报表RPA详细设计文档 - 更新相关测试用例与断言逻辑
This commit is contained in:
1 parent
dc282f3b1d
commit
11cef575b4
51 files changed
+2197
-112
No files matched your search
@@ -9,7 +9,7 @@ import { computed, inject, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import {
|
||||
LayoutGrid, Bot, FileText, User, LogOut, Edit, Megaphone, Clock, Package, PanelLeftClose, PanelLeftOpen, ClipboardCheck,
|
||||
ChevronDown, ChevronRight, ContactRound, ListChecks, Inbox,
|
||||
ChevronDown, ChevronRight, ContactRound, Inbox,
|
||||
} from 'lucide-vue-next';
|
||||
import { WORKSPACE_PATHS } from '../constants/routes';
|
||||
import { WORKSPACE_KEY } from '../composables/workspace.context';
|
||||
@@ -167,14 +167,6 @@ onBeforeUnmount(() => {
|
||||
<ContactRound class="h-4 w-4" />
|
||||
<span>{{ $t('workspace.nav.shippingCustomers') }}</span>
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
:to="WORKSPACE_PATHS.shippingNoticeTasks"
|
||||
class="ws-nav-btn py-2.5 text-[13px]"
|
||||
:class="{ 'ws-nav-btn--active': isActive(['workspace-shipping-tasks']) }"
|
||||
>
|
||||
<ListChecks class="h-4 w-4" />
|
||||
<span>{{ $t('workspace.nav.shippingTasks') }}</span>
|
||||
</RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
<RouterLink
|
||||
|
||||
+35
@@ -150,4 +150,39 @@ describe('TaskTodoPanel actionsExecutable', () => {
|
||||
await flushPromises();
|
||||
expect(postGateAction).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('does not render legacy actions while inventory preparation is auto-progressing', () => {
|
||||
const task = detail();
|
||||
task.ui_state = {
|
||||
...task.ui_state,
|
||||
action_buttons: [{
|
||||
id: 'edit_formal_task',
|
||||
label: '编辑正式任务',
|
||||
message: '',
|
||||
variant: 'primary',
|
||||
}],
|
||||
summary: {
|
||||
title: '获取库存',
|
||||
message: '系统正在自动处理',
|
||||
allowed_actions: ['edit_formal_task'],
|
||||
},
|
||||
process_gate: {
|
||||
execution_no: 'SPE-1',
|
||||
technical_auto_only: true,
|
||||
current_blocking_gate: {
|
||||
gate_code: 'inventory_preparation',
|
||||
evaluation_version: 3,
|
||||
next_action_code: 'poll_inventory_preparation',
|
||||
},
|
||||
},
|
||||
} as ShippingTaskDetail['ui_state'];
|
||||
|
||||
const wrapper = mount(TaskTodoPanel, {
|
||||
props: { detail: task, actionsExecutable: true },
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
|
||||
// 自动推进阶段只允许 Gate 的刷新进度入口,不能泄漏正式任务编辑。
|
||||
expect(wrapper.text()).not.toContain('编辑正式任务');
|
||||
});
|
||||
});
|
||||
@@ -221,8 +221,9 @@ const UNIFIED_OWNED_ACTION_IDS = new Set([
|
||||
const visibleActions = computed(() => {
|
||||
// [STEP] 订单处理工作台:写操作仅 Footer;不渲染 Notice action_buttons(D1)。
|
||||
if (props.hidePrimaryActions) return [];
|
||||
// [STEP] Gate 阻断时后端已清零 action_buttons;前端再兜底隐藏,避免双真相。
|
||||
if (hasBlockingGate.value) return [];
|
||||
// [STEP] Gate 阻断或系统自动等待时均由统一 Gate 投影拥有动作;
|
||||
// 禁止历史 action_buttons(如 edit_formal_task)穿透到当前阶段。
|
||||
if (hasBlockingGate.value || isSystemAutoWait.value) return [];
|
||||
return actionButtons.value.filter((action) => {
|
||||
const id = String(action.id || '');
|
||||
if (id === 'regenerate_manual_upload_todo') return false;
|
||||
|
||||
Reference in new issue
Block a user