feat(shipping-notice): 新增发货通知自动上传功能与候选资格评估

- 在环境配置中新增 SHIPPING_NOTICE_AUTO_UPLOAD_ENABLED 选项,默认关闭,需显式开启以支持自动上传。
- 引入新的 pytest.ini 文件,增加测试标记以支持自动化测试。
- 删除不再使用的 seed_shipping_notice_agents.py 文件,简化代码库。
- 更新相关 API,增强发货通知与候选资格评估功能,支持多种筛选条件。
- 增强文档与代码注释,反映新的业务逻辑与功能要求。
This commit is contained in:
hugo committed 2026-08-02 19:26:35 +08:00
1 parent cef3d5b26a
commit 3a9fbac2fc
226 files changed
+25010 -2098

No files matched your search

@@ -1,9 +1,9 @@
<!--
features/chat/components/shipping-review/ReviewLlmSuggestionPanel.vue
用途:复核工作台内嵌 AI 建议入口、列表与裁决触发(非顶级导航)。
用途:AI 建议列表与裁决内容(布局重构后作为抽屉内容组件,非常驻主区大卡片)。
依赖:vue-i18n、ReviewLlmSuggestionDialog、ShippingOrderReview* 类型。
逻辑:请求/裁决由父级 composable 执行;仅 validated 可接受;validation_failed 单独列表仅可拒绝;
证据按 field_id + line_key/line_index 绑定;打开弹窗时按建议字段解析当前草稿值。
逻辑:由 ReviewLlmSuggestionDrawer 挂载;请求须用户主动触发;仅 validated 可接受;
validation_failed 仅可拒绝;证据按 field_id + line_key/line_index 绑定。
-->
<script setup lang="ts">
import { computed, ref } from 'vue';
@@ -56,7 +56,7 @@ const statusLabel = computed(() => {
const latest = (props.suggestions || [])[0];
const code = String(latest?.status || latest?.decision || 'idle');
const key = `chat.shippingOrderReview.llmSuggestion.status.${code}`;
return te(key) ? t(key) : code;
return te(key) ? t(key) : t('chat.shippingOrderReview.llmSuggestion.status.unknown');
});
const canRequest = computed(() =>
@@ -130,7 +130,7 @@ function openSuggestion(item: ShippingOrderReviewLlmSuggestion) {
}
/**
* 将建议字段解析为 Schema 展示名;缺失时回退 field_id。
* 将建议字段解析为订单字段名称;缺失时使用通用名称,避免显示内部字段 ID。
*/
function suggestionFieldLabel(item: ShippingOrderReviewLlmSuggestion): string {
const fieldId = String(item.field_id || '').trim();
@@ -140,7 +140,7 @@ function suggestionFieldLabel(item: ShippingOrderReviewLlmSuggestion): string {
if (name && item.line_key) {
return `${name} · ${item.line_key}`;
}
return name || fieldId || '—';
return name || t('chat.shippingOrderReview.unknownField');
}
/**
@@ -149,7 +149,7 @@ function suggestionFieldLabel(item: ShippingOrderReviewLlmSuggestion): string {
function evidenceLevelLabel(level?: string | null): string {
const code = String(level || 'L1_field').trim() || 'L1_field';
const key = `chat.shippingOrderReview.llmSuggestion.evidenceLevel.${code}`;
return te(key) ? t(key) : t('chat.shippingOrderReview.llmSuggestion.scope', { level: code });
return te(key) ? t(key) : t('chat.shippingOrderReview.llmSuggestion.evidenceLevel.unknown');
}
/**