refactor(shipping-ui): 收口订单复核与库存流程前端投影
This commit is contained in:
1 parent
265a6e179a
commit
4e8b2f8db2
27 files changed
+618
-407
No files matched your search
@@ -16,7 +16,7 @@ import {
|
||||
SHIPPING_NOTICE_AGENT_CODE,
|
||||
} from '@/features/chat/api/shipping.api';
|
||||
import type { ShippingOrderExtractionRun } from '@/features/chat/types/shipping.api.types';
|
||||
import { formatOrderExtractionElapsed } from '@/features/chat/shipping/orderExtractionProgressDisplay';
|
||||
import { formatOrderExtractionElapsed, resolveOrderExtractionRunStageKey } from '@/features/chat/shipping/orderExtractionProgressDisplay';
|
||||
|
||||
const { t, te } = useI18n();
|
||||
const router = useRouter();
|
||||
@@ -69,14 +69,15 @@ async function load() {
|
||||
|
||||
/**
|
||||
* 用户可见阶段文案;无投影时回退状态文案。
|
||||
* v2:key 构造改走共享 resolveOrderExtractionRunStageKey(输出不变,仅事实解析同源)。
|
||||
*/
|
||||
function stageLabel(run: ShippingOrderExtractionRun): string {
|
||||
const stage = String(run.current_activity?.user_visible_stage || '').trim();
|
||||
if (stage) {
|
||||
const key = `chat.shippingOrderExtractionUserStage.${stage}`;
|
||||
const key = resolveOrderExtractionRunStageKey(stage, run.status);
|
||||
if (te(key)) return t(key);
|
||||
}
|
||||
const statusKey = `chat.shippingOrderExtractionCardTitle.${run.status}`;
|
||||
const statusKey = resolveOrderExtractionRunStageKey(null, run.status);
|
||||
return te(statusKey) ? t(statusKey) : run.status;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ function evidenceText(row: NonNullable<ShippingStpFacts['line_resolutions']>[num
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="(row, index) in lineRows"
|
||||
:key="`${row.line_key || row.line_index}-${index}`"
|
||||
:key="`${row.line_no || row.line_index}-${index}`"
|
||||
class="border-b border-default/50 align-top"
|
||||
>
|
||||
<td class="py-1.5 pr-2 font-mono">{{ (row.line_index ?? index) + 1 }}</td>
|
||||
|
||||
Reference in new issue
Block a user