feat(shipping-notice): 落地 XFA 拆分、版面签名、统一进度与处理域履约
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3a9fbac2fc
commit
d2b3d74def
571 files changed
+78064
-24681
No files matched your search
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* features/chat/shipping-review/showReviewResumeOutcome.ts
|
||||
* 用途:复核写操作后统一展示 resume_outcome 提示(与 Customer 面板一致)。
|
||||
* 依赖:vue-i18n、ShippingOrderReviewResumeOutcome。
|
||||
* 逻辑:各 Reservation / 冲突 / 重复 / 履约面板在 API 成功后调用本 helper。
|
||||
*/
|
||||
import type { ComposerTranslation } from 'vue-i18n';
|
||||
import type { ShippingOrderReviewResumeOutcome } from '../types/shipping.api.types';
|
||||
|
||||
type ToastApi = {
|
||||
success: (message: string) => void;
|
||||
};
|
||||
|
||||
/**
|
||||
* 按 resume_outcome 展示成功提示;无 outcome 时使用 fallbackSuccess。
|
||||
* 核心逻辑:auto_created/idempotent_replay → 自动建单;waiting_manual_confirm → 待人工确认。
|
||||
* @param resume - 后端统一恢复协调结果
|
||||
* @param msg - useMessage 实例
|
||||
* @param t - vue-i18n translate
|
||||
* @param fallbackSuccess - 无特殊 outcome 时的默认成功文案
|
||||
* @returns 是否已展示 resume 专用提示(调用方可跳过 fallback)
|
||||
*/
|
||||
export function showReviewResumeOutcome(
|
||||
resume: ShippingOrderReviewResumeOutcome | null | undefined,
|
||||
msg: ToastApi,
|
||||
t: ComposerTranslation,
|
||||
fallbackSuccess?: string,
|
||||
): void {
|
||||
const outcome = String(resume?.outcome || '').trim();
|
||||
if (outcome === 'auto_created' || outcome === 'idempotent_replay') {
|
||||
msg.success(t('chat.shippingOrderReview.resume.autoCreated', {
|
||||
taskNo: resume?.task_no || '',
|
||||
}));
|
||||
return;
|
||||
}
|
||||
if (outcome === 'waiting_manual_confirm') {
|
||||
msg.success(t('chat.shippingOrderReview.resume.waitingManualConfirm'));
|
||||
return;
|
||||
}
|
||||
if (fallbackSuccess) {
|
||||
msg.success(fallbackSuccess);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user