feat(shipping_notice): 新增货代订单全流程业务模块及配套基建
本次提交新增货代订单处理全流程的完整业务能力、数据库迁移与测试用例: 1. 统一追加式审计事件体系,支持全链路不可篡改的业务追溯 2. 货代任务撤销、版本替代管控逻辑,规范已上传订单的合规版本更替 3. 订单抽取路由审计、模板自动冻结资格、路由计数等核心业务基建 4. EML订单补充表解析契约与合并逻辑,完善订单补全能力 5. Chatflow只读能力令牌校验机制,保障工具调用安全 6. 人工复核证据校验服务,规范人工审核的证据留存 所有变更均配套完整的单元测试与迁移契约测试,支持受控回退
This commit is contained in:
1 parent
90f77634d6
commit
1f3ecb87b7
128 files changed
+3635
-2074
No files matched your search
@@ -132,6 +132,9 @@ function shippingNoticeAttachmentHint(attachment: ShippingNoticePendingAttachmen
|
||||
failed: issues,
|
||||
});
|
||||
}
|
||||
if (attachment.layoutStatus === 'processing') {
|
||||
return t('chat.shippingNoticeAttachmentHintLayoutProcessing', { ok, total: effectiveTotal });
|
||||
}
|
||||
if (duplicates > 0) {
|
||||
return t('chat.shippingNoticeAttachmentHintWithDup', { ok, total: effectiveTotal, duplicates });
|
||||
}
|
||||
|
||||
@@ -40,6 +40,11 @@ const items = computed(() =>
|
||||
<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"
|
||||
|
||||
@@ -37,13 +37,15 @@ async function resolveConflict(
|
||||
conflict: ShippingFieldConflict,
|
||||
resolution: 'keep_existing' | 'take_incoming',
|
||||
) {
|
||||
if (!props.taskNo || resolvingId.value != null) return;
|
||||
if (!props.taskNo || resolvingId.value != null || props.orderDataVersion == null) return;
|
||||
resolvingId.value = conflict.id;
|
||||
try {
|
||||
await resolveWorkspaceShippingFieldConflict(props.taskNo, conflict.id, {
|
||||
resolution,
|
||||
expectedConflictVersion: conflict.conflict_version,
|
||||
expectedOrderDataVersion: props.orderDataVersion ?? undefined,
|
||||
expectedOrderDataVersion: props.orderDataVersion,
|
||||
evidence: { evidence_type: 'manual_input', reason: '工作台人工解决字段冲突' },
|
||||
reason: '工作台人工解决字段冲突',
|
||||
idempotencyKey: `conflict-${conflict.id}-${resolution}-${conflict.conflict_version}`,
|
||||
});
|
||||
msg.success(t('chat.shippingFieldConflict.resolveSuccess'));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* features/chat/components/messages/ChatMessageAttachmentList.vue
|
||||
* 用途:在用户消息气泡内部展示已发送附件快照。
|
||||
* 用途:在用户消息中展示已发送附件快照。
|
||||
* 依赖:lucide 文件图标、attachmentCard.utils 的大小格式化、chat.types 的消息附件契约。
|
||||
* 逻辑:ChatMessageBubble 将当前用户消息附件传入;卡片继承品牌气泡语境,只读展示且不提供删除或重试。
|
||||
* 逻辑:ChatMessageBubble 将当前用户消息附件传入;本组件只读展示,不提供删除、重试或上传状态操作。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { FileAudio, FileImage, FileText, FileVideo, Link2 } from 'lucide-vue-next';
|
||||
@@ -35,16 +35,16 @@ function attachmentBadge(attachment: ChatMessageAttachment): string {
|
||||
<div
|
||||
v-if="attachments.length > 0"
|
||||
data-testid="chat-message-attachment-list"
|
||||
class="flex w-full flex-wrap justify-end gap-2"
|
||||
class="mb-2 flex w-full flex-wrap justify-end gap-2"
|
||||
>
|
||||
<article
|
||||
v-for="(attachment, attachmentIndex) in attachments"
|
||||
:key="attachment.id || `${attachment.name}-${attachment.size ?? 'unknown'}-${attachmentIndex}`"
|
||||
class="flex min-w-0 basis-full items-center gap-2.5 rounded-xl border border-white/20 bg-white/10 px-3 py-2.5 shadow-sm backdrop-blur-sm sm:basis-[calc(50%-0.25rem)] sm:min-w-[220px] sm:max-w-[290px]"
|
||||
:key="`${attachment.name}-${attachment.size ?? 'unknown'}-${attachmentIndex}`"
|
||||
class="flex min-w-0 basis-full items-center gap-2.5 rounded-xl border border-default bg-surface px-3 py-2.5 shadow-sm dark:bg-slate-900 sm:basis-[calc(50%-0.25rem)] sm:min-w-[220px] sm:max-w-[290px]"
|
||||
:title="attachment.name"
|
||||
>
|
||||
<div
|
||||
class="flex h-10 w-9 shrink-0 flex-col items-center justify-center rounded-lg bg-white/15 text-white"
|
||||
class="flex h-10 w-9 shrink-0 flex-col items-center justify-center rounded-lg bg-brand-50 text-brand-700 dark:bg-brand-900/30 dark:text-brand-300"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<component :is="attachmentIcon(attachment)" class="h-4 w-4" />
|
||||
@@ -53,8 +53,8 @@ function attachmentBadge(attachment: ChatMessageAttachment): string {
|
||||
</span>
|
||||
</div>
|
||||
<div class="min-w-0 flex-1">
|
||||
<div class="truncate text-sm font-semibold text-white">{{ attachment.name }}</div>
|
||||
<div v-if="attachment.size !== undefined" class="mt-1 text-[11px] leading-none text-white/70">
|
||||
<div class="truncate text-sm font-semibold text-primary">{{ attachment.name }}</div>
|
||||
<div v-if="attachment.size !== undefined" class="mt-1 text-[11px] leading-none text-muted">
|
||||
{{ formatAttachmentSize(attachment.size) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user