feat(shipping-notice): 新增订单行与字段冲突管理功能,支持字段冲突查询与解决
This commit is contained in:
1 parent
4fbaed2b4c
commit
9da0481fc3
74 files changed
+4861
-375
No files matched your search
@@ -0,0 +1,52 @@
|
||||
<!--
|
||||
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>
|
||||
<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>
|
||||
Reference in new issue
Block a user