本次提交新增货代订单处理全流程的完整业务能力、数据库迁移与测试用例: 1. 统一追加式审计事件体系,支持全链路不可篡改的业务追溯 2. 货代任务撤销、版本替代管控逻辑,规范已上传订单的合规版本更替 3. 订单抽取路由审计、模板自动冻结资格、路由计数等核心业务基建 4. EML订单补充表解析契约与合并逻辑,完善订单补全能力 5. Chatflow只读能力令牌校验机制,保障工具调用安全 6. 人工复核证据校验服务,规范人工审核的证据留存 所有变更均配套完整的单元测试与迁移契约测试,支持受控回退
58 lines
2.2 KiB
Vue
58 lines
2.2 KiB
Vue
<!--
|
||
features/chat/components/ShippingFieldEvidencePanel.vue
|
||
用途:只读展开订单字段级原文证据(Document + quote)。
|
||
依赖:shipping.api.types、vue-i18n。
|
||
逻辑:由 ShippingTaskParsedResultCard / Candidate 审核区传入 evidence;本组件不推导业务结论。
|
||
-->
|
||
<script setup lang="ts">
|
||
import { computed } from 'vue';
|
||
import { useI18n } from 'vue-i18n';
|
||
import type { ShippingFieldEvidenceItem } from '@/features/chat/types/shipping.api.types';
|
||
|
||
const props = defineProps<{
|
||
evidence?: ShippingFieldEvidenceItem[] | null;
|
||
compact?: boolean;
|
||
}>();
|
||
|
||
const { t } = useI18n();
|
||
|
||
const items = computed(() =>
|
||
(props.evidence || []).filter((item) => item && typeof item === 'object'),
|
||
);
|
||
</script>
|
||
|
||
<template>
|
||
<div v-if="items.length" class="space-y-2">
|
||
<div class="text-[11px] font-semibold uppercase tracking-wide text-muted">
|
||
{{ t('chat.shippingParsedResult.evidenceTitle') }}
|
||
</div>
|
||
<details
|
||
v-for="(item, index) in items"
|
||
:key="`${item.field || 'field'}-${item.document_id || index}`"
|
||
class="rounded-lg border border-default bg-surface px-2.5 py-2 text-xs"
|
||
:open="!compact && index === 0"
|
||
>
|
||
<summary class="cursor-pointer font-medium text-secondary">
|
||
<span class="font-mono">{{ item.field || t('chat.shippingParsedResult.unknownField') }}</span>
|
||
<span v-if="item.reservation_id" class="ml-2 text-muted">{{ item.reservation_id }}</span>
|
||
</summary>
|
||
<div class="mt-2 space-y-1 text-muted">
|
||
<div v-if="item.document_id != null">
|
||
{{ t('chat.shippingParsedResult.documentId', { id: item.document_id }) }}
|
||
</div>
|
||
<div v-if="item.page_no != null">
|
||
{{ t('chat.shippingParsedResult.pageNumber', { page: item.page_no }) }}
|
||
<span v-if="item.table_id" class="ml-1 font-mono">{{ item.table_id }}</span>
|
||
<span v-if="item.cell_id" class="ml-1 font-mono">{{ item.cell_id }}</span>
|
||
</div>
|
||
<blockquote
|
||
v-if="item.quote"
|
||
class="rounded border border-slate-200 bg-slate-50 px-2 py-1.5 font-mono text-[11px] leading-5 text-slate-700"
|
||
>
|
||
{{ item.quote }}
|
||
</blockquote>
|
||
</div>
|
||
</details>
|
||
</div>
|
||
</template>
|