feat(freight-rpa): 库存/收料改名在手/入站,报表归属RPA,类名统一FreightRpa
把 shipping 侧 inventory/receipt 词根迁到 onhand/inbound,29 张表与 枚举/权限/前端/i18n 同步改名;在手与入站报表配置及文件改由 freight_rpa 持有,发货与调拨仅按 source_code 消费;ORM 类加 FreightRpa 前缀, 上传动作改为 freight_rpa_upload。含类名与上传动作改名规格文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
ffc0d4a430
commit
39fe3c05f2
453 files changed
+17945
-8646
No files matched your search
@@ -672,7 +672,7 @@ watch(() => page.currentAgentId, () => {
|
||||
|
||||
@add-remote-url="page.addRemoteUrlAttachment"
|
||||
|
||||
@shipping-inventory-selected="page.handleShippingInventorySelected"
|
||||
@shipping-inventory-selected="page.handleShippingOnhandSelected"
|
||||
|
||||
@use-shipping-suggested-prompt="page.useShippingSuggestedPrompt"
|
||||
|
||||
|
||||
+22
-22
@@ -15,13 +15,13 @@ const i18n = createI18n({
|
||||
locale: 'zh-CN',
|
||||
messages: {
|
||||
'zh-CN': {
|
||||
'chat.shippingOrderReview.processGate.actionCodes.retry_inventory_matching': '重新库存匹配',
|
||||
'chat.shippingOrderReview.processGate.actionCodes.retry_onhand_matching': '重新库存匹配',
|
||||
workspace: {
|
||||
shippingNotice: {
|
||||
processGate: {
|
||||
actionCodes: {
|
||||
reload_inventory_result: '重新读取库存结果',
|
||||
retry_inventory_preparation: '重新获取库存',
|
||||
reload_onhand_result: '重新读取库存结果',
|
||||
retry_onhand_preparation: '重新获取库存',
|
||||
confirm_customer: '确认客户',
|
||||
},
|
||||
inventoryActions: {
|
||||
@@ -76,7 +76,7 @@ describe('ReviewCurrentProcessingCard', () => {
|
||||
it('hides a legacy primary action while inventory preparation is running', () => {
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: {
|
||||
stageCode: 'inventory_preparation',
|
||||
stageCode: 'onhand_preparation',
|
||||
userStatus: 'running',
|
||||
primaryAction: { code: 'edit_formal_task', i18nKey: 'edit_formal_task' },
|
||||
},
|
||||
@@ -90,8 +90,8 @@ describe('ReviewCurrentProcessingCard', () => {
|
||||
it('keeps the retry action for retryable states', () => {
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: {
|
||||
stageCode: 'inventory_preparation', userStatus: 'retryable', retryable: true,
|
||||
primaryAction: { code: 'retry_inventory_preparation', i18nKey: 'workspace.shippingNotice.processGate.inventoryActions.retryInventoryPreparation' },
|
||||
stageCode: 'onhand_preparation', userStatus: 'retryable', retryable: true,
|
||||
primaryAction: { code: 'retry_onhand_preparation', i18nKey: 'workspace.shippingNotice.processGate.inventoryActions.retryInventoryPreparation' },
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
@@ -105,8 +105,8 @@ describe('ReviewCurrentProcessingCard', () => {
|
||||
// 此用例用 reload_inventory_result(仍为写契约有效码)验证卡片对库存动作文案的渲染。
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: {
|
||||
stageCode: 'inventory_preparation', userStatus: 'retryable', retryable: true,
|
||||
primaryAction: { code: 'reload_inventory_result' },
|
||||
stageCode: 'onhand_preparation', userStatus: 'retryable', retryable: true,
|
||||
primaryAction: { code: 'reload_onhand_result' },
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
@@ -131,11 +131,11 @@ describe('ReviewCurrentProcessingCard', () => {
|
||||
it('renders Gate label_key for every primary action presentation', () => {
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: {
|
||||
stageCode: 'inventory_matching',
|
||||
stageCode: 'onhand_matching',
|
||||
userStatus: 'waiting_human',
|
||||
primaryAction: {
|
||||
code: 'retry_inventory_matching',
|
||||
label_key: 'chat.shippingOrderReview.processGate.actionCodes.retry_inventory_matching',
|
||||
code: 'retry_onhand_matching',
|
||||
label_key: 'chat.shippingOrderReview.processGate.actionCodes.retry_onhand_matching',
|
||||
} as any,
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
@@ -220,7 +220,7 @@ describe('ReviewCurrentProcessingCard', () => {
|
||||
it('renders a localized reason instead of an internal blocking code in the next step', () => {
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: {
|
||||
stageCode: 'inventory_matching',
|
||||
stageCode: 'onhand_matching',
|
||||
userStatus: 'waiting_human',
|
||||
blockingReason: { code: 'inventory_shortage_review_required' },
|
||||
},
|
||||
@@ -235,18 +235,18 @@ describe('ReviewCurrentProcessingCard', () => {
|
||||
it('hides internal inventory recovery targets while retaining the stable primary action', async () => {
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: {
|
||||
stageCode: 'inventory_matching',
|
||||
stageCode: 'onhand_matching',
|
||||
userStatus: 'waiting_human',
|
||||
primaryAction: { code: 'retry_inventory_matching', i18nKey: 'retry_inventory_matching' },
|
||||
primaryAction: { code: 'retry_onhand_matching', i18nKey: 'retry_onhand_matching' },
|
||||
recoveryActions: [{
|
||||
code: 'retry_inventory_from_preparation',
|
||||
i18nKey: 'chat.shippingOrderReview.processGate.actionCodes.retry_inventory_matching',
|
||||
code: 'retry_onhand_from_preparation',
|
||||
i18nKey: 'chat.shippingOrderReview.processGate.actionCodes.retry_onhand_matching',
|
||||
}],
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
|
||||
expect(wrapper.find('[data-testid="review-current-task-recovery-retry_inventory_from_preparation"]').exists()).toBe(false);
|
||||
expect(wrapper.find('[data-testid="review-current-task-recovery-retry_onhand_from_preparation"]').exists()).toBe(false);
|
||||
expect(wrapper.findAll('button').length).toBe(1);
|
||||
});
|
||||
|
||||
@@ -255,19 +255,19 @@ describe('ReviewCurrentProcessingCard', () => {
|
||||
props: {
|
||||
stageCode: 'fulfillment_prep',
|
||||
userStatus: 'waiting_human',
|
||||
primaryAction: { code: 'retry_inventory_matching' },
|
||||
recoveryActions: [{ code: 'retry_inventory_preparation' }],
|
||||
primaryAction: { code: 'retry_onhand_matching' },
|
||||
recoveryActions: [{ code: 'retry_onhand_preparation' }],
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
|
||||
await wrapper.get('[data-testid="review-current-processing-retry"]').trigger('click');
|
||||
await wrapper.get('[data-testid="review-current-task-recovery-retry_inventory_preparation"]').trigger('click');
|
||||
await wrapper.get('[data-testid="review-current-task-recovery-retry_onhand_preparation"]').trigger('click');
|
||||
|
||||
// 两个稳定 action 码分别进入 Gate API:重匹配不可误触 RPA,重新获取库存才会触发 RPA。
|
||||
expect(wrapper.emitted('action')).toEqual([
|
||||
['retry_inventory_matching', {}],
|
||||
['retry_inventory_preparation', {}],
|
||||
['retry_onhand_matching', {}],
|
||||
['retry_onhand_preparation', {}],
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -317,7 +317,7 @@ const businessActionTitle = computed(() => {
|
||||
});
|
||||
|
||||
const actionIsRetry = computed(() => String(props.primaryAction?.code || '').trim().startsWith('retry_'));
|
||||
const actionIsInventoryRpa = computed(() => String(props.primaryAction?.code || '').trim() === 'retry_inventory_preparation');
|
||||
const actionIsInventoryRpa = computed(() => String(props.primaryAction?.code || '').trim() === 'retry_onhand_preparation');
|
||||
|
||||
/**
|
||||
* 阶段能力禁用态裁决:与视图层 submitFormalGateAction 的点击拦截同源(展示=执行同源)。
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ const { t, te } = useI18n();
|
||||
|
||||
const visible = computed(() => {
|
||||
const actions = props.fallback?.allowed_actions || [];
|
||||
return Boolean(props.fallback && actions.includes('retry_inventory_preparation'));
|
||||
return Boolean(props.fallback && actions.includes('retry_onhand_preparation'));
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -71,7 +71,7 @@ const reasonLabel = computed(() => {
|
||||
:disabled="busy"
|
||||
@click="emit('retry-preparation')"
|
||||
>
|
||||
{{ t(inventoryActionLabelKey('retry_inventory_preparation')!) }}
|
||||
{{ t(inventoryActionLabelKey('retry_onhand_preparation')!) }}
|
||||
</button>
|
||||
</section>
|
||||
</template>
|
||||
+1
-1
@@ -55,7 +55,7 @@ describe('ReviewLineInventoryOps', () => {
|
||||
it('keeps inventory actions out of the line even when present', () => {
|
||||
const wrapper = mountOps({
|
||||
retryable: false,
|
||||
inventory_allowed_actions: ['retry_inventory_preparation', 'retry_inventory_matching'],
|
||||
inventory_allowed_actions: ['retry_onhand_preparation', 'retry_onhand_matching'],
|
||||
line_allowed_actions: ['close_unfulfillable'],
|
||||
});
|
||||
expect(wrapper.find('[data-testid="review-line-retry"]').exists()).toBe(false);
|
||||
|
||||
+7
-7
@@ -474,7 +474,7 @@ describe('ShippingConversationProcessingCard', () => {
|
||||
customerName: null, poNumber: 'PO-FIRST',
|
||||
},
|
||||
childOrderTasks: [{
|
||||
orderTaskNo: 'OT-EML-WITH-CHILD-OT-C1', status: 'blocked', stage: 'inventory_matching',
|
||||
orderTaskNo: 'OT-EML-WITH-CHILD-OT-C1', status: 'blocked', stage: 'onhand_matching',
|
||||
customerName: null, poNumber: 'PO-SECOND', lastActivityAt: null,
|
||||
}],
|
||||
});
|
||||
@@ -976,23 +976,23 @@ describe('ShippingConversationProcessingCard', () => {
|
||||
status: 'waiting_review',
|
||||
stage: 'waiting_review',
|
||||
currentGate: {
|
||||
gateCode: 'inventory_matching',
|
||||
nextActionCode: 'open_inventory_match_review',
|
||||
gateCode: 'onhand_matching',
|
||||
nextActionCode: 'open_onhand_match_review',
|
||||
blockingReasonCode: 'inventory_match_not_ready',
|
||||
},
|
||||
availableActions: ['open_inventory_match_review'],
|
||||
availableActions: ['open_onhand_match_review'],
|
||||
uiState: {
|
||||
status: 'waiting_human',
|
||||
stage: 'waiting_review',
|
||||
lifecycleStage: 'order_review',
|
||||
lifecycleEntries: [],
|
||||
blocking_reason: { code: 'inventory_match_not_ready' },
|
||||
primary_action: { code: 'open_inventory_match_review', i18nKey: null, parameters: {}, executionMode: 'immediate' },
|
||||
primary_action: { code: 'open_onhand_match_review', i18nKey: null, parameters: {}, executionMode: 'immediate' },
|
||||
secondary_actions: [],
|
||||
},
|
||||
}),
|
||||
buildWorkItem('OT-PROC', {
|
||||
stage: 'inventory_matching',
|
||||
stage: 'onhand_matching',
|
||||
}),
|
||||
],
|
||||
},
|
||||
@@ -1006,7 +1006,7 @@ describe('ShippingConversationProcessingCard', () => {
|
||||
expect(wrapper.findAll('[data-testid="shipping-processing-task-actions"]')).toHaveLength(0);
|
||||
const task = wrapper.find('[data-testid="shipping-processing-task-OT-NEED"]');
|
||||
expect(task.find('[data-testid="unified-action-primary"]').exists()).toBe(true);
|
||||
expect(task.find('[data-testid="unified-action-primary"]').text()).toContain('open_inventory_match_review');
|
||||
expect(task.find('[data-testid="unified-action-primary"]').text()).toContain('open_onhand_match_review');
|
||||
|
||||
await task.find('button').trigger('click');
|
||||
await flushPromises();
|
||||
|
||||
+1
-1
@@ -775,7 +775,7 @@ function currentNeedLabel(task: ConversationProcessingUserTask): string {
|
||||
const labels: Record<string, string> = {
|
||||
confirm_customer: 'chat.shippingProcessing.currentNeed.confirmCustomer',
|
||||
resolve_field_conflicts: 'chat.shippingProcessing.currentNeed.resolveFieldConflicts',
|
||||
open_inventory_match_review: 'chat.shippingProcessing.currentNeed.inventoryMatch',
|
||||
open_onhand_match_review: 'chat.shippingProcessing.currentNeed.inventoryMatch',
|
||||
open_order_processing: 'chat.shippingProcessing.currentNeed.orderDraft',
|
||||
retry: 'chat.shippingProcessing.currentNeed.retry',
|
||||
retry_parse: 'chat.shippingProcessing.currentNeed.retry',
|
||||
|
||||
@@ -280,7 +280,7 @@ describe('ShippingWorkflowTimeline', () => {
|
||||
it('uses the clicked secondary action lifecycle target instead of falling back to view-result handling', async () => {
|
||||
const file = fileProjection({
|
||||
uiState: {
|
||||
status: 'waiting_human', stage: 'inventory_matching', lifecycleStage: 'fulfillment_prep',
|
||||
status: 'waiting_human', stage: 'onhand_matching', lifecycleStage: 'fulfillment_prep',
|
||||
lifecycleEntries: [], blocking_reason: null, primary_action: null,
|
||||
secondary_actions: [{
|
||||
code: 'view_result', enabled: true, executionMode: 'navigate',
|
||||
|
||||
Reference in new issue
Block a user